简体   繁体   English

JavaFX maven插件和API不兼容

[英]JavaFX maven plugin and API incompatibility

Recently I've upgraded my Java version to 7u40 on my Fedora 19. And after that I've started to get an annoing error during my current JavaFX project running: 最近我在我的Fedora 19上将我的Java版本升级到7u40。之后我在我当前运行的JavaFX项目中开始出现了一个令人讨厌的错误:

[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.929s
[INFO] Finished at: Wed Oct 16 17:36:05 CEST 2013
[INFO] Final Memory: 11M/155M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.zenjava:javafx-maven-plugin:2.0:run (default-cli) on project browser: Execution default-cli of goal com.zenjava:javafx-maven-plugin:2.0:run failed: An API incompatibility was encountered while executing com.zenjava:javafx-maven-plugin:2.0:run: java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.zenjava:javafx-maven-plugin:2.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/home/sk_/.m2/repository/com/zenjava/javafx-maven-plugin/2.0/javafx-maven-plugin-2.0.jar
[ERROR] urls[1] = file:/home/sk_/.m2/repository/org/twdata/maven/mojo-executor/2.0/mojo-executor-2.0.jar
[ERROR] urls[2] = file:/home/sk_/.m2/repository/org/sonatype/aether/aether-util/1.7/aether-util-1.7.jar
[ERROR] urls[3] = file:/home/sk_/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.14/plexus-interpolation-1.14.jar
[ERROR] urls[4] = file:/home/sk_/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar
[ERROR] urls[5] = file:/home/sk_/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.3/plexus-sec-dispatcher-1.3.jar
[ERROR] urls[6] = file:/home/sk_/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[7] = file:/home/sk_/.m2/repository/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] urls[8] = file:/home/sk_/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
[ERROR] urls[9] = file:/home/sk_/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
[ERROR] urls[10] = file:/home/sk_/.m2/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
[ERROR] urls[11] = file:/home/sk_/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[12] = file:/home/sk_/.m2/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
[ERROR] urls[13] = file:/usr/java/jdk1.7.0_45/jre/../lib/ant-javafx.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException

Anyone faced that? 有人面对吗?

I was able to get around this in maven 3.1.1 by configuring my javafx-maven-plugin as follows (specifying mojo-executor version as 2.1.0)... 通过如下配置我的javafx-maven-plugin(将mojo-executor版本指定为2.1.0),我能够在maven 3.1.1中解决这个问题...

<build>
    <plugins>
        <plugin>
            <groupId>com.zenjava</groupId>
            <artifactId>javafx-maven-plugin</artifactId>
            <version>2.0</version>
            <configuration>
                <mainClass>net.jalbright.scratch.App</mainClass>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>org.twdata.maven</groupId>
                    <artifactId>mojo-executor</artifactId>
                    <version>2.1.0</version>
                </dependency>
            </dependencies>
        </plugin>
    </plugins>
</build>

The javafx-maven-plugin will be updated to use mojo-executor to 2.1.0 in the next version (see: https://github.com/zonski/javafx-maven-plugin/issues/32 ), so this can be removed once the javafx-maven-plugin gets rev'd. javafx-maven-plugin将在下一版本中更新为使​​用mojo-executor到2.1.0(参见: https//github.com/zonski/javafx-maven-plugin/issues/32 ),所以这可以是一旦javafx-maven-plugin获得rev'd就删除了。

解决了Maven降级到3.0.5

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven CXF插件API不兼容 - Maven CXF plugin API incompatibility 由于 API 不兼容,Maven 战争插件 3.0.0 出现问题 - Problem with Maven war plugin 3.0.0 due to an API incompatibility nexus-staging-maven-plugin:maven 部署失败:执行时遇到 API 不兼容 - nexus-staging-maven-plugin: maven deploy failed: An API incompatibility was encountered while executing 由于 API 不兼容,无法在插件“org.apache.maven.plugins:maven-war-plugin:2.2”中加载 mojo“war” - Unable to load the mojo 'war' in the plugin 'org.apache.maven.plugins:maven-war-plugin:2.2' due to an API incompatibility maven-help-plugin:2.1.1:effective-settings failed: 执行时遇到 API 不兼容 - maven-help-plugin:2.1.1:effective-settings failed: An API incompatibility was encountered while executing maven-release-plugin:2.5.1:perform failed: 执行时遇到 API 不兼容 - maven-release-plugin:2.5.1:perform failed: An API incompatibility was encountered while executing org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar 失败:执行时遇到 API 不兼容问题 - org.sonarsource.scanner.maven:sonar-maven-plugin:3.8.0.2131:sonar failed: An API incompatibility was encountered while executing Maven 构建失败并出现错误:执行 com.cosium.code:git-code-format-maven-plugin 时遇到 API 不兼容 - Maven build fails with error: An API incompatibility was encountered while executing com.cosium.code:git-code-format-maven-plugin 由于 API 不兼容,无法构建 Maven - Fail to Maven Build due to an API incompatibility 带有CDI,JPA和javafx-maven-plugin的JavaFX - JavaFX with CDI, JPA and javafx-maven-plugin
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM