apache / apache/maven-toolchains-plugin

[MTOOLCHAINS-34] Toolchains breaks annotation processing

Open
#98 2 comments 0 reactions 0 assignees View on GitHub
bug priority:major
Dominant language
Java
Stars
27
Forks
31
PR merge metrics
No merged PRs in 30d

Description

**[James](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=hooker)** opened **[MTOOLCHAINS-34](https://issues.apache.org/jira/browse/MTOOLCHAINS-34?redirect=false)** and commented

The following will work...

Clone: https://github.com/cloudogu/annotation-processors

Then:

1: cd part-1-maven

2: mvn clean install.

You will see:

[*INFO*] found `@Log` at com.cloudogu.blog.annotationprocessor.sample.Hello

In the output to indicate that it works.

Now, if you clone my forked repo:

https://github.com/jimhooker2002/annotation-processors

You'll see the following diff: https://github.com/cloudogu/annotation-processors/compare/master...jimhooker2002:master

And note that it will no longer work (the log message no longer appears).  In my forked repo, if you comment out the maven-toolchains-plugin, it will start to work again.

So, it looks as though toolchains plugin is preventing the annotation processing from running somehow.

 

My setup:

mvn -v

**Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04-04T20:00:29+01:00)**

Maven home: /Users/james.hooker/Applications/apache-maven-3.6.1

Java version: 11.0.4, vendor: AdoptOpenJDK, runtime: /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home

Default locale: en_GB, platform encoding: UTF-8

OS name: "mac os x", version: "10.12.6", arch: "x86_64", family: "mac"

 

/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java --version

openjdk 11.0.4 2019-07-16

OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.4+11)

OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.4+11, mixed mode)

Following files attached:

1: My toolchains.xml is attached 
2: mvn -X output when it works.

3: mvn -X output whet it doesn't work.

 

---

**Attachments:**
- [mvn-debug-not-working.txt](https://issues.apache.org/jira/secure/attachment/13019631/mvn-debug-not-working.txt) (_163.51 kB_)
- [mvn-debug-working.txt](https://issues.apache.org/jira/secure/attachment/13019632/mvn-debug-working.txt) (_158.18 kB_)
- [toolchains.xml](https://issues.apache.org/jira/secure/attachment/13019623/toolchains.xml) (_1.18 kB_)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.