【问题标题】:How to bind ant to a maven-plugin custom goal如何将 ant 绑定到 maven-plugin 自定义目标
【发布时间】:2016-02-01 06:55:30
【问题描述】:

maven和ant集成的方式就是像maven-antrun-plugin一样简单的使用

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.6</version>
    <executions>
        <execution>
            <id>package</id>                        
            <phase>package</phase>
            <configuration>
                <tasks>             
        <ant antfile="build.xml" target="package" />
      </tasks>
    </configuration>
            <goals>
                <goal>run</goal>
            </goals>
        </execution>
    </executions>
</plugin>

在项目的 pom.xml 文件中

但是,我希望能够将关联的 build.xml 脚本与执行配置一起作为定义自定义打包和生命周期的 maven 插件的一部分。

有没有办法做到这一点?

【问题讨论】:

    标签: maven ant maven-antrun-plugin


    【解决方案1】:

    我不久前写了一个实验来做到这一点。看看 jslint4java 的 maven-plugin-in-ant 分支。

    【讨论】:

      猜你喜欢
      • 2015-02-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-11-05
      • 1970-01-01
      相关资源
      最近更新 更多