Maven

From AardRock Wiki
Revision as of 07:47, 6 June 2006 by Chris (talk | contribs) (Added more information about installing and fixed some things)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

How to build and work on Cheetah using Maven

   <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 (probably aardrock-cheetah-core), and execute mvn 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
  • 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.

How to deploy the site

When you go to the "aardrock-cheetah-core" module, you can do a mvn deploy-site and the site will be generated and put online.