The Answer to Life, the Universe, and Everything

Sunday, December 09, 2007

Maven2 deploy to other server

Create file settings.xml under .m2
<?xml version='1.0' encoding='utf-8' ?>
<privateKey>C:\Program Files\PuTTY\auth\id_rsa</privateKey>

Then add the following to pom.xml

maven2 java version

You might need to specify the compile java version by using generics etc in pom.xml file.


Saturday, December 01, 2007

Eclipse3.3.1 OutOfMemory

Eclipse 3.3.1 has bug on memory part.

Edit the "eclipse.ini" to fix the issue.

Maven + Eclipse = Error?

If you face the something like the following error,
Unbound classpath variable: ‘M2_REPO/bouncycastle/bcmail-jdk14/132/bcmail-jdk14-132.jar

Select the Eclipse Project folder from the Navigator window view
Right Click and get the Project Properties.
Select the tree item named “Java Build Path”
Push the button on the Right that says Add Variables.
Then Push the button that says Configure Variables.
Then push the New button
Add a new variable named M2_REPO and map it to the directory that contains the repository above.
Exit back to the “New Variable Classpath entry” dialog.
Select the M2_REPO variable and click extend
Select a jar file and exit.

Maven2 : Adding jar to local repos

This is how you can add the Non globally installed jar to your local repos.
mvn install:install-file -DgroupId=<<$Group Name>> -DartifactId=<<$Project Name>> \
-Dversion=<<$S/W version>> -Dpackaging=jar -Dfile=<<$Path to the jar file>>