0 Replies Latest reply on Sep 4, 2014 4:29 AM by gott

    Problem with compiling GateIn WCM

    gott Newbie

      I'm compliling GateIn WCM regarding to this installation guide: https://docs.jboss.org/author/display/GTNWCM/1.+Getting+Started       

      with Apache Maven 3.0.4 In step "1.2.3 Build" I get the following Exception:

       

      [INFO] Scanning for projects...

      [INFO] ------------------------------------------------------------------------

      [INFO] Reactor Build Order:

      [INFO]

      [INFO] wcm-parent

      [INFO] wcm-api

      [INFO] wcm

      [INFO] api-example

      [INFO]                                                                        

      [INFO] ------------------------------------------------------------------------

      [INFO] Building wcm-parent 2.2.0-SNAPSHOT

      [INFO] ------------------------------------------------------------------------

      [INFO]

      [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ wcm-parent ---

      [INFO]

      [INFO] --- maven-install-plugin:2.3:install (default-install) @ wcm-parent ---

      [INFO] Installing /home/webdev/Desktop/gateIn/test-wcm/gatein-wcm/pom.xml to /home/webdev/.m2/repository/org/gatein/wcm/wcm-parent/2.2.0-SNAPSHOT/wcm-parent-2.2.0-SNAPSHOT.pom

      [INFO]                                                                        

      [INFO] ------------------------------------------------------------------------

      [INFO] Building wcm-api 2.2.0-SNAPSHOT

      [INFO] ------------------------------------------------------------------------

      [WARNING] The POM for org.codehaus.plexus:plexus-compiler-api:jar:1.5.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

      [INFO]

      [INFO] --- maven-clean-plugin:2.3:clean (default-clean) @ wcm-api ---

      [INFO]

      [INFO] --- maven-resources-plugin:2.3:resources (default-resources) @ wcm-api ---

      [WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!

      [INFO] skip non existing resourceDirectory /home/webdev/Desktop/gateIn/test-wcm/gatein-wcm/wcm-api/src/main/resources

      [INFO]

      [INFO] --- maven-compiler-plugin:2.0.2:compile (default-compile) @ wcm-api ---

      [WARNING] The POM for org.codehaus.plexus:plexus-compiler-manager:jar:1.5.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

      [WARNING] The POM for org.codehaus.plexus:plexus-compiler-javac:jar:1.5.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

      Sep 04, 2014 8:55:25 AM org.sonatype.guice.bean.reflect.Logs$JULSink warn

      WARNING: Error injecting: org.apache.maven.plugin.CompilerMojo

      java.lang.NoClassDefFoundError: org/codehaus/plexus/compiler/util/scan/InclusionScanException

        at java.lang.Class.getDeclaredConstructors0(Native Method)

        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2532)

        at java.lang.Class.getDeclaredConstructors(Class.java:1901)

        at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)

        at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:98)

        at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)

        at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:831)

        at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:758)

        at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:255)

        at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:204)

        at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:954)

        at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:987)

        at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:950)

        at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1000)

        at org.sonatype.guice.bean.reflect.AbstractDeferredClass.get(AbstractDeferredClass.java:45)

        at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:84)

        at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:52)

        at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)

        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)

        at org.sonatype.guice.plexus.lifecycles.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:138)

        at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:108)

        at com.google.inject.internal.ProvisionListenerStackCallback.provision(ProvisionListenerStackCallback.java:55)

        at com.google.inject.internal.ProviderInternalFactory.circularGet(ProviderInternalFactory.java:68)

        at com.google.inject.internal.InternalFactoryToInitializableAdapter.get(InternalFactoryToInitializableAdapter.java:45)

        at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)

        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)

        at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)

        at com.google.inject.Scopes$1$1.get(Scopes.java:59)

        at org.sonatype.guice.bean.locators.LazyBeanEntry.getValue(LazyBeanEntry.java:83)

        at org.sonatype.guice.plexus.locators.LazyPlexusBean.getValue(LazyPlexusBean.java:49)

        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:253)

        at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:245)

        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: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:57)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

        at java.lang.reflect.Method.invoke(Method.java:606)

        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)

      Caused by: java.lang.ClassNotFoundException: org.codehaus.plexus.compiler.util.scan.InclusionScanException

        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)

        ... 54 more

       

       

      [INFO] ------------------------------------------------------------------------

      [INFO] Reactor Summary:

      [INFO]

      [INFO] wcm-parent ........................................ SUCCESS [0.536s]

      [INFO] wcm-api ........................................... FAILURE [0.413s]

      [INFO] wcm ............................................... SKIPPED

      [INFO] api-example ....................................... SKIPPED

      [INFO] ------------------------------------------------------------------------

      [INFO] BUILD FAILURE

      [INFO] ------------------------------------------------------------------------

      [INFO] Total time: 1.663s

      [INFO] Finished at: Thu Sep 04 08:55:25 CEST 2014

      [INFO] Final Memory: 7M/138M

      [INFO] ------------------------------------------------------------------------

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile (default-compile) on project wcm-api: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:2.0.2:compile: org/codehaus/plexus/compiler/util/scan/InclusionScanException

      [ERROR] -----------------------------------------------------

      [ERROR] realm =    plugin>org.apache.maven.plugins:maven-compiler-plugin:2.0.2

      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy

      [ERROR] urls[0] = file:/home/webdev/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/2.0.2/maven-compiler-plugin-2.0.2.jar

      [ERROR] urls[1] = file:/home/webdev/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar

      [ERROR] urls[2] = file:/home/webdev/.m2/repository/org/codehaus/plexus/plexus-compiler-api/1.5.3/plexus-compiler-api-1.5.3.jar

      [ERROR] urls[3] = file:/home/webdev/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/1.5.3/plexus-compiler-manager-1.5.3.jar

      [ERROR] urls[4] = file:/home/webdev/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/1.5.3/plexus-compiler-javac-1.5.3.jar

      [ERROR] Number of foreign imports: 1

      [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

      [ERROR]

      [ERROR] -----------------------------------------------------: org.codehaus.plexus.compiler.util.scan.InclusionScanException

      [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

      [ERROR]

      [ERROR] After correcting the problems, you can resume the build with the command

      [ERROR]   mvn <goals> -rf :wcm-api

       

       

      I've already tried to add  this code to the parent pom.xml and to the pom.xml in wcm-api of GateIn WCM:

      <dependency>

          <groupId>org.codehaus.plexus</groupId>

          <artifactId>plexus-compilers</artifactId>

          <version>2.3</version>

        </dependency>

        <dependency>

          <groupId>org.codehaus.plexus</groupId>

          <artifactId>plexus-compiler-api</artifactId>

          <version>1.5.3</version>

        </dependency>

       

      ,but nothing helped!

      Has anyone a suggestion how to fix this?

      Thank you very much