Links and commands used by the authors:
http://i-proving.com/2007/03/29/Maven-Recipes/
http://i-proving.com/2007/04/27/How-to-Mavenize-an-Existing-Eclipse-Project/ :
mvn eclipse:eclipse -DdownloadSources=true
http://i-proving.com/2009/11/03/creating-a-maven-project-and-adding-it-to-subversion/ :
mvn archetype:create -DgroupId=[packageName] -DartifactId=[projectName]
mvn eclipse:eclipse -DdownloadSources.
For integration with Hudson, some nodes should be added to the pom.xml
1. parent
2. distributionManagement
3. scm
Project under an existing project:
Using the command line, enter the following in the root of the parent project
mvn archetype:create -DgroupId=[packageName] -DartifactId=[projectName]
svn add 'projectName'
svn commit [projectName] pom.xml
mvn eclipse:eclipse -DdownloadSources
http://i-proving.com/2007/05/10/How-to-Determine-the-Maven-dependency-to-use-for-a-jar/ :
http://i-proving.com/2007/03/29/Maven-Recipes/
http://i-proving.com/2007/04/27/How-to-Mavenize-an-Existing-Eclipse-Project/ :
Insure that your M2_REPO variable is properly defined
mvn -Declipse.workspace=<path-to-eclipse-workspace> eclipse:add-maven-repomvn eclipse:eclipse -DdownloadSources=true
http://i-proving.com/2009/11/03/creating-a-maven-project-and-adding-it-to-subversion/ :
mvn archetype:create -DgroupId=[packageName] -DartifactId=[projectName]
mvn eclipse:eclipse -DdownloadSources.
1. parent
2. distributionManagement
3. scm
Project under an existing project:
Using the command line, enter the following in the root of the parent project
mvn archetype:create -DgroupId=[packageName] -DartifactId=[projectName]
svn add 'projectName'
svn commit [projectName] pom.xml
mvn eclipse:eclipse -DdownloadSources
http://i-proving.com/2007/05/10/How-to-Determine-the-Maven-dependency-to-use-for-a-jar/ :
$ md5sum commons-collections.jar
$ openssl dgst -md5 commons-collections.jar
$ openssl dgst -sha commons-collections.jar
mvn deploy:deploy-file -Dfile=<the file to deploy> \
-Durl=<url to your repository> \
-Dpackaging=jar \
-DrepositoryId=<the repositoryID> \
-DpomFile=<path to your pom.xml file>
$ openssl dgst -md5 commons-collections.jar
$ openssl dgst -sha commons-collections.jar
mvn deploy:deploy-file -Dfile=<the file to deploy> \
-Durl=<url to your repository> \
-Dpackaging=jar \
-DrepositoryId=<the repositoryID> \
-DpomFile=<path to your pom.xml file>
http://i-proving.com/2007/03/29/Split-Your-Project-Into-Sub-Projects/ :+-- workspace/
+-- myproject/
| +-- pom.xml --IMP: please refer link for contents. Note <packaging>pom</packaging> +-- subproject-1/ | +-- pom.xml +-- subproject-2/ +-- pom.xmlThe myproject pom makes myproject your "one stop shopping" location for running mvn goals such as install or release or eclipse:eclipseIf subproject-1 pom has
<groupId>ca.intelliware</groupId> <artifactId>subproject-1</artifactId> <version>1.0-SNAPSHOT</version>and if subproject-2 consumes subproject-1 as a dependencythen
<dependencies> <dependency> <groupId>ca.intelliware</groupId> <artifactId>subproject-1</artifactId> <version>1.0-SNAPSHOT</version> </dependency> </dependencies>eclipse:eclipse goal behaviour:If dependency.SNAPSHOT: subproject-2 should reference the Eclipse project for subproject-1 as a project dependency in its Java build pathelse if dependency.RELEASE: Eclipse project that gets generated by the eclipse:eclipse will simply refer to the released version of the JAR in your M2_REPO repository
1. mvn archetype:create -DartifactId=myNewProject -DgroupId=ca.intelliware2. cd myNewProject3. mvn archetype:create -DartifactId=myNewSubProject-i -DgroupId=ca.intelliware4. cd ..5. mv myNewProject/myNewSubProject-i ./myNewSubProject-i6. Edit myNewProject.POM<modules> <module>../myNewSubProject-1</module> <module>../myNewSubProject-2</module> </modules>7. mvn -DdownloadSources=true eclipse:eclipseSPLITTING PROJECT: foobar->{foo,bar}1. Rename foobar as foo2. mvn archetype:create -DartifactId=foobar -DgroupId=ca.intelliwareEdit foobar.POM.packaging to "pom"3. cd foobar4. mvn archetype:create -DartifactId=bar -DgroupId=ca.intelliware5. cd ..6. mv foobar/foo ./foo7. Edit foo.POM.artifactId to foo8. Copy bar.POM.parent to foo.POM.parent9. Edit foobar.POM<modules> <module>../foo</module> <module>../bar</module> </modules>10. Move code you want to split from foo to bar11. mvn eclipse:eclipseThats it for now!!!
C:\>mvn install:install-file -Dfile=utils.jar -DgroupId=com.zparacha.example -DartifactId=utils -Dversion=1.0 -Dpackaging=jar
Just a quick update, the i-proving.cas should be http://i-proving.com/ 's:)
ReplyDeleteLinks are fixed now.
DeleteThanks for pointing out.