[ https://issues.apache.org/jira/browse/MCOMPILER-511?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17651733#comment-17651733 ]
Piotr Zygielo commented on MCOMPILER-511: ----------------------------------------- When with given reproducer {{mvn clean generate-sources}} is used - no .class is generated (no compilation happens), as then execution {{id=process}} takes place. I believe it's the info log that uses "Compiling". But what other verb would be more appropriate? javacing? With {{clean compile}} - the second :compile (the first is bound to generare-sources) DOES compile. As expected. IMO - all is fine with the plugin, and this issue is either invalid or should be changed to improvement to change the log message, if that is possible at all. > proc:only doesn't work as expected > ---------------------------------- > > Key: MCOMPILER-511 > URL: https://issues.apache.org/jira/browse/MCOMPILER-511 > Project: Maven Compiler Plugin > Issue Type: Bug > Affects Versions: 3.10.1 > Environment: Windows, Tested with JDK 1.8, 11, 17 > Reporter: Stefan Röck > Priority: Major > > According to the docs > [https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#proc,] > *proc:only* should only process annotation processors but *not* trigger > compilation. However, files are always compiled with the following config: > {code} > <plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-compiler-plugin</artifactId> > <version>3.10.1</version> > <executions> > <execution> > <id>process</id> > <phase>generate-sources</phase> > <goals> > <goal>compile</goal> > </goals> > <configuration> > <annotationProcessors> > > <processor>org.immutables.processor.ProxyProcessor</processor> > </annotationProcessors> > <proc>only</proc> > </configuration> > </execution> > </executions> > </plugin> > {code} > See small reproducer repo at https://github.com/stefanroeck/annotationtest > In the logs I can see that the prop is passed through, but still 2 classes > are compiled: > {code} > 21:12:25,407 [DEBUG] -d C:\dev\IdeaProjects\annotationtest\target\classes > -classpath > C:\dev\IdeaProjects\annotationtest\target\classes;C:\Dev\.m2\repository\org\immutables\value\2.8.8\value-2.8.8.jar; > -sourcepath > C:\dev\IdeaProjects\annotationtest\src\main\java;C:\dev\IdeaProjects\annotationtest\target\generated-sources\annotations; > -s C:\dev\IdeaProjects\annotationtest\target\generated-sources\annotations > -proc:only -processor org.immutables.processor.ProxyProcessor -g -nowarn > -target 17 -source 17 -encoding UTF-8 > 21:12:25,412 [DEBUG] incrementalBuildHelper#beforeRebuildExecution > 21:12:25,412 [INFO] Compiling 2 source files to > C:\dev\IdeaProjects\annotationtest\target\classes > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)