...
The default directory structure is actually defined in the Maven 2 "Super POM" file, which all Maven 2 POM objects inherit from. Here is the GLAST directory structure for Maven 2 projects:
...
artifactId/ |
---|
...
project directory | |||||
---|---|---|---|---|---|
| – .cvsignore | contains files that are local to build: target, profiles.xml, etc | |||
| – pom.xml | POM file | |||
| – profiles.xml | local, user and project dependent profile definitions; this should not be version controlled | |||
| – LICENSE.txt | license of the project | |||
| – README.txt | welcome to the reader | |||
| – src/ | original src material; this should be version controlled | |||
|
| – main/ | the original material for the artifact | ||
|
|
| – java | root of main Java source; will be compiled into target/classe | |
|
|
| – resources/ | main Java resources; will be copied into target/classes | |
|
|
| – webapp/ | web application with standard web application structure | |
|
|
| – WEB-INF/ |
| |
|
|
| `-- web.xml |
| |
|
| `-- index.jsp |
| ||
|
|
| – assembly/ |
| |
|
| `-- dep.xml | assembly descriptor for maven-assembly-plugin | ||
|
|
| – filters/ | resource filter properties files for main Java resources | |
|
|
| – config/ | configuration files for the artifact | |
|
|
| – bash/ | sources in other technologies for the artifact | |
|
|
| – python/ | ||
|
|
| – sql/ | ||
|
| – site/ | project documentation in different formats; mvn site will produce a project website in target/site based on this material and structure (Doxia) | ||
|
|
| – fml/ | documentation in FML format (XML based FAQ format) | |
|
|
| `-- faq.fml | ||
|
|
| – resources/ |
| |
|
|
|
| – css/ |
|
|
|
|
| – img/ |
|
|
|
| `-- js/ | site resources; will be copied into target/site as-is | |
|
|
| – site.xml | site descriptor: description of site structure; this will generate menus | |
|
| `-- xdoc/ |
| ||
|
| `-- xdoc.xml | documentation in Xdoc format (XML based HTML generation; maven 1 legacy) | ||
| `-- test/ | original material to test the artifact | |||
|
| – java/ | root of Java source for testing the artifact; usually JUnit test classes; will be compiled into target/test-classes | ||
|
| – resources/ | resources for testing the artifact; will be copied into target/test-classes | ||
|
| – filters/ | resource filter properties files for resources for testing the artifact | ||
|
| – python/ | sources in other technologies for testing the artifact | ||
`-- target/ | generated material; this should not be under version control | ||||
| – artifactId-version.jar | generated artifact | |||
| – classes/ | result of compilation of src/main/java and copy of src/main/resources | |||
| – exported-pom.xml | consolidated POM | |||
| – javadoc/ | javadoc of src/main/java | |||
| – site/ | project site generated by mvn site | |||
| – surefire-reports/ | test reports | |||
| – test-classes/ | result of compilation of src/test/java and copy of src/test/resources | |||
`-- announcement/ | |||||
`-- announcement.vm | org.codehaus.mojo:changelog-maven-plugin |
...
generates |
...
announcement |
...
...
here |
...
2. Maven 2 project file pom.xml
...
Code Block |
---|
maven.netbeans.exec.run=webReload maven.netbeans.exec.build=war:war tomcat01.properties: maven.repo.remote =http://mirrors.ibiblio.org/pub/mirrors/maven,http://java.freehep.org/maven,http://glast-ground.slac.stanford.edu/maven,http://www.codeczar.com/maven maven.tomcat.host=glast-tomcat01.slac.stanford.edu maven.tomcat.port=8080 maven.tomcat.username=glast maven.tomcat.password=... maven.tomcat.precompile=false maven.compile.compilerargs=-Xlint:unchecked maven.tomcat.war.context=/dp2 maven.war.src=src/main/webapp maven.war.final.name=dp2.war |
Code Block |
---|
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.2
build:start:
war:init:
war:war-resources:
mkdir Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager
mkdir Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF
copy Copying 15 files to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager
copy Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF
java:prepare-filesystem:
mkdir Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/classes
java:compile:
echo Compiling to /Users/igor/work/java/glast/org-glast-groupmanager/target/classes
javac Compiling 6 source files to /Users/igor/work/java/glast/org-glast-groupmanager/target/classes
java:jar-resources:
Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/classes
test:prepare-filesystem:
mkdir Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/test-classes
mkdir Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/test-reports
test:test-resources:
test:compile:
echo No test source files to compile.
test:test:
echo No tests to run.
war:webapp:
echo Assembling webapp org-glast-groupmanager
mkdir Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
mkdir Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/tld
mkdir Created dir: /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/classes
copy Copying 1 file to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/lib
...
copy Copying 11 files to /Users/igor/work/java/glast/org-glast-groupmanager/target/org-glast-groupmanager/WEB-INF/classes
war:war:
echo Building WAR org-glast-groupmanager
jar Building jar: /Users/igor/work/java/glast/org-glast-groupmanager/target/GroupManager.war
BUILD SUCCESSFUL
Total time: 4 seconds
Finished at: Thu Nov 29 15:59:57 PST 2007
|