【发布时间】:2011-09-18 17:31:37
【问题描述】:
我正在尝试使用 Maven 来构建一个使用 Sonatype flexmojos 的 Flex 项目。我已经设置了项目并且构建大部分工作,直到它尝试从 Sonatype 存储库下载各种 swc 文件,例如。
下载:http://repository.sonatype.org/content/groups/flexgroup/com/adobe/flex/framework/framework/3.2.0.3958/framework-3.2.0.3958.rb.swc 下载:http://repository.sonatype.org/content/groups/flexgroup/com/adobe/flex/framework/flex/3.2.0.3958/flex-3.2.0.3958.swc ...下载没有错误,但由于某种原因,swc 文件没有出现在本地存储库中,因此构建失败...
[错误] 无法在项目应用程序上执行目标:无法解析依赖项 r 项目...:swf:1.0-SNAPSHOT:以下工件无法 待解决:com.adobe.flex.framework:flex:swc:3.2.0.3958...现在,如果我手动转到 Sonatype 存储库并下载 swc 并将其复制到本地存储库中的正确位置,那么这将起作用。但是,同样,如果我尝试使用 Maven 安装目标安装 swc 文件,那么它会再次显示该文件已安装,但它不在存储库中,例如...
mvn install:install-file -Dfile=flex-3.2.0.3958 -DgroupId=com.adobe .flex.framework -DartifactId=flex -Dversion=3.2.0.3958 -Dpackaging=swc...报告 BUILD SUCCESS,但 swc 文件未出现在存储库中。
pom.xml(由 flexmojos-archetypes-application mojo 生成)如下:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.aaa.app</groupId>
<artifactId>app</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>swf</packaging>
<name>app Flex</name>
<build>
<sourceDirectory>src/main/flex</sourceDirectory>
<testSourceDirectory>src/test/flex</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.sonatype.flexmojos</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>3.5.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>3.2.0.3958</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flexunit</groupId>
<artifactId>flexunit</artifactId>
<version>0.85</version>
<type>swc</type>
<scope>test</scope>
</dependency>
</dependencies>
<profiles>
<profile><!--https://docs.sonatype.org/pages/viewpage.action?pageId=2949459-->
<id>m2e</id>
<activation>
<property>
<name>m2e.version</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.maven.ide.eclipse</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>0.9.9-SNAPSHOT</version>
<configuration>
<mappingId>customizable</mappingId>
<configurators>
<configurator id='org.maven.ide.eclipse.configuration.flex.configurator' />
</configurators>
<mojoExecutions>
<mojoExecution>org.apache.maven.plugins:maven-resources-plugin::</mojoExecution>
</mojoExecutions>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
</profiles>
</project>
有谁知道我做错了什么?! 谢谢。
【问题讨论】:
-
请发布您的 Maven 构建文件。此外,您的 swcs 应下载到
/.m2 文件夹下。 -
完成。是的,我正在寻找正确的地方。如果我安装实用程序 swc,我会从安装目标获得 BUILD SUCCESS,但是当我查看时:~\.m2\repository\com\adobe\flex\framework\utilities\3.2.0.3958 没有 swc 文件
标签: apache-flex maven installation swc sonatype