Wednesday, October 24, 2007

Ubuntu 7.10 update DVD or CD

Ubuntu 7.10 update DVD or CD-alternate iso placed virtual

Link to the ext article

Below I used "alexey" as my user name, change it.

1. download iso dvd

Download iso from page http://cdimage.ubuntu.com/releases/7.10/release/ (by torrent or direct download) to
/home/alexey/images/ubuntu-7.10-dvd-i386.iso

2. mount iso

sudo mkdir /media/ubuntu710dvd

sudo gedit /etc/fstab

"/home/alexey/images/ubuntu-7.10-dvd-i386.iso /media/ubuntu710dvd iso9660 ro,loop,auto"

sudo mount -a

3. configure software sources

sudo gedit /etc/apt/sources.list

"deb file:/media/ubuntu710dvd/ gutsy main restricted"

4. update

sudo apt-get update

Thursday, October 4, 2007

Maven for Eclipse

About maven on my blog

Install maven
Download direct link (tar.gz ver. 2.0.7)
Unpack it by:
tar xzfv maven-2.0.7-bin.tar.gz


Configure Maven
In your home directory within .profile file add lines with changes according your path:
export MAVEN_HOME=/home/alexey/java/maven2
export PATH=$MAVEN_HOME/bin:$PATH


Configure Eclipse
Window -> Preferences ->
Java -> Build Path -> Classpath Variables
Set new:
Name "M2_REPO"
Path "/home/alexey/java/maven2/repository"

Run maven on Eclipse
Run -> Open Run Dialog ... ->
Double Click on "Java Application"
1. Main
Enter Name, choose project for build, insert main class "org.codehaus.classworlds.Launcher"

2. Arguments
Program arguments: "clean install"
VM arguments, modify with your situation:
-Xmx300m
-cp "/home/alexey/java/maven2/repository/classworlds/classworlds/1.1-alpha-2/classworlds-1.1-alpha-2.jar"
-Dclassworlds.conf="/home/alexey/java/maven2/bin/m2.conf"
-Dmaven.home="/home/alexey/java/maven2"
-Dtest.repository=db1

3. Classpath
Add to the "User entries" classworlds-1.1-alpha-2.jar by click "Add External JARs ..."
e.g.: from repository/classworlds/1.1-alpha-2/
Have you seen this error?
========================
[INFO] [antrun:run {execution: 1}]
[INFO] Executing tasks
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] An Ant BuildException has occured: taskdef A class needed by class xdoclet.modules.hibernate.HibernateDocletTask cannot be found: org/apache/tools/ant/DynamicConfigurator
========================

Than add to "Bootstrap Entries" the ant jar "ant-_._._.jar"
e.g.: from repository/ant/ant/1.6.5/ant-1.6.5.jar

Apply and Run

Wednesday, October 3, 2007

Subversive for Eclipse

For Ubuntu
Install tigris console subversive client:
"sudo apt-get install subversion"

1. Install

1.1. CSC
Help -> Software Updates -> Find and Install ... ->
Search for new feature to install -> Next -> New Remote Site ...
Name: CSC
URL: "http://vpms.de.csc.com/projectset/update"
Docs

1.2. Mylyn
Download derect link: mylyn-2.1-e3.3.zip
Help -> Software Updates -> Find and Install ... ->
Search for new feature to install -> Next -> New Archived Site...
And select from filesystem downloaded file.
Docs

1.3. Subversive
Help -> Software Updates -> Find and Install ... ->
Search for new feature to install -> Next -> New Remote Site ...
Name: Subversive
URL: "http://www.polarion.org/projects/subversive/download/1.1/update-site/"

Or you can install subversive as "New Archived Site..." with downloaded this archive
Docs

2. Configure
2.1. Settings for SVN.
Window -> Рreferences... Team -> SVN
Change in tab SVN Client from "Subversive Default" to "SVN Kit"

3. Use
3.1. Share project.
Click right-button mouse on project and select Team -> Share Project SVN, Next, Next,
Enter user/password, check Save password, Finish
3.2. Use SVN client.
Click right-button mouse on project and select Team -> and command what are you want.


For Windows
I'm pretty sure it's same as described above for Ubuntu.
Install
1. mylar-site-0.9.0-e3.2.zip
(http://mirrors.ibiblio.org/pub/mirrors/eclipse/technology/mylar/update-site-archive/)
через UpdateSite
2. com.csc.dip.projectset.feature_2.1.0.jar
(http://vpms.de.csc.com/projectset/update/features/)
скопировать разархивированную папку в \eclipse\features\
3. Subversive_1.1.0.RC1a-LocalUpdateSite.zip
(http://www.polarion.org/index.php?page=download&project=subversive)
через UpdateSite
Configure
1. Window -> Рreferences... Team -> SVN
Change in tab SVN Client from "Subversive Default" to "SVN Kit"
Use
1. Click right-button mouse on project and select Team -> Share Project SVN, Next, Next,
Enter user/password, check Save password, Finish
2. Use SVN client.
Click right-button mouse on project and select Team -> and command what are you want.

HTH, Alexey.

Tuesday, October 2, 2007

[SOLVED] eclipse tomcat debug ClassNotFoundException URLClassLoader

Need to add jars.

In the Eclipse to the "Run" -> "Open Debug Dialog..." -> Java Application -> your launch configuration -> "Classpath" Tab -> User Entries

Add two jars:
"tools.jar" from JAVA_HOME/lib
"bootstrap.jar" from TOMCAT_HOME/bin