antrun-plugin不调用build.xml文件吗?

时间:2018-12-03 12:09:49

标签: maven maven-antrun-plugin

当尝试使用antrun插件时,目标视图为红色文本,并且在构建过程中未调用目标。

               <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <id>construct-build</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <target>
                                <echoproperties/>
                                <!-- Вызов build.xml с передачей зависимостей сборки в переменной maven.plugin.classpath -->
                                <ant antfile="build.xml" target="build" inheritRefs="true"/>
                            </target>
                        </configuration>
                    </execution>
                </executions>
                 <!--Зависимости сборки -->
            </plugin>

因此,在build.xml中,我具有echo和目标,但没有人打电话给

enter image description here

build.xml是

<project name="App">
    <target name="properties">
        <echoproperties/>
    </target>
    <target name="package" depends="init">
        <mkdir dir="${project.build.directory}/AAA"/>
    </target>
</project>

和位于pom.xml旁边的build.xml

0 个答案:

没有答案