在子maven pom.xml中过滤依赖性资源文件

时间:2018-03-20 12:06:12

标签: maven maven-assembly-plugin maven-resources-plugin

我有一个父pom.xml,它从build.xml模块加载一个汇编xml文件(build-tools):

<plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>3.1.0</version>
    <dependencies>
        <dependency>
            <groupId>com.company</groupId>
            <artifactId>build-tools</artifactId>
            <version>1.2.7-SNAPSHOT</version>
        </dependency>
    </dependencies>
    <executions>
        <execution>
            <id>build</id>
            <phase>package</phase>
            <goals>
                <goal>single</goal>
            </goals>
            <configuration>
                <descriptorRefs>
                    <descriptionRef>build</descriptionRef>
                </descriptorRefs>
            </configuration>
        </execution>
    </executions>
</plugin>

build.xml文件使用maven属性分隔符,例如:${output.build.directory}

在使用父pom的子项目中,我想替换ng-build.xml文件的分隔变量。

我该怎么做?

如果来自外部依赖,maven似乎不会运行分隔符替换。

0 个答案:

没有答案