0

I created project using archetype-12 for AEM-6.3 referring here.

Also tried to compile projects from github like aem-simple

Getting following errors,

[INFO] --- maven-bundle-plugin:3.3.0:bundle (default-bundle) @ AEMMaven12.core ---
[WARNING] Error injecting: org.apache.felix.bundleplugin.BundlePlugin
java.lang.NoClassDefFoundError: aQute/bnd/osgi/Analyzer

Tried changing Java-1.8.. minor versions and also tried with different maven versions above 3.2.

Dileepa
  • 1,019
  • 1
  • 15
  • 40

3 Answers3

1

What Maven goals are you running? Can you confirm that Maven is downloading the dependency to your ~/.m2 folder when running mvn clean install? You may want to clean out your ~/.m2 folder to ensure you do not have stale or corrupted dependencies.

GuillaumeCleme
  • 317
  • 1
  • 2
  • 10
0

I vaguely remember running into the same issue. If I am not mistaken, version 12 of the AEM Archetype had this issue. I believe it was fixed in version 13, although you may want to try the latest version (19) from the aem-project-archetype repository

GuillaumeCleme
  • 317
  • 1
  • 2
  • 10
  • It did not solve the problem getting again error as follows, [INFO] --- maven-bundle-plugin:4.1.0:manifest (generate-osgi-metadata-for-unitte sts) @ aem-guides-wknd.core --- [WARNING] Error injecting: org.apache.felix.bundleplugin.ManifestPlugin java.lang.NoClassDefFoundError: org/apache/maven/shared/dependency/graph/Depende ncyGraphBuilderException – Dileepa May 27 '19 at 10:06
  • @Dileepa What Maven goals are you running? Can you confirm that Maven is downloading the dependency to your `~/.m2` folder when running `mvn clean install`? You may want to clean out your `~/.m2`folder to ensure you do not have stale or corrupted dependencies. – GuillaumeCleme May 27 '19 at 17:36
  • You were right. I deleted {~/.m2/repository} and tried. Worked like charm. Can you please add last comment as separate answer, so that I can mark it as accepted. – Dileepa Jun 02 '19 at 13:59
  • @Dileepa comment added as an answer. – GuillaumeCleme Jun 06 '19 at 18:29
0

The dependency is missing in the pom. Add the required dependency in pom and check if the same jar is downloaded in the m2. Many times due to proxies prevent from downloading the jars. Hope this helps.

Sadistic
  • 541
  • 4
  • 12