复制单个文件然后使用maven-resources-plugin重命名 - 可能吗?

Wit*_*eld 5 maven maven-resources-plugin

我使用maven-resources-plugin从不同的项目树复制单个WSDL文件,如下所示:

<execution>
    <id>copy-wsdl-and-rename-it</id>
    <phase>validate</phase>
    <goals>
        <goal>copy-resources</goal>
    </goals>
    <configuration>
        <outputDirectory>${basedir}/src/main/wsdl</outputDirectory>
        <resources>
            <resource>
                <directory>${basedir}/../myws/src/main/wsdl</directory>
                <filtering>true</filtering>
            </resource>
        </resources>
    </configuration>
</execution>
Run Code Online (Sandbox Code Playgroud)

这很好用,但现在我需要将该wsdl目录下的(单个)文件重命名为其他内容(例如,从myws.wsdl源目录到my.wsdl目标目录).

有没有办法实现这一点,使用maven-resources-plugin,而不是诉诸另一个插件?

Dan*_*lan 4

我看不出有什么方法可以完全满足您的要求。 为什么你有不能使用其他插件的限制?如果您改变主意,答案是:Renameing resources in Maven