15 | | Maybe you will have memory problems executing some of the commands for example mvn site. One of the solutions is to set your MAVEN_OPTS variable to -Xmx1024m -XX:MaxPermSize=256m -Xss16m |
| 15 | If you want to skip the tests in the project while building and don't need their results(or the resulted test reports), add '-Dmaven.test.skip=true' in the end of the command you execute. |
| 16 | |
| 17 | Maven 2 introduces the concept of a build profile. Profiles are specified using a subset of the elements available in the POM itself (plus one extra section), and are triggered in any of a variety of ways. They modify the POM at build time, and are meant to be used in complementary sets to give equivalent-but-different parameters for a set of target environments. We have two profile sections defined in our project and they are: |
| 18 | * hudson profile - used for hudson build server (sophie2.org:8080) to generate various reports and their needed maven goals(on this time only the cobertura report is generated using this profile) |
| 19 | * jspcompile - used for compiling the jsp, used by Sophie 2 server. The command is 'mvn -Djspcompile [maven-goal]' -Dmaven.test.skip=true. See [wiki:S2S_TESTING_SERVER_R0] for more information. |
| 20 | |
| 21 | Note: Maybe you will have memory problems executing some of the commands for example mvn site. One of the solutions is to set the MAVEN_OPTS variable to -Xmx1024m -XX:MaxPermSize=386m -Xss16m |
21 | | To generate the reports you want you should add the report plug-ins you need into the reporting section at the end of the pom.xml file. [[BR]] |
| 28 | To generate the reports you want you should add the report plug-ins you need into the reporting section at the end of the pom.xml file. |
| 29 | For example this code in the base pom.xml installs the maven-javadoc-plugin and generate javadoc reports using the variables in the configuration section while executing 'mvn site' command: |
| 30 | {{{ |
| 31 | <plugin> |
| 32 | <groupId>org.apache.maven.plugins</groupId> |
| 33 | <artifactId>maven-javadoc-plugin</artifactId> |
| 34 | <configuration> |
| 35 | <sourcepath>${basedir}/src/main/java</sourcepath> |
| 36 | <javadocVersion>1.5</javadocVersion> |
| 37 | <fork>true</fork> |
| 38 | <failOnError>false</failOnError> |
| 39 | </configuration> |
| 40 | </plugin> |
| 41 | }}} |
| 42 | |
| 43 | See http://docs.codehaus.org/display/MAVENUSER/Reporting+Plugins to get into. |
| 44 | |