目前我正在研究一个 Maven 构建脚本,我的下一个问题是将源文件复制到目标文件夹中。我找到了这个线程,它工作正常,除非我不使用“flattern”属性。我知道计算机使所有事情都正确,但我想知道为什么构建会失败。
这是我使用 maven antrun 插件的代码:
<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>
我得到的错误信息是
[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]
我是否监督过某事,如果有,缺少的事实是什么?
再次感谢你的帮助 :-)