3

私はMavenのAntでAntでjunitreportタスクを実行しようとしています:

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions combine.children="append">
                <execution>
                    <id>reporting</id>
                    <phase>compile</phase><!--post-integration-test-->
                    <goals><goal>run</goal></goals>
                    <configuration>
                        <target>
                            <ant antfile="${basedir}/../tools/report/buildReports.xml">
                                <!--<property name="reports.dest.dir" value=""/>-->
                                <target name="reports"/>
                            </ant>
                        </target>
                    </configuration>
                </execution>
            </executions>
            <dependencies>
                <dependency>
                    <groupId>org.apache.ant</groupId>
                    <artifactId>ant-antunit</artifactId>
                    <version>1.2</version>
                </dependency>
                <dependency>
                    <groupId>ant-contrib</groupId>
                    <artifactId>ant-contrib</artifactId>
                    <version>1.0b2</version>
                </dependency>
            </dependencies>
        </plugin>

しかし、私はこれを得ています:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.6:run (reporting) on project jboss-as-testsuite-integration: An Ant BuildException has occured:     The following error occurred while executing this line:
[ERROR] /home/ondra/work/AS-7/ozizka-as7/testsuite/tools/report/buildReports.xml:42: Problem: failed to create task or type junitreport
[ERROR] Cause: the class org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator     was not found.
[ERROR] This looks like one of Ant's optional components.
[ERROR] Action: Check that the appropriate optional JAR exists in
[ERROR] -ANT_HOME/lib
[ERROR] -the IDE Ant configuration dialogs

何を追加すればよいですか?

4

1 に答える 1

3

おっとっと。クラスは実際には存在しませんでした-それはant-junitにありました。したがって、必要な依存関係は次のとおりです。

                <dependency>
                    <groupId>ant</groupId>
                    <artifactId>ant-junit</artifactId>
                    <version>1.6.5</version>
                </dependency>
于 2011-10-17T03:08:42.440 に答える