problem with maven plugin

170 views
Skip to first unread message

Matthew Pocock

unread,
Jun 14, 2013, 9:55:11 AM6/14/13
to sca...@googlegroups.com
Hi,

I've been using scalaxb for a few months now to generate bindings to data models defined in XSDs. It's doing this job very well. So far, I've used maven as my build tool and the maven scalaxb plugin, and it's all worked very well.

I've just moved to a new laptop and tried to build, but got this error message:

Failed to execute goal org.scalaxb:scalaxb-maven-plugin:1.1.0:generate (scalaxb) on project sra_1_5: Execution scalaxb of goal org.scalaxb:scalaxb-maven-plugin:1.1.0:generate failed: Unable to load the mojo 'generate' in the plugin 'org.scalaxb:scalaxb-maven-plugin:1.1.0'. A required class is missing: scala/collection/Seq

I'm mystified as it works fine on my main development machine. it's possible that any number of things in the tool chain are at different versions, but I don't have access to both machines right now. The entire error output is below. Is this an issue with a known fix?

Thanks
Matthew

[WARNING] The POM for org.scala-lang:scala-library:jar:2.10.0 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
Jun 14, 2013 2:52:15 PM org.sonatype.guice.bean.reflect.LoadedClass
WARNING: Error injecting: org.scalaxb.maven.ScalaxbMojo
java.lang.NoClassDefFoundError: scala/collection/Seq
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2404)
at java.lang.Class.getDeclaredConstructors(Class.java:1853)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:243)
at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:96)
at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:628)
at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:835)
at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:769)
at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:254)
at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:205)
at com.google.inject.internal.InjectorImpl.getInternalFactory(InjectorImpl.java:843)
at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:957)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:990)
at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:951)
at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1003)
at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:47)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40)
at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:968)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1014)
at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:964)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:79)
at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:53)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:243)
at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:235)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:455)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:92)
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:319)
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:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
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)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: java.lang.ClassNotFoundException: scala.collection.Seq
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
... 53 more

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] mtgenomes ......................................... SUCCESS [1.733s]
[INFO] sra_1_5 ........................................... FAILURE [2.705s]
[INFO] searcher .......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.961s
[INFO] Finished at: Fri Jun 14 14:52:15 BST 2013
[INFO] Final Memory: 9M/71M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.scalaxb:scalaxb-maven-plugin:1.1.0:generate (scalaxb) on project sra_1_5: Execution scalaxb of goal org.scalaxb:scalaxb-maven-plugin:1.1.0:generate failed: Unable to load the mojo 'generate' in the plugin 'org.scalaxb:scalaxb-maven-plugin:1.1.0'. A required class is missing: scala/collection/Seq
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.scalaxb:scalaxb-maven-plugin:1.1.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/caroline/.m2/repository/org/scalaxb/scalaxb-maven-plugin/1.1.0/scalaxb-maven-plugin-1.1.0.jar
[ERROR] urls[1] = file:/C:/Users/caroline/.m2/repository/org/scalaxb/scalaxb_2.10/1.1.0/scalaxb_2.10-1.1.0.jar
[ERROR] urls[2] = file:/C:/Users/caroline/.m2/repository/org/scala-lang/scala-library/2.10.1/scala-library-2.10.1.jar
[ERROR] urls[3] = file:/C:/Users/caroline/.m2/repository/com/github/scopt/scopt_2.10/2.1.0/scopt_2.10-2.1.0.jar
[ERROR] urls[4] = file:/C:/Users/caroline/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar
[ERROR] urls[5] = file:/C:/Users/caroline/.m2/repository/org/apache/maven/plugin-tools/maven-plugin-annotations/3.1/maven-plugin-annotations-3.1.jar
[ERROR] urls[6] = file:/C:/Users/caroline/.m2/repository/org/sonatype/plexus/plexus-build-api/0.0.7/plexus-build-api-0.0.7.jar
[ERROR] urls[7] = file:/C:/Users/caroline/.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar
[ERROR] urls[8] = file:/C:/Users/caroline/.m2/repository/org/codehaus/plexus/plexus-utils/3.0.4/plexus-utils-3.0.4.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
[ERROR] 
[ERROR] -----------------------------------------------------: scala.collection.Seq
[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] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :sra_1_5

Process finished with exit code 1

Martin Ellis

unread,
Jun 14, 2013, 11:22:53 AM6/14/13
to sca...@googlegroups.com
Hey! :o)

What version of maven are you using on Caroline's laptop?
I have tested the plugin on 3.0.4 (and possibly 3.0.5).
I definitely haven't tested 3.1 yet.

Is it possible that something in ~/.m2/repository/org/scala-library/* hasn't resolved properly, and is corrupted? That warning about the 2.10.0 pom shouldn't be fatal, but I wouldn't expect to see it.

It's surprising because there is exactly one scala-library on the plugin classpath (2.10.1), and that's exactly as it should be.

Martin




--
You received this message because you are subscribed to the Google Groups "scalaxb" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalaxb+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages