Under Java 9, mvn install fails in javadoc build with : "Cannot find symbol: javax.annotation.PostConstruct"
See original GitHub issue[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] apicurio-studio .................................... SUCCESS [ 1.836 s]
[INFO] apicurio-studio-shared ............................. SUCCESS [ 0.014 s]
[INFO] apicurio-studio-be-shared-beans .................... SUCCESS [ 3.059 s]
[INFO] apicurio-studio-be-shared-config ................... SUCCESS [ 1.405 s]
[INFO] apicurio-studio-be ................................. SUCCESS [ 0.011 s]
[INFO] apicurio-studio-be-hub-api ......................... FAILURE [ 18.122 s]
[INFO] apicurio-studio-fe ................................. SKIPPED
[INFO] apicurio-studio-fe-app ............................. SKIPPED
[INFO] apicurio-studio-fe-wildfly ......................... SKIPPED
[INFO] apicurio-studio-distro ............................. SKIPPED
[INFO] apicurio-studio-distro-quickstart .................. SKIPPED
[INFO] apicurio-studio-tools .............................. SKIPPED
[INFO] apicurio-studio-tools-release ...................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 24.691 s
[INFO] Finished at: 2017-10-30T15:47:33-07:00
[INFO] Final Memory: 43M/143M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.10.1:jar (attach-javadocs) on project apicurio-studio-be-hub-api: MavenReportException: Error while creating archive:
[ERROR] Exit code: 1 - /Users/dmoles/Work/Scratch/apicurio-studio/back-end/hub-api/src/main/java/io/apicurio/hub/api/rest/impl/HubApplication.java:21: error: cannot find symbol
[ERROR] import javax.annotation.PostConstruct;
[ERROR] ^
(etc.)
This is with Oracle JDK 9.0.1 and Maven 3.5.2 on Mac OS 10.12.6. With JDK 1.8.0_152 the build completes successfully.
$ mvn -v
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T00:58:13-07:00)
Maven home: /usr/local/Cellar/maven/3.5.2/libexec
Java version: 9.0.1, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"
Issue Analytics
- State:
- Created 6 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
import javax.annotation.* cannot be resolved in Eclipse's Java ...
Java Build Path (JRE System Libraries) : 10. Now, the import statement is throwing an Error message: The import javax.annotation.PostConstruct ...
Read more >Build broken due to missing package javax.annotation on ...
mvn clean test fails to build on Java 11 due to: [INFO] ... cannot find symbol symbol: class PostConstruct location: class ...
Read more >[#ATLAS-2966] Unable to build against Java 11 - ASF JIRA
Steps: git clone ...atlas.git mvn -DskipTests clean install With: java ... cannot find symbol [ERROR] symbol: class PostConstruct [ERROR] ...
Read more >javax.annotation.PostConstruct cannot be resolved - Eclipse
I am using JavaSE-9 version. It shows error that @PostConstruct cannot be resolved. I also tried changing build environments, but failed to ...
Read more >Spring PostConstruct and PreDestroy Annotations - Baeldung
A method annotated with @PreDestroy runs only once, just before Spring removes our bean from the application context. Same as with @ ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Success!
Well the good news is I just tried a full re-build and successfully ran the quickstart using java 8. There’s been some churn on master recently so I wanted to make sure it still worked. 😃 I’ll try java 9 now! WCGW?