该项目由Ant构建,现在我们使用Maven。
错误是
"发生了Ant BuildException:使用refid时不得指定嵌套元素。"
pom.xml
是:
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>aopmetrics-on-aopmetrics</id>
<phase>package</phase>
<configuration>
<tasks>
<taskdef name="aopmetrics" classname="org.tigris.aopmetrics.AopMetricsTask">
<classpath refid="maven.compile.classpath"/>
<classpath refid="maven.test.classpath"/>
<classpath location="${project.build.directory}/${project.build.finalName}.jar"/>
</taskdef>
<aopmetrics workdir="${project.build.directory}/work" sourcelevel="1.5" export="xls"
resultsfile="${project.build.directory}/aop-metrics-results.xls">
<fileset dir="src/main/java" includes="**/*.java"/>
<fileset dir="src/test/java" includes="**/*.java"/>
<classpath refid="maven.compile.classpath"/>
<classpath refid="maven.test.classpath"/>
</aopmetrics>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>