Question

Currently I'm working on a maven build script and my next issue is to copy source files into a target folder. I found this thread and it works fine unless I don't use the 'flattern' attribute. I know that the computer makes all things right, but I wonder why the build will fail.

Here my code using the maven antrun plugin:

<build>
 <plugins>
  <plugin>
    <artifactId>maven-antrun-plugin</artifactId>
    <version>1.7</version>
    <executions>
     <execution>
      <phase>process-resources</phase>
      <configuration>
       <target>
        <copy todir="${project.basedir}/target"  flattern="true" overwrite="true">
         <fileset dir="${project.basedir}/src/main"/>
        </copy>
       </target>
      </configuration>
      <goals>
       <goal>run</goal>
      </goals>
     </execution>
    </executions>
  </plugin>
 </plugins>
</build>

The error message I get is

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run (default) on project setup_core: An Ant BuildException has occured: copy doesn't support the "flattern" attribute
[ERROR] around Ant part ...<copy todir="C:\Projekte\CQ5_Migration\setup\core_upload/target" overwrite="true" flattern="true">... @ 4:101 in C:\Projekte\CQ5_Migration\setup\core_upload\target\antrun\build-main.xml: The <copy> type doesn't support the "flattern" attribute.
[ERROR] -> [Help 1]

Have I overseen somthing and if so what is/are the missing fact(s)?

Thanks again for your help :-)

Was it helpful?

Solution

It should be "flatten" not "flattern".

Remove the 'r'.

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