无法检索组件配置器以进行插件配置/ Artifact已重新定位到commons-io:commons-io:1.3.2

时间:2013-04-21 15:49:38

标签: java maven-2 javafx-2

我正在尝试使用zonski的javafx-maven-plugin,但是在执行

mvn com.zenjava:javafx-maven-plugin:1.2:fix-classpath

(有关Fixing the JRE classpath的详细信息)我收到一条警告和一条错误:

[WARNING] While downloading org.apache.commons:commons-io:1.3.2
  This artifact has been relocated to commons-io:commons-io:1.3.2.
  https://issues.sonatype.org/browse/MVNCENTRAL-244

[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve component configurator for plugin configuration

这是完整的日志:

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [com.zenjava:javafx-maven-plugin:1.5:fix-classpath] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[WARNING] While downloading org.apache.commons:commons-io:1.3.2
  This artifact has been relocated to commons-io:commons-io:1.3.2.
  https://issues.sonatype.org/browse/MVNCENTRAL-244


-----------------------------------------------------
this realm = app0.child-container[com.zenjava:javafx-maven-plugin:1.5]
urls[0] = file:/C:/Users/myuser/.m2/repository/com/zenjava/javafx-maven-plugin/1.5/javafx-maven-plugin-1.5.jar
urls[1] = file:/C:/Users/myuser/.m2/repository/org/twdata/maven/mojo-executor/2.0/mojo-executor-2.0.jar
urls[2] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
urls[3] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-inject-plexus/1.4.2/sisu-inject-plexus-1.4.2.jar
urls[4] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
urls[5] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
urls[6] = file:/C:/Users/myuser/.m2/repository/org/sonatype/aether/aether-api/1.7/aether-api-1.7.jar
urls[7] = file:/C:/Users/myuser/.m2/repository/com/zenjava/javafx-deploy-lib/1.2/javafx-deploy-lib-1.2.jar
urls[8] = file:/C:/Users/myuser/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
urls[9] = file:/C:/Users/myuser/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
urls[10] = file:/C:/Users/myuser/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
urls[11] = file:/C:/Users/myuser/.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar
urls[12] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
urls[13] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8


this realm = plexus.core
urls[0] = file:/C:/maven/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
-----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve component configurator for plugin configuration
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: < 1 second
[INFO] Finished at: Sun Apr 21 17:36:51 CEST 2013
[INFO] Final Memory: 9M/22M
[INFO] ------------------------------------------------------------------------

有关如何解决此问题的任何提示?谢谢: - )

更新:为maven使用-e开关:

C:\Users\myuser> mvn -e com.zenjava:javafx-maven-plugin:1.5:fix-classpath
+ Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Default Project
[INFO]    task-segment: [com.zenjava:javafx-maven-plugin:1.5:fix-classpath] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[WARNING] While downloading org.apache.commons:commons-io:1.3.2
  This artifact has been relocated to commons-io:commons-io:1.3.2.
  https://issues.sonatype.org/browse/MVNCENTRAL-244


-----------------------------------------------------
this realm = app0.child-container[com.zenjava:javafx-maven-plugin:1.5]
urls[0] = file:/C:/Users/myuser/.m2/repository/com/zenjava/javafx-maven-plugin/1.5/javafx-maven-plugin-1.5.jar
urls[1] = file:/C:/Users/myuser/.m2/repository/org/twdata/maven/mojo-executor/2.0/mojo-executor-2.0.jar
urls[2] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
urls[3] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-inject-plexus/1.4.2/sisu-inject-plexus-1.4.2.jar
urls[4] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar
urls[5] = file:/C:/Users/myuser/.m2/repository/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar
urls[6] = file:/C:/Users/myuser/.m2/repository/org/sonatype/aether/aether-api/1.7/aether-api-1.7.jar
urls[7] = file:/C:/Users/myuser/.m2/repository/com/zenjava/javafx-deploy-lib/1.2/javafx-deploy-lib-1.2.jar
urls[8] = file:/C:/Users/myuser/.m2/repository/org/apache/velocity/velocity/1.7/velocity-1.7.jar
urls[9] = file:/C:/Users/myuser/.m2/repository/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.jar
urls[10] = file:/C:/Users/myuser/.m2/repository/commons-lang/commons-lang/2.4/commons-lang-2.4.jar
urls[11] = file:/C:/Users/myuser/.m2/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar
urls[12] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-archiver/2.1.1/plexus-archiver-2.1.1.jar
urls[13] = file:/C:/Users/myuser/.m2/repository/org/codehaus/plexus/plexus-io/2.0.3/plexus-io-2.0.3.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8


this realm = plexus.core
urls[0] = file:/C:/maven/apache-maven-2.2.1/bin/../lib/maven-2.2.1-uber.jar
Number of imports: 10
import: org.codehaus.classworlds.Entry@a6c57a42
import: org.codehaus.classworlds.Entry@12f43f3b
import: org.codehaus.classworlds.Entry@20025374
import: org.codehaus.classworlds.Entry@f8e44ca4
import: org.codehaus.classworlds.Entry@92758522
import: org.codehaus.classworlds.Entry@ebf2705b
import: org.codehaus.classworlds.Entry@bb25e54
import: org.codehaus.classworlds.Entry@bece5185
import: org.codehaus.classworlds.Entry@3fee8e37
import: org.codehaus.classworlds.Entry@3fee19d8
-----------------------------------------------------
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve component configurator for plugin configuration
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve component confi
gurator for plugin configuration
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:723)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:284)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.PluginConfigurationException: Error configuring: com.zenjava:javafx-maven-plugin. Reason: Unable to retrieve compon
ent configurator for plugin configuration
        at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1368)
        at org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:724)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:468)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Unable to lookup component 'org.codehaus.plexus.component.conf
igurator.ComponentConfigurator', it could not be created
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335)
        at org.apache.maven.plugin.DefaultPluginManager.populatePluginFields(DefaultPluginManager.java:1351)
        ... 20 more
Caused by: org.codehaus.plexus.component.factory.ComponentInstantiationException: Could not instanciate component: role: 'org.codehaus.plexus.componen
t.configurator.ComponentConfigurator', implementation: 'org.codehaus.plexus.component.configurator.BasicComponentConfigurator', role hint: 'basic'
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77)
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62)
        at org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464)
        at org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93)
        at org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92)
        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331)
        ... 21 more
Caused by: java.lang.NoClassDefFoundError: org/codehaus/plexus/classworlds/realm/ClassRealm
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2413)
        at java.lang.Class.getConstructor0(Class.java:2723)
        at java.lang.Class.newInstance0(Class.java:345)
        at java.lang.Class.newInstance(Class.java:327)
        at org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44)
        ... 25 more
Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.classworlds.realm.ClassRealm
        at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
        at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
        at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
        at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
        at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
        ... 31 more
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1 second
[INFO] Finished at: Sun Apr 21 17:52:00 CEST 2013
[INFO] Final Memory: 9M/22M
[INFO] ------------------------------------------------------------------------

2 个答案:

答案 0 :(得分:7)

关于From Zero To JavaFX In 5 Minutes,它提到如下: -

  

在开始之前,您需要安装 JDK 7更新6或更高版本,以及 Maven 3.0或更高版本This guide会引导您完成该操作。

如果我错了,请纠正我。我们了解您使用的是Maven 2.2.1,请将Maven升级为version 3.x

我希望这可能有所帮助。

答案 1 :(得分:0)

您是否尝试将JavaFX与maven集成,将其用作系统依赖?也许这种方法可以帮助你。

您可以将maven项目创建为默认项目。您需要定义安装JDK的JAVA_HOME环境变量(我假设您有一个最新的JDK,其中集成了JavaFX)并添加了这个依赖项:

<dependency>
  <groupId>javafx</groupId>
  <artifactId>javafx</artifactId>
  <version>2.2.3</version>
  <scope>system</scope>
  <systemPath>${java.home}/lib/jfxrt.jar</systemPath>
</dependency>

请注意,无需使用环境变量,您可以设置系统的完整路径This is the link for Maven System dependencies

要执行项目,在生成项目时,需要在类路径中包含此jar。

java -cp path_to_jfxrt.jar:all_your_dependencies:your_generated.jar your_package.YourClass

希望它有所帮助。