Question

I copy a single WSDL file from a different project tree, using maven-resources-plugin, as follows:

<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>

This works well, but now I need to rename the (single) file under that wsdl directory to something else (e.g. from myws.wsdl in the source directory to my.wsdl in the destination directory).

Is there a way to accomplish this, using the maven-resources-plugin, without resorting to another plugin?

Was it helpful?

Solution

I don't see a way to do exactly what you're asking for. Why do you have the restriction of not using another plugin? If you change your mind about that here's the answer: Renaming resources in Maven

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top