0

如何配置copy-flex-resources目标和swf依赖项以将 swf 文件复制到我的网络应用程序中的自定义文件夹?默认情况下,它会复制到 web-app 根目录。

更多关于copy-flex-resources目标的信息: https ://docs.sonatype.org/display/FLEXMOJOS/Copy+Flex+Resources

4

3 回答 3

0

您可以向该插件添加“配置”:

<configuration> 
    <webappDirectory>${basedir}/src/main/webapp</webappDirectory> 
    <!-- If RSLs are coming from the WAR uncomment this line 
    <copyRSL>false</copyRSL>--> 
</configuration> 
于 2010-09-16T07:42:33.210 回答
0

对于战争项目,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>
于 2012-11-28T23:22:24.260 回答
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>
于 2010-12-10T10:37:54.747 回答