cschneider / Karaf-Tutorial

http://cschneider.github.io/Karaf-Tutorial/
Apache License 2.0
271 stars 305 forks source link

Error building persistence bundle #35

Closed rburgst closed 7 years ago

rburgst commented 7 years ago

It seems there is a depedency missing for the blueprint maven plugin: javax/annotation/PostConstruct is missing, see below:

Steps taken

  1. clone repo
  2. cd Karaf-Tutorial/tasklist-blueprint-cdi
  3. mvn clean install

BOOM

[INFO] model .............................................. SUCCESS [  2.154 s]
[INFO] persistence ........................................ FAILURE [  0.309 s]
[INFO] ui ................................................. SKIPPED
[INFO] features ........................................... SKIPPED
[INFO] service ............................................ SKIPPED
[INFO] angular-ui ......................................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.122 s
[INFO] Finished at: 2017-05-03T07:47:39+02:00
[INFO] Final Memory: 25M/85M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.aries.blueprint:blueprint-maven-plugin:1.4.0:blueprint-generate (default) on project persistence: Execution default of goal org.apache.aries.blueprint:blueprint-maven-plugin:1.4.0:blueprint-generate failed: A required class was missing while executing org.apache.aries.blueprint:blueprint-maven-plugin:1.4.0:blueprint-generate: javax/annotation/PostConstruct
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.apache.aries.blueprint:blueprint-maven-plugin:1.4.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
cschneider commented 7 years ago

I tried the same and the build worked fine. What OS, java version and maven version do you use?

cschneider commented 7 years ago

I updated the example to the newest versions of the dependencies. Maybe that could also help.

rburgst commented 7 years ago

sorry, my bad, I inadvertently had java 9 set as my current JVM, it doesnt work there. It works with java 8 though.