9

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?

Stijn de Witt
  • 40,192
  • 13
  • 79
  • 80
Withheld
  • 4,603
  • 10
  • 45
  • 76

1 Answers1

4

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

Community
  • 1
  • 1
Daniel Kaplan
  • 62,768
  • 50
  • 234
  • 356
  • 1
    The restriction is in order to minimize the number of plugins, as each has its own set of rules, idiosyncrasies and bugs, plus the combination of those is not always predictable. Just like adding browser plugins increases security holes... the fewer the better. I will wait for a way to do this using the same plugin and +1 for at least suggesting some way of accomplishing this. – Withheld Dec 10 '13 at 17:56