AEM CQ5 project giving NoClassDefFoundError for org/codehaus/mojo/animal_sniffer/logging/Logger when run mvn install disconnected from internet

家住魔仙堡 提交于 2020-01-16 07:17:29

问题


I'm new to AEM CQ5, trying to setup maven on one linux machine which can not be connected to internet (company infosec reasons). So, i've tried uploading all the dependencies manually on our internal nexus, so that project builds fine when we run "mvn clean install".

Our main idea is to make CQ projects build properly on our machine(s) which can not be connected to internet (and fetch all dependencies from local nexus).

All i could find is "content-package-maven-plugin" and "content-package-maven-plugin-parent" missing in our local nexus, so i uploaded them. Now, when I run "mvn install" i get below error during maven phase "content-package-maven-plugin:0.0.20:check-signature (default-check-signature)"

[INFO] --- content-package-maven-plugin:0.0.20:check-signature (default-check-signature) @ MyProject-content ---
[WARNING] Error injecting: com.day.jcr.vault.maven.pack.CheckSignatureMojo
java.lang.NoClassDefFoundError: org/codehaus/mojo/animal_sniffer/logging/Logger
    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:245)
    at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:99)
    at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:653)
    at com.google.inject.internal.InjectorImpl.createJustInTimeBinding(InjectorImpl.java:863)
    at com.google.inject.internal.InjectorImpl.createJustInTimeBindingRecursive(InjectorImpl.java:790)
    at com.google.inject.internal.InjectorImpl.getJustInTimeBinding(InjectorImpl.java:278)
    at com.google.inject.internal.InjectorImpl.getBindingOrThrow(InjectorImpl.java:210)
    at com.google.inject.internal.InjectorImpl.getProviderOrThrow(InjectorImpl.java:986)
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:1019)
    at com.google.inject.internal.InjectorImpl.getProvider(InjectorImpl.java:982)
    at com.google.inject.internal.InjectorImpl.getInstance(InjectorImpl.java:1032)
    at org.eclipse.sisu.space.AbstractDeferredClass.get(AbstractDeferredClass.java:48)
    at com.google.inject.internal.ProviderInternalFactory.provision(ProviderInternalFactory.java:86)
    at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision(InternalFactoryToInitializableAdapter.java:55)
    at com.google.inject.internal.ProviderInternalFactory$1.call(ProviderInternalFactory.java:70)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:100)
    at org.eclipse.sisu.plexus.PlexusLifecycleManager.onProvision(PlexusLifecycleManager.java:133)
    at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision(ProvisionListenerStackCallback.java:109)
    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:47)
    at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:997)
    at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1047)
    at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:993)
    at com.google.inject.Scopes$1$1.get(Scopes.java:59)
    at org.eclipse.sisu.inject.LazyBeanEntry.getValue(LazyBeanEntry.java:82)
    at org.eclipse.sisu.plexus.LazyPlexusBean.getValue(LazyPlexusBean.java:51)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:260)
    at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:252)
    at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo(DefaultMavenPluginManager.java:459)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:97)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    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:317)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    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:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.lang.ClassNotFoundException: org.codehaus.mojo.animal_sniffer.logging.Logger
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
    ... 54 more
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] MyAEMProject Project - Reactor Project .................... SUCCESS [11.751s]
[INFO] MyAEMProject Project Bundle ............................... SUCCESS [1:22.516s]
[INFO] MyAEMProject Project Package .............................. FAILURE [0.375s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2:00.671s
[INFO] Finished at: Thu Jul 23 17:45:26 GMT 2015
[INFO] Final Memory: 18M/113M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.day.jcr.vault:content-package-maven-plugin:0.0.20:check-signature (default-check-signature) on project MyProject-content: Execution default-check-signature of goal com.day.jcr.vault:content-package-maven-plugin:0.0.20:check-signature failed: A required class was missing while executing com.day.jcr.vault:content-package-maven-plugin:0.0.20:check-signature: org/codehaus/mojo/animal_sniffer/logging/Logger
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>com.day.jcr.vault:content-package-maven-plugin:0.0.20
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:<USER_HOME>/.m2/repository/com/day/jcr/vault/content-package-maven-plugin/0.0.20/content-package-maven-plugin-0.0.20.jar
[ERROR] urls[1] = file:<USER_HOME>/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>MyAEMProject:MyAEMProject-content:1.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR] 
[ERROR] -----------------------------------------------------: org.codehaus.mojo.animal_sniffer.logging.Logger
[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 :MyAEMProject-content

I'm Using Maven 3.1.1 & Java version is java version "1.7.0_04". I also tried with couple of other maven versions maven 3.0.5, maven 3.2.5, maven 3.3.3, but all of them gives same issue.

I've noticed, maven repository at <USER_HOME>/.m2/repository/ doesn't have animal_sniffer jars (org/codehaus/mojo). which is weird, because these dependencies already exists in our local nexus and downloading properly (from local nexus) when i run the same mvn install on my mac (which is connected to internet).

Below is the output when i run mvn dependency:resolve-plugins

[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] MyAEMProject Project - Reactor Project
[INFO] MyAEMProject Project Bundle
[INFO] MyAEMProject Project Package
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyAEMProject Project - Reactor Project 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:resolve-plugins (default-cli) @ MyAEMProject ---
[INFO] Plugin Resolved: maven-install-plugin-2.4.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-manager-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-3.0.5.jar
[INFO]     Plugin Dependency Resolved: plexus-digest-1.0.jar
[INFO] Plugin Resolved: maven-clean-plugin-2.5.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-3.0.jar
[INFO] Plugin Resolved: maven-site-plugin-3.3.jar
[INFO]     Plugin Dependency Resolved: maven-reporting-exec-1.1.jar
[INFO]     Plugin Dependency Resolved: maven-core-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-model-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-settings-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-settings-builder-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-archiver-2.4.2.jar
[INFO]     Plugin Dependency Resolved: doxia-sink-api-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-logging-api-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-core-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-xhtml-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-apt-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-xdoc-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-fml-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-markdown-1.4.jar
[INFO]     Plugin Dependency Resolved: servlet-api-2.5.jar
[INFO]     Plugin Dependency Resolved: doxia-decoration-model-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-site-renderer-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-integration-tools-1.5.jar
[INFO]     Plugin Dependency Resolved: wagon-provider-api-1.0.jar
[INFO]     Plugin Dependency Resolved: plexus-archiver-1.0.jar
[INFO]     Plugin Dependency Resolved: plexus-i18n-1.0-beta-7.jar
[INFO]     Plugin Dependency Resolved: velocity-1.5.jar
[INFO]     Plugin Dependency Resolved: plexus-velocity-1.1.8.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-1.5.10.jar
[INFO]     Plugin Dependency Resolved: jetty-6.1.25.jar
[INFO]     Plugin Dependency Resolved: jetty-util-6.1.25.jar
[INFO]     Plugin Dependency Resolved: commons-lang-2.5.jar
[INFO]     Plugin Dependency Resolved: commons-io-1.4.jar
[INFO] Plugin Resolved: maven-deploy-plugin-2.7.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-1.5.6.jar
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyAEMProject Project Bundle 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:resolve-plugins (default-cli) @ MyAEMProject-bundle ---
[INFO] Plugin Resolved: maven-install-plugin-2.4.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-manager-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-3.0.5.jar
[INFO]     Plugin Dependency Resolved: plexus-digest-1.0.jar
[INFO] Plugin Resolved: maven-clean-plugin-2.5.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-3.0.jar
[INFO] Plugin Resolved: maven-surefire-plugin-2.14.1.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-surefire-common-2.14.1.jar
[INFO]     Plugin Dependency Resolved: surefire-api-2.14.1.jar
[INFO]     Plugin Dependency Resolved: maven-toolchain-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-annotations-3.2.jar
[INFO] Plugin Resolved: maven-compiler-plugin-3.1.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-core-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-toolchain-1.0.jar
[INFO]     Plugin Dependency Resolved: maven-shared-utils-0.1.jar
[INFO]     Plugin Dependency Resolved: maven-shared-incremental-1.1.jar
[INFO]     Plugin Dependency Resolved: plexus-compiler-api-2.2.jar
[INFO]     Plugin Dependency Resolved: plexus-compiler-manager-2.2.jar
[INFO]     Plugin Dependency Resolved: plexus-compiler-javac-2.2.jar
[INFO]     Plugin Dependency Resolved: plexus-container-default-1.5.5.jar
[INFO] Plugin Resolved: maven-scr-plugin-1.7.4.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.7.jar
[INFO]     Plugin Dependency Resolved: maven-archiver-2.2.jar
[INFO]     Plugin Dependency Resolved: org.apache.felix.scr.generator-1.1.4.jar
[INFO] Plugin Resolved: maven-javadoc-plugin-2.9.jar
[INFO]     Plugin Dependency Resolved: maven-core-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-settings-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-manager-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-toolchain-2.2.1.jar
[INFO]     Plugin Dependency Resolved: maven-reporting-api-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-archiver-2.5.jar
[INFO]     Plugin Dependency Resolved: maven-invoker-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-common-artifact-filters-1.3.jar
[INFO]     Plugin Dependency Resolved: doxia-sink-api-1.0.jar
[INFO]     Plugin Dependency Resolved: doxia-site-renderer-1.0.jar
[INFO]     Plugin Dependency Resolved: wagon-provider-api-1.0-beta-6.jar
[INFO]     Plugin Dependency Resolved: commons-lang-2.4.jar
[INFO]     Plugin Dependency Resolved: commons-io-2.2.jar
[INFO]     Plugin Dependency Resolved: commons-httpclient-3.1.jar
[INFO]     Plugin Dependency Resolved: commons-logging-1.1.1.jar
[INFO]     Plugin Dependency Resolved: log4j-1.2.14.jar
[INFO]     Plugin Dependency Resolved: qdox-1.12.jar
[INFO]     Plugin Dependency Resolved: plexus-container-default-1.0-alpha-9.jar
[INFO]     Plugin Dependency Resolved: plexus-archiver-2.1.2.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-3.0.5.jar
[INFO] Plugin Resolved: maven-site-plugin-3.3.jar
[INFO]     Plugin Dependency Resolved: maven-reporting-exec-1.1.jar
[INFO]     Plugin Dependency Resolved: maven-core-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-model-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-settings-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-settings-builder-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-archiver-2.4.2.jar
[INFO]     Plugin Dependency Resolved: doxia-sink-api-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-logging-api-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-core-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-xhtml-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-apt-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-xdoc-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-fml-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-markdown-1.4.jar
[INFO]     Plugin Dependency Resolved: servlet-api-2.5.jar
[INFO]     Plugin Dependency Resolved: doxia-decoration-model-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-site-renderer-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-integration-tools-1.5.jar
[INFO]     Plugin Dependency Resolved: wagon-provider-api-1.0.jar
[INFO]     Plugin Dependency Resolved: plexus-archiver-1.0.jar
[INFO]     Plugin Dependency Resolved: plexus-i18n-1.0-beta-7.jar
[INFO]     Plugin Dependency Resolved: velocity-1.5.jar
[INFO]     Plugin Dependency Resolved: plexus-velocity-1.1.8.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-1.5.10.jar
[INFO]     Plugin Dependency Resolved: jetty-6.1.25.jar
[INFO]     Plugin Dependency Resolved: jetty-util-6.1.25.jar
[INFO]     Plugin Dependency Resolved: commons-lang-2.5.jar
[INFO]     Plugin Dependency Resolved: commons-io-1.4.jar
[INFO] Plugin Resolved: maven-bundle-plugin-2.3.7.jar
[INFO]     Plugin Dependency Resolved: bndlib-1.50.0.jar
[INFO]     Plugin Dependency Resolved: org.apache.felix.bundlerepository-1.6.6.jar
[INFO]     Plugin Dependency Resolved: maven-core-2.0.7.jar
[INFO]     Plugin Dependency Resolved: maven-archiver-2.4.1.jar
[INFO]     Plugin Dependency Resolved: maven-dependency-tree-1.2.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-2.1.jar
[INFO] Plugin Resolved: maven-sling-plugin-2.1.0.jar
[INFO]     Plugin Dependency Resolved: org.osgi.core-4.1.0.jar
[INFO]     Plugin Dependency Resolved: commons-httpclient-3.1.jar
[INFO]     Plugin Dependency Resolved: commons-logging-1.0.4.jar
[INFO]     Plugin Dependency Resolved: commons-io-1.4.jar
[INFO]     Plugin Dependency Resolved: org.apache.sling.commons.json-2.0.4-incubator.jar
[INFO]     Plugin Dependency Resolved: org.apache.sling.commons.osgi-2.0.2-incubator.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.jar
[INFO]     Plugin Dependency Resolved: maven-archiver-2.0.jar
[INFO]     Plugin Dependency Resolved: scannotation-1.0.2.jar
[INFO]     Plugin Dependency Resolved: adapter-annotations-1.0.0.jar
[INFO]     Plugin Dependency Resolved: asm-all-3.3.1.jar
[INFO] Plugin Resolved: maven-resources-plugin-2.6.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-core-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-settings-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-monitor-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-container-default-1.0-alpha-9-stable-1.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-2.0.5.jar
[INFO]     Plugin Dependency Resolved: maven-filtering-1.1.jar
[INFO]     Plugin Dependency Resolved: plexus-interpolation-1.13.jar
[INFO] Plugin Resolved: maven-deploy-plugin-2.7.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-1.5.6.jar
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyAEMProject Project Package 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:resolve-plugins (default-cli) @ MyAEMProject-content ---
[INFO] Plugin Resolved: maven-install-plugin-2.4.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-manager-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-3.0.5.jar
[INFO]     Plugin Dependency Resolved: plexus-digest-1.0.jar
[INFO] Plugin Resolved: maven-clean-plugin-2.5.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-3.0.jar
[INFO] Plugin Resolved: maven-surefire-plugin-2.14.1.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-surefire-common-2.14.1.jar
[INFO]     Plugin Dependency Resolved: surefire-api-2.14.1.jar
[INFO]     Plugin Dependency Resolved: maven-toolchain-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-annotations-3.2.jar
[INFO] Plugin Resolved: maven-compiler-plugin-3.1.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-core-2.0.9.jar
[INFO]     Plugin Dependency Resolved: maven-toolchain-1.0.jar
[INFO]     Plugin Dependency Resolved: maven-shared-utils-0.1.jar
[INFO]     Plugin Dependency Resolved: maven-shared-incremental-1.1.jar
[INFO]     Plugin Dependency Resolved: plexus-compiler-api-2.2.jar
[INFO]     Plugin Dependency Resolved: plexus-compiler-manager-2.2.jar
[INFO]     Plugin Dependency Resolved: plexus-compiler-javac-2.2.jar
[INFO]     Plugin Dependency Resolved: plexus-container-default-1.5.5.jar
[INFO] Plugin Resolved: content-package-maven-plugin-0.0.20.jar
[INFO] Plugin Resolved: maven-site-plugin-3.3.jar
[INFO]     Plugin Dependency Resolved: maven-reporting-exec-1.1.jar
[INFO]     Plugin Dependency Resolved: maven-core-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-model-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-settings-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-settings-builder-3.0.jar
[INFO]     Plugin Dependency Resolved: maven-archiver-2.4.2.jar
[INFO]     Plugin Dependency Resolved: doxia-sink-api-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-logging-api-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-core-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-xhtml-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-apt-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-xdoc-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-fml-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-module-markdown-1.4.jar
[INFO]     Plugin Dependency Resolved: servlet-api-2.5.jar
[INFO]     Plugin Dependency Resolved: doxia-decoration-model-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-site-renderer-1.4.jar
[INFO]     Plugin Dependency Resolved: doxia-integration-tools-1.5.jar
[INFO]     Plugin Dependency Resolved: wagon-provider-api-1.0.jar
[INFO]     Plugin Dependency Resolved: plexus-archiver-1.0.jar
[INFO]     Plugin Dependency Resolved: plexus-i18n-1.0-beta-7.jar
[INFO]     Plugin Dependency Resolved: velocity-1.5.jar
[INFO]     Plugin Dependency Resolved: plexus-velocity-1.1.8.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-1.5.10.jar
[INFO]     Plugin Dependency Resolved: jetty-6.1.25.jar
[INFO]     Plugin Dependency Resolved: jetty-util-6.1.25.jar
[INFO]     Plugin Dependency Resolved: commons-lang-2.5.jar
[INFO]     Plugin Dependency Resolved: commons-io-1.4.jar
[INFO] Plugin Resolved: maven-resources-plugin-2.6.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-core-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-settings-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-monitor-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-container-default-1.0-alpha-9-stable-1.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-2.0.5.jar
[INFO]     Plugin Dependency Resolved: maven-filtering-1.1.jar
[INFO]     Plugin Dependency Resolved: plexus-interpolation-1.13.jar
[INFO] Plugin Resolved: maven-deploy-plugin-2.7.jar
[INFO]     Plugin Dependency Resolved: maven-plugin-api-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-project-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-model-2.0.6.jar
[INFO]     Plugin Dependency Resolved: maven-artifact-2.0.6.jar
[INFO]     Plugin Dependency Resolved: plexus-utils-1.5.6.jar
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] MyAEMProject Project - Reactor Project .................... SUCCESS [0.996s]
[INFO] MyAEMProject Project Bundle ............................... SUCCESS [0.605s]
[INFO] MyAEMProject Project Package .............................. SUCCESS [0.423s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.903s
[INFO] Finished at: Fri Jul 24 18:43:34 GMT 2015
[INFO] Final Memory: 20M/215M
[INFO] ------------------------------------------------------------------------

If you notice for content-package-maven-plugin-0.0.20.jar it doesn't resolve any dependencies, while the required animal-sniffer dependency does exists in our internal nexus.

Has any one faced this issue? Can anyone give me any direction on how to head from here, as this is blocker for us.


回答1:


After a detailed investigation, this is now resolved. Just want to share the findings so that it may help others.

  1. The content-package-maven-plugin which was uploaded to our local nexus got corrupted.
  2. Interestingly maven was not throwing any errors when i was trying mvn install command on my AEM project. Rather it was giving NoClassDefFound error for a further dependency of content-package-maven-plugin.
  3. From the output of, mvn dependency:resolve-plugins, it was confirmed that the dependencies are not fully resolved for particular this plugin JAR, I tried to manually download the artifact from nexus & try to open/unjar it.
  4. The artifact pom was corrupted and hence I uploaded the fresh artifact in nexus, and this time all went smooth.

AEM project is now building fine with local nexus dependencies.




回答2:


I wanted to leave a comment that option 4. solved it for me as well, but I just registered for stackoverflow and don't have the required points yet.

The pom for content-pacakage-maven-plugin is complex, so if you do need to add this to an internal repo I would suggest getting the *.jar and *.pom files from Adobe's public repo use them together.



来源:https://stackoverflow.com/questions/31597001/aem-cq5-project-giving-noclassdeffounderror-for-org-codehaus-mojo-animal-sniffer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!