如何配置copy-flex-resources
目标和swf
依赖项以将swf文件复制到我的网络应用程序中的自定义文件夹?默认情况下,它会复制到web-app根目录。
有关copy-flex-resources
目标的更多信息,请点击此处:
https://docs.sonatype.org/display/FLEXMOJOS/Copy+Flex+Resources
答案 0 :(得分:0)
您可以为该插件添加“配置”:
<configuration>
<webappDirectory>${basedir}/src/main/webapp</webappDirectory>
<!-- If RSLs are coming from the WAR uncomment this line
<copyRSL>false</copyRSL>-->
</configuration>
答案 1 :(得分:0)
我使用maven-antrun-plugin从几个子项目中复制几个swfs (可能有更好的方法,但它确实有效)
<plugin> <artifactId>maven-antrun-plugin</artifactId> <executions> <execution> <phase>process-resources</phase> <goals> <goal>run</goal> </goals> <configuration> <tasks> <move file="${project.build.directory}/${project.build.finalName}/mySwf-${project.version}.swf" tofile="${project.build.directory}/${project.build.finalName}/somedir/mySwf.swf" /> </tasks> </configuration> </execution> </executions> </plugin>
答案 2 :(得分:0)
对于war项目,maven-dependency-plugin是一个更好的选择。它可以将不同的资源复制到不同的位置,并与依赖项中声明的版本保持同步。
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.0</version>
<executions>
<execution>
<id>copy-content</id>
<phase>compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.foo.bar</groupId>
<artifactId>barstyles</artifactId>
<type>swf</type>
<outputDirectory>${flashAppDir}/bar</outputDirectory>
<destFileName>barstyles.swf</destFileName>
</artifactItem>
<artifactItem>
<groupId>org.graniteds</groupId>
<artifactId>graniteds</artifactId>
<type>swf</type>
<outputDirectory>${flashAppDir}/thirdparty</outputDirectory>
<destFileName>graniteds.swf</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>