我正在尝试使用副本将依赖的rsls复制到战争中 flex-resources插件。但是我收到以下错误:
[错误]无法执行目标org.sonatype.flexmojos:flexmojos-maven- 插件:3.8:项目smh上的copy-flex-resources(copy-flex-resources): 找不到com.adobe.flex.fram textLayout:https://repository.sonatype.org/content/groups/flexgroup中的swz:4.1.0.16076 被缓存在本地存储库中,不会重新尝试解析 直到更新 sonatype-flex-repository的val已经过去或强制更新 ............ [错误]然后,使用以下命令安装它: [错误] mvn install:install-file -DgroupId = com.adobe.flex.framework - DartifactId = textLayout -Dversion = 4.1.0.16076 -Dpackaging = swz -Dfile = / 路径/到/文件
我已经浏览了这些链接 http://groups.google.com/group/flex-mojos/browse_thread/thread/6f47b2980275aaeb http://groups.google.com/group/flex-mojos/browse_thread/thread/2aa96d8d69e1ddb5 https://repository.sonatype.org/content/sites/maven-sites/flexmojos/3.8/copy-flex-resources-mojo.html
我已按照中的规定列出了poms https://docs.sonatype.org/pages/viewpage.action?pageId=7045277
为解决上述问题,我将swz文件安装到本地 存储库使用 mvn install:install-file -DgroupId = com.adobe.flex.framework - DartifactId = textLayout -Dversion = 4.1.0.16076 -Dpackaging = swz - Dfile = textLayout_1.1.0.604.swz (这的副作用是覆盖了现有的pom配置 存储库)
然后运行mvn编译。我收到以下错误
[错误]无法执行目标org.sonatype.flexmojos:flexmojos-maven- 插件:3.8:项目smh上的copy-flex-resources(copy-flex-resources): 无法复制C:\ Users \ bharadke.m2 \ repository \ com \ adobe \ flex \ framework \ textLayout \ 4.1.0.16076 \ textLayout-4.1.0.16076.swz:The 文件名,目录名或卷标语法不正确 - > [救命 1]
以下是我的pom.xml代码段 1. flex project pom:
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flex-mojos-plugin.version}</version>
<extensions>true</extensions>
<executions>
</executions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<configuration>
<policyFileUrls>
<url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
<url>http://fpdownload.adobe.com/pub/swz/crossdomain.xml</url>
</policyFileUrls>
<rslUrls>
<url>http://fpdownload.adobe.com/pub/swz/flex/$
{flex.sdk.version}/{artifactId}_{version}.{extension}</url>
<url>http://fpdownload.adobe.com/pub/swz/tlf/1.1.0.604/
{artifactId}_1.1.0.604.{extension}</url>
</rslUrls>
<keepAllTypeSelectors>true</keepAllTypeSelectors>
<contextRoot>/abc</contextRoot>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- Dynamically load the Adobe signed RSL framework instead of merging into SWF. -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>textLayout</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<!-- OSMF SWC would go here. -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>framework</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>spark</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>sparkskins</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>rpc</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>datavisualization</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<!-- Flex framework resource bundles -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.puremvc.pipes</groupId>
<artifactId>Utility_AS3_MultiCore_Pipes</artifactId>
<version>1.1</version>
<type>swc</type>
<scope>rsl</scope>
</dependency>
<dependency>
<groupId>org.puremvc.multicore</groupId>
<artifactId>PureMVC_AS3_MultiCore</artifactId>
<version>1.0.5</version>
<type>swc</type>
<scope>rsl</scope>
</dependency>
2. web-application pom :
<build>
<finalName>foo</finalName>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flex-mojos-plugin.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<phase>compile</phase>
<id>copy-flex-resources</id>
<goals>
<goal>copy-flex-resources</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
</dependency>
</dependencies>
<configuration>
<stripVersion>true</stripVersion>
<copyRSL>true</copyRSL>
</configuration>
</plugin>
</plugins>
</build>
我已经解决了这个问题,但无法找到解决方案。 非常感谢任何帮助
更新1: @J_A_X,我以某种方式使用4.0-RC1的组合并纠正pom。但还有另一个问题。 我添加的自定义依赖项如
<dependency>
<groupId>org.puremvc.pipes</groupId>
<artifactId>Utility_AS3_MultiCore_Pipes</artifactId>
<version>1.1</version>
<type>swc</type>
<scope>rsl</scope>
</dependency>
<dependency>
<groupId>org.puremvc.multicore</groupId>
<artifactId>PureMVC_AS3_MultiCore</artifactId>
<version>1.0.5</version>
<type>swc</type>
<scope>rsl</scope>
</dependency>
没有被复制。得到以下错误
[错误]无法在项目smh上执行目标org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources(copy-flex-resources):目标执行copy-flex-resources org.sonatype.flexmojos:flexmojos-maven-plugin:4.0-RC1:copy-flex-resources failed:无法解析工件com.hp.ci:ci-ui-lib:swf:0.0.1-SNAPSHOT - &gt; [帮助1]
我相信flex-mojos插件会自动从相应的swc中提取swf并复制到目标,而不是我们安装到存储库中。我对此是否正确?
答案 0 :(得分:0)
如果要在程序包中包含RSL,则需要将它们作为依赖项添加,并正确设置RSL URL以进行故障转移。通过添加这些依赖项,您应该能够让它们实现您的目标。但是,我发现你需要adobe RSL和你自己的互联网应用程序,无论你做什么都需要互联网,我觉得有点奇怪。
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>${flex.sdk.version}</version>
<type>pom</type>
<exclusions>
<exclusion>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>${flex.sdk.version}</version>
<classifier>${flash.version}</classifier>
<type>swc</type>
</dependency>
<!-- Cached, signed libraries -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>framework</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>textLayout</artifactId>
<version>${flex.textlayout.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>osmf</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>rpc</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>charts</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>mx</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>spark</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>advancedgrids</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>sparkskins</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>spark_dmv</artifactId>
<version>${flex.sdk.version}</version>
<type>swc</type>
<scope>caching</scope>
</dependency>
<!-- THEMES -->
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>spark</artifactId>
<version>${flex.sdk.version}</version>
<classifier>theme</classifier>
<type>css</type>
<scope>theme</scope>
</dependency>
<dependency>
<groupId>com.adobe.flexunit</groupId>
<artifactId>flexunit</artifactId>
<version>${flexunit.version}</version>
<type>swc</type>
<scope>test</scope>
</dependency>
</dependencies>
答案 1 :(得分:0)
使用多种组合解决了这个问题。