Difference between revisions of "Maven"
Jump to navigation
Jump to search
(Added something about testing) |
|||
Line 21: | Line 21: | ||
</activeProfiles> | </activeProfiles> | ||
</settings> | </settings> | ||
* Go the the directory you checked out, and do <code>mvn install</code>. Go to the subdirectory of your choice (probably <code>aardrock-cheetah-core</code>), and execute <code>mvn eclipse:eclipse</code>. Now the Eclipse-files will be generated. | * Go the the directory you checked out, and do <code>mvn install</code>. Go to the subdirectory of your choice (probably <code>aardrock-cheetah-core</code>), and execute <code>mvn eclipse:eclipse</code>. Now the Eclipse-files will be generated. | ||
* Create a new (blank) workspace in Eclipse | * Create a new (blank) workspace in Eclipse | ||
Line 34: | Line 35: | ||
** Click Finish and start editing! | ** Click Finish and start editing! | ||
== Seeing your changes == | |||
In Eclipse, you can just run <code>aardrock.cheetah.CheetahCore</code> as a java application. | |||
Before you commit your changes, do a <code>mvn test</code>. This will do all Unit Tests in src/test/java. This will also generate output in <code>target/surefire-reports/</code>. You can see the XML or the text-file for detailed output. | |||
'''Important''': when you commit your changes, don't commit the generated files in the <code>target</code> directories, and also don't commit the generated files for Eclipse. |
Revision as of 12:08, 24 May 2006
How to build and work on Cheetah using Maven
- Make sure Maven is installed on your computer. This is currently not the case at the computers in the BBL.
- Checkout https://www.aardrock.com/repos/cheetah/maven to a directory
- Edit the settings.xml in your home-directory, and make sure it contains at least this:
<settings> <profiles> <profile> <id>internal</id> <repositories> <repository> <id>internal-release</id> <name>Internal Release</name> <url>http://cheetah.aardrock.com/maven-repos</url> </repository> </repositories> </profile> </profiles> <activeProfiles> <activeProfile>internal</activeProfile> </activeProfiles> </settings>
- Go the the directory you checked out, and do
mvn install
. Go to the subdirectory of your choice (probablyaardrock-cheetah-core
), and executemvn eclipse:eclipse
. Now the Eclipse-files will be generated. - Create a new (blank) workspace in Eclipse
- Add your m2-repository to the classpath:
- From the menu bar, select Window > Preferences. Select the Java > Build Path > Classpath Variables page.
- Click on New, add "M2_REPO" as the name and browse for your path.
- On windows this is probably
C:\Documents and Settings\username\.m2\repository
. - On Unix this is
~/.m2/repository
- On windows this is probably
- Finally, import the project in your empty workspace:
- File > Import
- Choose "Existing Projects into Workspace", click "Next"
- Browse for the Root Directory, select the directory "aardrock-cheetah". Here, the project will appear.
- Click Finish and start editing!
Seeing your changes
In Eclipse, you can just run aardrock.cheetah.CheetahCore
as a java application.
Before you commit your changes, do a mvn test
. This will do all Unit Tests in src/test/java. This will also generate output in target/surefire-reports/
. You can see the XML or the text-file for detailed output.
Important: when you commit your changes, don't commit the generated files in the target
directories, and also don't commit the generated files for Eclipse.