[MCOMPILER-461] Compile fails when class references a class generated by an annotation processor and module-info.java is present
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
Research direction
Reproduce the failure by checking out logging-log4j2 at module-compile-fails and running mvn clean install. Inspect log4j-core/src/main/java/org/apache/logging/log4j/core/osgi/Activator.java, module-info.java, and the annotation-processor-generated Log4jPlugins reference, then compare Maven's compile command with direct javac as described. Done means isolating why Maven fails to resolve the generated class and verifying the module build succeeds.
Written by the indexing model from the issue text.
Description
Ralph Goers opened MCOMPILER-461 and commented
While trying to convert Log4j-core to a JPMS module I have run into an issue where I have a class that references a class that is generated by Log4j's annotation processor and that class gets an error saying the referenced class cannot be found. However, after the compile fails I can see that the file was generated.
To reproduce:
git clone https://github.com/apache/logging-log4j2.git
cd logging-log4j2
git checkout module-compile-fails
mvn clean install
The compile will fail in log4j-core. Some appear to be errors in javac for which I have opened an issue with openjdk. But if I do "mvn -X clean install" and copy the compile command line and prepend it with javac when it runs I no longer see
[ERROR] /Users/rgoers/projects/apache/logging/log4j/logging-log4j2/log4j-core/src/main/java/org/apache/logging/log4j/core/osgi/Activator.java:[29,44] error: cannot find symbol symbol: class Log4jPlugins location: package org.apache.logging.log4j.core.plugins
which indicates that Maven is somehow causing that.
Affects: 3.8.1
Attachments:
1 votes, 2 watchers
- Dominant language
- Java
- Stars
- 261
- Forks
- 194
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 17
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-compiler-plugin
-
bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/maven-compiler-plugin#1148 · 2 comments ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 4/5 3-5 days Newbie friendliness 45/100
apache/maven-compiler-plugin#1140 · 1 comment ·
Maintainers usually reply within 1 day
-
3.x enhancement
Difficulty 3/5 1-2 days Newbie friendliness 68/100
apache/maven-compiler-plugin#1138 ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 4/5 3-5 days Newbie friendliness 64/100
apache/maven-compiler-plugin#1137 ·
Maintainers usually reply within 1 day
-
3.x bug
Difficulty 3/5 1-2 days Newbie friendliness 55/100
apache/maven-compiler-plugin#1124 · 1 comment · 3 reactions ·
Maintainers usually reply within 1 day
All issues in apache/maven-compiler-plugin
Similar issues
-
`GET /v1/event/token/{uuid}` can report a BOM upload as done before policy evaluation and metrics have finishedPossibly taken @Zargath claimed this today. Opendefect in triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
DependencyTrack/dependency-track#7646 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
floci-io/floci#5425 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
objectionary/eo-graphs#80 ·
-
WebMvcStreamableServerTransportProvider: idle-session eviction stops permanently after a NullPointerException when a session is deleted mid-sweepPossibly taken @lejuho claimed this today. Openstatus: waiting-for-triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
spring-projects/spring-ai#7133 ·
Maintainers usually reply within 6 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
objectionary/jucs#141 ·
Maintainers usually reply within 1 day