我今天正在处理个人(和旧)maven 项目。当我启动时:
mvn clean package
我收到了一个描述错误,null
所以我认为这是因为我使用了 Beta 版本flexmojos-maven-plugin
(但 2 个月前,它正在工作)。我看到有一个新的(稳定的)插件版本,其中 groupId 不是org.sonatype.flexmojos
但是net.flexmojos.oss
. 我重构了我的项目并启动了它,但所有依赖项都无法识别,因为此插件搜索 flex 框架版本4.6.0.23201
,但存储库上的可用版本是4.6.b.23201
......奇怪
所以我重构了我的 POM 以使用4.5.1.21328
版本,但我有这些警告:
1-SNAPSHOT [WARNING] 'dependencies.dependency.scope' for org.graniteds:granite-essentials-swc:swc 必须是 [provided, compile, runtime, test, system] 之一,但为“内部”。@ 第 30 行,第 11 列 [警告] [警告] 强烈建议修复这些问题,因为它们会威胁您构建的稳定性。[警告] [警告] 出于这个原因,未来的 Maven 版本可能不再支持构建此类格式错误的项目。[警告] [信息] 未来的 Maven 版本可能不再支持构建此类格式错误的项目。[警告] [信息] 未来的 Maven 版本可能不再支持构建此类格式错误的项目。[警告] [信息]
如您所见,此插件正在4.6.0.21328
再次寻找版本,我不知道为什么...这是我的插件代码:
<plugin>
<groupId>net.flexmojos.oss</groupId>
<artifactId>flexmojos-maven-plugin</artifactId>
<version>${flexmojos.version}</version>
<extensions>true</extensions>
<executions>
<execution>
<id>compile-swc-bases</id>
<goals>
<goal>compile-swc</goal>
</goals>
<phase>package</phase>
<configuration>
<includeClasses>
<scan>
<includes>
<include>com.sim.**/*</include>
</includes>
<!-- <excludes> -->
<!-- <exclude>com.sim.tide.events.**/*</exclude> -->
<!-- </excludes> -->
</scan>
</includeClasses>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.adobe.flex</groupId>
<artifactId>compiler</artifactId>
<version>4.5.1.21328</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>flex-framework</artifactId>
<version>4.5.1.21328</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>com.adobe.flex.framework</groupId>
<artifactId>playerglobal</artifactId>
<version>4.5.1.21328</version> <!-- this artifact version must match the flex SDK version used in this project -->
<classifier>10.2</classifier> <!-- the classifier specifies the target flash player major version -->
<type>swc</type>
</dependency>
</dependencies>
<configuration>
<targetPlayer>10.0.0</targetPlayer>
<compilerWarnings>
<warn-no-constructor>false</warn-no-constructor>
</compilerWarnings>
<keepAs3Metadatas>
<keepAs3Metadata>Bindable</keepAs3Metadata>
<keepAs3Metadata>Managed</keepAs3Metadata>
<keepAs3Metadata>ChangeEvent</keepAs3Metadata>
<keepAs3Metadata>NonCommittingChangeEvent</keepAs3Metadata>
<keepAs3Metadata>Transient</keepAs3Metadata>
<keepAs3Metadata>Id</keepAs3Metadata>
<keepAs3Metadata>Version</keepAs3Metadata>
<keepAs3Metadata>Lazy</keepAs3Metadata>
<keepAs3Metadata>Name</keepAs3Metadata>
<keepAs3Metadata>In</keepAs3Metadata>
<keepAs3Metadata>Out</keepAs3Metadata>
<keepAs3Metadata>Inject</keepAs3Metadata>
<keepAs3Metadata>Produces</keepAs3Metadata>
<keepAs3Metadata>PostConstruct</keepAs3Metadata>
<keepAs3Metadata>Destroy</keepAs3Metadata>
<keepAs3Metadata>Observer</keepAs3Metadata>
<keepAs3Metadata>ManagedEvent</keepAs3Metadata>
</keepAs3Metadatas>
<baseOutputDirectory>${project.build.sourceDirectory}</baseOutputDirectory>
<outputDirectory>${project.build.sourceDirectory}</outputDirectory>
</configuration>
</plugin>
那么如何查看插件使用的默认依赖项以及如何修改它们?谢谢