Java Reference
In-Depth Information
</configuration>
</plugin>
</configuration>
</plugin>
The first plugin listed is the compiler plug-in, which is used to configure the Java compiler.
Here, the plug-in is configured to compile our source code into the Java 6 bytecode format:
<plugin>
<plugin>
<groupId>
<groupId> org.apache.maven.plugins </groupId>
</groupId>
<artifactId>
<artifactId> maven-surefire-plugin </artifactId>
</artifactId>
<configuration>
<configuration>
<skip>
</skip>
</configuration>
<skip> true </skip>
</configuration>
<executions>
<executions>
<execution>
<execution>
<id>
<id> surefire-it </id>
</id>
<phase>
<phase> integration-test </phase>
</phase>
<goals>
<goals>
<goal>
<goal> test </goal>
</goal>
</goals>
</goals>
<configuration>
<configuration>
<skip>
</skip>
</configuration>
<skip> false </skip>
</configuration>
</execution>
</execution>
</executions>
</executions>
</plugin>
</plugin>
The next plug-in we need to configure is surefire-it . This plug-in controls how our test
execution works. By default, Maven will compile the source code under src/main/java and
src/test/java and then try to run the tests under src/test/java . If the tests succeed, it packages
the .class files into a WAR or JAR file. In our case, though, we want to create a WAR file
and deploy it to the Jetty-embedded servlet container before we run our test code. The
surefire-it configuration listed tells Maven not to run the test code until the WAR file has
been built and deployed to Jetty:
<plugin>
<plugin>
<groupId>
<groupId> org.mortbay.jetty </groupId>
</groupId>
<artifactId>
<artifactId> jetty-maven-plugin </artifactId>
</artifactId>
<version>
<version> 8.1.11.v20130520 </version>
</version>
<configuration>
<configuration>
<webApp>
<webApp>
<contextPath>
<contextPath> / </contextPath>
</contextPath>
</webApp>
</webApp>
<scanIntervalSeconds>
<scanIntervalSeconds> 10 </scanIntervalSeconds>
</scanIntervalSeconds>
<stopKey>
<stopKey> foo </stopKey>
</stopKey>
<stopPort>
<stopPort> 9999 </stopPort>
</stopPort>
Search WWH ::




Custom Search