On 30 January 2012 19:01, Michael Norman <michael.nor...@oracle.com> wrote:

>  Running maven 3.0.4 via m2e (Maven Integration for Eclipse version
> 1.0.100.20110804-1717).
> Here is my pom.xml file:
>     <properties>
>       <maven-surefire-plugin.version>2.11</maven-surefire-plugin.version>
>
> <maven-surefire-report-plugin.version>2.11</maven-surefire-report-plugin.version>
>       <jxr-maven-plugin.version>2.3</jxr-maven-plugin.version>
>     </properties>
>
>     <dependencies>
>       <dependency>
>         <groupId>junit</groupId>
>         <artifactId>junit</artifactId>
>         <version>4.8.2</version>
>         <scope>test</scope>
>       </dependency>
>     </dependencies>
>
>     <build>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-surefire-plugin</artifactId>
>           <version>${maven-surefire-plugin.version}</version>
>           <executions>
>             <execution>
>               <id>test</id>
>               <phase>test</phase>
>               <configuration>
>                   <forkMode>once</forkMode>
>                   <redirectTestOutputToFile>true</redirectTestOutputToFile>
>                   <includes>
>                       <include>**/AllTests.java</include>
>                   </includes>
>               </configuration>
>               <goals>
>                 <goal>test</goal>
>               </goals>
>             </execution>
>           </executions>
>         </plugin>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-surefire-report-plugin</artifactId>
>           <version>${maven-surefire-report-plugin.version}</version>
>           <executions>
>             <execution>
>               <id>generate-test-report</id>
>               <phase>test</phase>
>               <goals>
>                 <goal>report</goal>
>               </goals>
>             </execution>
>           </executions>
>         </plugin>
>       </plugins>
>     </build>
>
>     <reporting>
>       <plugins>
>         <plugin>
>           <groupId>org.apache.maven.plugins</groupId>
>           <artifactId>maven-surefire-report-plugin</artifactId>
>           <version>${maven-surefire-report-plugin.version}</version>
>         </plugin>
>         <plugin>
>           <groupId>org.codehaus.mojo</groupId>
>           <artifactId>jxr-maven-plugin</artifactId>
>           <version>${jxr-maven-plugin.version}</version>
>         </plugin>
>       </plugins>
>     </reporting>
>
> When I run 'mvn compile compiler:testCompile test', everything works (see
> attach'd log)
>

OT,

You do understand how the Maven lifecycle works?

You do understand that you should just be doing "mvn test"

as

1. test is farther along the lifecycle than compile, so you are just
running up to compile twice in a row
2. compiler:testCompile is bound to the test-compile phase of the
lifecycle, which is helpfully before the test phase of the lifecycle


> but in the 'target/site' directory, the surefire-report.html does not
> render very nicely because
> of the missing files under 'target/site/css' and 'target/site/images'
>
> I've seen some discussion about this as part of issue 
> SUREFIRE-616<http://jira.codehaus.org/browse/SUREFIRE-616>,
> but I'm not sure if
> there is a fix other than adding the 'site' goal to the mvn invocation.
> This generates about
> a ~dozen or so files/directories, so its a bit overkill.
>
> --
> [image: Oracle] <http://www.oracle.com>
> Mike Norman | Principal Software Designer
> Phone: +6132884638 | Fax: +6132382818
> Server Technologies | EclipseLink Product
> Oracle Canada | 45 O'Connor Street, Suite 400, Ottawa, Ontario | K1P 1A4
> [image: Hardware and Software, Engineered to Work 
> Together]<http://www.oracle.com>
> [image: Oracle is committed to developing practices and products that help
> protect the environment] <http://www.oracle.com/commitment>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>

Reply via email to