1

pom でプラグインを構成した maven プロジェクトに emma レポートを追加したい:

<plugins>     
  <plugin>      
    <groupId>org.codehaus.mojo</groupId>
    <artifactId>emma-maven-plugin</artifactId>
    <version>1.0-alpha-3</version>
    <inherited>true</inherited>          
    <executions>
      <execution>
        <phase>process-classes</phase>               
        <goals>
          <goal>instrument</goal>
        </goals>
      </execution>
    </executions>
  </plugin>
  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <inherited>true</inherited>
    <configuration>
      <forkMode>once</forkMode>
      <reportFormat>xml</reportFormat>
      <classesDirectory>${project.build.directory}/generated-classes/emma/classes</classesDirectory>    
    </configuration>        
  </plugin>
</plugins>

mvn clean install を実行すると

次のエラーが表示されます

[INFO] Compiling 58 source files to target/test-classes
 INFO] -------------------------------------------------------------
 [ERROR] COMPILATION ERROR : 
 [INFO] -------------------------------------------------------------
 [ERROR]  src/test/java/project/testframework/junit/support/SupportInvoker.java:[80,21] cannot access org.springframework.core.env.EnvironmentCapable
 class file for org.springframework.core.env.EnvironmentCapable not found
                                    supports.add(ctx.getBean(support));
 [ERROR] src/test/java/project/testframework/mockwebcontext/MockWebApplicationContextLoader.java:[37,72] cannot access org.springframework.beans.factory.Aware
 class file for org.springframework.beans.factory.Aware not found
                            final DispatcherServlet dispatcherServlet = new DispatcherServlet() {
 [ERROR] src/test/java/project/testframework/mockwebcontext/MockWebApplicationContextLoader.java:[38,24] method does not override or implement a method from a supertype

emma なしで mvn clean install を実行すると、すべてエラーなしで動作します。eclipse プラグインを使用して emma を実行できますが、これも同様に機能しますが、maven から emma を動作させることができません。

何か案は ??

4

0 に答える 0