0
只是想試圖從主幹構建Apache CXF的時候我可以如何解決以下錯誤:的Apache CXF主幹生成錯誤:提供com.sun.tools.xjc.addon.apache_cxf.ts.ToStringPlugin沒有找到
**Exception in thread "main" java.util.ServiceConfigurationError: com.sun.tools.xjc.Plugin: Provider com.sun.tools.xjc.addon.apache_cxf.ts.ToStringPlugin not found**
at java.util.ServiceLoader.fail(ServiceLoader.java:214)
at java.util.ServiceLoader.access$300(ServiceLoader.java:164)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:348)
at java.util.ServiceLoader$1.next(ServiceLoader.java:428)
at com.sun.tools.xjc.Options.findServices(Options.java:924)
at com.sun.tools.xjc.Options.getAllPlugins(Options.java:357)
at com.sun.tools.xjc.reader.AbstractExtensionBindingChecker.<init>(AbstractExtensionBindingChecker.java:94)
at com.sun.tools.xjc.reader.ExtensionBindingChecker.<init>(ExtensionBindingChecker.java:77)
at com.sun.tools.xjc.ModelLoader$XMLSchemaParser.parse(ModelLoader.java:257)
at com.sun.xml.xsom.impl.parser.NGCCRuntimeEx.parseEntity(NGCCRuntimeEx.java:337)
at com.sun.xml.xsom.impl.parser.ParserContex
t.parse(ParserContext.java:124)
at com.sun.xml.xsom.impl.parser.ParserContext.<init>(ParserContext.java:96)
at com.sun.xml.xsom.parser.XSOMParser.<init>(XSOMParser.java:125)
at com.sun.tools.xjc.ModelLoader.createXSOMParser(ModelLoader.java:420)
at com.sun.tools.xjc.ModelLoader.createXSOMParser(ModelLoader.java:428)
at com.sun.tools.xjc.ModelLoader.createXSOM(ModelLoader.java:509)
at com.sun.tools.xjc.ModelLoader.loadXMLSchema(ModelLoader.java:375)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:167)
at com.sun.tools.xjc.ModelLoader.load(ModelLoader.java:113)
at com.sun.tools.xjc.Driver.run(Driver.java:313)
at org.apache.cxf.maven_plugin.AbstractXSDToJavaMojo.execute(AbstractXSDToJavaMojo.java:307)
at org.apache.cxf.maven_plugin.XSDToJavaMojo.execute(XSDToJavaMojo.java:42)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
非常感謝彼得,我相信你已經指引我走向正確的方向。我剛剛發現了另一個鏈接,解決類似的問題[這裏](http://www.mindbug.org/2009/02/adding-endorsements-to-mavens-plugins.html)我仍在調查這個問題,我會很快回復你。 – romaicus