Discussion:
Anyone using annotationProcessorPaths in maven-compiler-plugin
Mark Derricutt
2016-03-23 23:37:13 UTC
Permalink
Hey all,

Has anyone successfully used the new `<annotationProcessorPaths>` setting in the `maven-compiler-plugin` at all?

I'm adding:

```xml
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path>
</annotationProcessorPaths>
```

to my compiler plugins configuration but it doesn't seem to work, when running maven with -X I see the configuration is picked up, but it doesn't seem to get passed to the compiler at all?

```xml
[DEBUG] Goal: org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path>
</annotationProcessorPaths>
<basedir default-value="${basedir}"/>
<buildDirectory default-value="${project.build.directory}"/>
<classpathElements default-value="${project.compileClasspathElements}"/>
<compileSourceRoots default-value="${project.compileSourceRoots}"/>
<compilerId default-value="javac">${maven.compiler.compilerId}</compilerId>
<compilerReuseStrategy default-value="${reuseCreated}">${maven.compiler.compilerReuseStrategy}</compilerReuseStrategy>
<compilerVersion>${maven.compiler.compilerVersion}</compilerVersion>
<debug default-value="true">${maven.compiler.debug}</debug>
<debuglevel>${maven.compiler.debuglevel}</debuglevel>
<encoding default-value="${project.build.sourceEncoding}">${encoding}</encoding>
<executable>${maven.compiler.executable}</executable>
<failOnError default-value="true">${maven.compiler.failOnError}</failOnError>
<forceJavacCompilerUse default-value="false">${maven.compiler.forceJavacCompilerUse}</forceJavacCompilerUse>
<fork default-value="false">${maven.compiler.fork}</fork>
<generatedSourcesDirectory default-value="${project.build.directory}/generated-sources/annotations"/>
<maxmem>${maven.compiler.maxmem}</maxmem>
<meminitial>${maven.compiler.meminitial}</meminitial>
<mojoExecution default-value="${mojoExecution}"/>
<optimize default-value="false">${maven.compiler.optimize}</optimize>
<outputDirectory default-value="${project.build.outputDirectory}"/>
<project default-value="${project}"/>
<projectArtifact default-value="${project.artifact}"/>
<session default-value="${session}"/>
<showDeprecation default-value="false">${maven.compiler.showDeprecation}</showDeprecation>
<showWarnings default-value="false">${maven.compiler.showWarnings}</showWarnings>
<skipMain>${maven.main.skip}</skipMain>
<skipMultiThreadWarning default-value="false">${maven.compiler.skipMultiThreadWarning}</skipMultiThreadWarning>
<source default-value="1.5">${maven.compiler.source}</source>
<staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
<target default-value="1.5">${maven.compiler.target}</target>
<useIncrementalCompilation default-value="true">${maven.compiler.useIncrementalCompilation}</useIncrementalCompilation>
<verbose default-value="false">${maven.compiler.verbose}</verbose>
</configuration>
```

When running the compiler with `<verbose>true</verbose>` I don't see the `dagger-compiler` artefact anywhere on the paths mentioned ( to be expected since it should be on the annotation path not class-path, but we don't print out the annotation path ).

Am I missing something simple? Including `dagger-compiler` as a normal dependency works fine, but then bleeds into the class path.

Mark
--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
Christopher
2016-03-25 00:21:31 UTC
Permalink
The only annotation processor I use is Google's auto-service. I didn't find
this to be setting to be useful at all in that case, because I still need
the auto-service on the classpath (as an optional dependency) so I can
actually use the @AutoService annotation in my source. I didn't try it with
any other annotation processor, which would work without being on the
classpath.
Post by Mark Derricutt
Hey all,
Has anyone successfully used the new <annotationProcessorPaths> setting
in the maven-compiler-plugin at all?
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path></annotationProcessorPaths>
to my compiler plugins configuration but it doesn't seem to work, when
running maven with -X I see the configuration is picked up, but it doesn't
seem to get passed to the compiler at all?
[DEBUG] Goal: org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?><configuration>
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path>
</annotationProcessorPaths>
<basedir default-value="${basedir}"/>
<buildDirectory default-value="${project.build.directory}"/>
<classpathElements default-value="${project.compileClasspathElements}"/>
<compileSourceRoots default-value="${project.compileSourceRoots}"/>
<compilerId default-value="javac">${maven.compiler.compilerId}</compilerId>
<compilerReuseStrategy default-value="${reuseCreated}">${maven.compiler.compilerReuseStrategy}</compilerReuseStrategy>
<compilerVersion>${maven.compiler.compilerVersion}</compilerVersion>
<debug default-value="true">${maven.compiler.debug}</debug>
<debuglevel>${maven.compiler.debuglevel}</debuglevel>
<encoding default-value="${project.build.sourceEncoding}">${encoding}</encoding>
<executable>${maven.compiler.executable}</executable>
<failOnError default-value="true">${maven.compiler.failOnError}</failOnError>
<forceJavacCompilerUse default-value="false">${maven.compiler.forceJavacCompilerUse}</forceJavacCompilerUse>
<fork default-value="false">${maven.compiler.fork}</fork>
<generatedSourcesDirectory default-value="${project.build.directory}/generated-sources/annotations"/>
<maxmem>${maven.compiler.maxmem}</maxmem>
<meminitial>${maven.compiler.meminitial}</meminitial>
<mojoExecution default-value="${mojoExecution}"/>
<optimize default-value="false">${maven.compiler.optimize}</optimize>
<outputDirectory default-value="${project.build.outputDirectory}"/>
<project default-value="${project}"/>
<projectArtifact default-value="${project.artifact}"/>
<session default-value="${session}"/>
<showDeprecation default-value="false">${maven.compiler.showDeprecation}</showDeprecation>
<showWarnings default-value="false">${maven.compiler.showWarnings}</showWarnings>
<skipMain>${maven.main.skip}</skipMain>
<skipMultiThreadWarning default-value="false">${maven.compiler.skipMultiThreadWarning}</skipMultiThreadWarning>
<source default-value="1.5">${maven.compiler.source}</source>
<staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
<target default-value="1.5">${maven.compiler.target}</target>
<useIncrementalCompilation default-value="true">${maven.compiler.useIncrementalCompilation}</useIncrementalCompilation>
<verbose default-value="false">${maven.compiler.verbose}</verbose></configuration>
When running the compiler with <verbose>true</verbose> I don't see the
dagger-compiler artefact anywhere on the paths mentioned ( to be expected
since it should be on the annotation path not class-path, but we don't
print out the annotation path ).
Am I missing something simple? Including dagger-compiler as a normal
dependency works fine, but then bleeds into the class path.
Mark
--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
Curtis Rueden
2016-03-25 01:55:23 UTC
Permalink
Hi Mark,

The javadoc of annotationProcessorPaths [1] is not very reassuring for your
intended use case:

"Classpath elements to supply as annotation processor path. If specified,
the compiler will detect annotation processors only in those classpath
elements."

That makes it sounds like it merely limits which classpath elements are
allowed to provide annotation processors—not expand annotation processing
capabilities outside of the normal classpath.

However, the integration test exercising this feature [2] does exactly that
[3], declaring org.issue:annotation-processor as an
annotationProcessingPath but not declaring it in the dependencies at all.
In that case though, unlike your use case, the whole shebang is part of a
multi-module reactor... maybe that makes a difference in whether it works?


Regards,
Curtis

[1]
https://github.com/apache/maven-plugins/blob/cb254e434a40b7ff58c936abbb3f823029a0e466/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java#L227-L254

[2]
https://github.com/apache/maven-plugins/tree/cb254e434a40b7ff58c936abbb3f823029a0e466/maven-compiler-plugin/src/it/MCOMPILER-203-processorpath

[3]
https://github.com/apache/maven-plugins/blob/cb254e434a40b7ff58c936abbb3f823029a0e466/maven-compiler-plugin/src/it/MCOMPILER-203-processorpath/annotation-user/pom.xml#L58-L64
Post by Christopher
The only annotation processor I use is Google's auto-service. I didn't find
this to be setting to be useful at all in that case, because I still need
the auto-service on the classpath (as an optional dependency) so I can
any other annotation processor, which would work without being on the
classpath.
Post by Mark Derricutt
Hey all,
Has anyone successfully used the new <annotationProcessorPaths> setting
in the maven-compiler-plugin at all?
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path></annotationProcessorPaths>
to my compiler plugins configuration but it doesn't seem to work, when
running maven with -X I see the configuration is picked up, but it
doesn't
Post by Mark Derricutt
seem to get passed to the compiler at all?
org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
(default-compile)
Post by Mark Derricutt
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0"
encoding="UTF-8"?><configuration>
Post by Mark Derricutt
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path>
</annotationProcessorPaths>
<basedir default-value="${basedir}"/>
<buildDirectory default-value="${project.build.directory}"/>
<classpathElements
default-value="${project.compileClasspathElements}"/>
Post by Mark Derricutt
<compileSourceRoots default-value="${project.compileSourceRoots}"/>
<compilerId
default-value="javac">${maven.compiler.compilerId}</compilerId>
Post by Mark Derricutt
<compilerReuseStrategy
default-value="${reuseCreated}">${maven.compiler.compilerReuseStrategy}</compilerReuseStrategy>
Post by Mark Derricutt
<compilerVersion>${maven.compiler.compilerVersion}</compilerVersion>
<debug default-value="true">${maven.compiler.debug}</debug>
<debuglevel>${maven.compiler.debuglevel}</debuglevel>
<encoding
default-value="${project.build.sourceEncoding}">${encoding}</encoding>
Post by Mark Derricutt
<executable>${maven.compiler.executable}</executable>
<failOnError
default-value="true">${maven.compiler.failOnError}</failOnError>
Post by Mark Derricutt
<forceJavacCompilerUse
default-value="false">${maven.compiler.forceJavacCompilerUse}</forceJavacCompilerUse>
Post by Mark Derricutt
<fork default-value="false">${maven.compiler.fork}</fork>
<generatedSourcesDirectory
default-value="${project.build.directory}/generated-sources/annotations"/>
Post by Mark Derricutt
<maxmem>${maven.compiler.maxmem}</maxmem>
<meminitial>${maven.compiler.meminitial}</meminitial>
<mojoExecution default-value="${mojoExecution}"/>
<optimize default-value="false">${maven.compiler.optimize}</optimize>
<outputDirectory default-value="${project.build.outputDirectory}"/>
<project default-value="${project}"/>
<projectArtifact default-value="${project.artifact}"/>
<session default-value="${session}"/>
<showDeprecation
default-value="false">${maven.compiler.showDeprecation}</showDeprecation>
Post by Mark Derricutt
<showWarnings
default-value="false">${maven.compiler.showWarnings}</showWarnings>
Post by Mark Derricutt
<skipMain>${maven.main.skip}</skipMain>
<skipMultiThreadWarning
default-value="false">${maven.compiler.skipMultiThreadWarning}</skipMultiThreadWarning>
Post by Mark Derricutt
<source default-value="1.5">${maven.compiler.source}</source>
<staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
<target default-value="1.5">${maven.compiler.target}</target>
<useIncrementalCompilation
default-value="true">${maven.compiler.useIncrementalCompilation}</useIncrementalCompilation>
Post by Mark Derricutt
<verbose
default-value="false">${maven.compiler.verbose}</verbose></configuration>
Post by Mark Derricutt
When running the compiler with <verbose>true</verbose> I don't see the
dagger-compiler artefact anywhere on the paths mentioned ( to be expected
since it should be on the annotation path not class-path, but we don't
print out the annotation path ).
Am I missing something simple? Including dagger-compiler as a normal
dependency works fine, but then bleeds into the class path.
Mark
--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
Thomas Broyer
2016-03-25 07:26:41 UTC
Permalink
Have you set source and target to at least 1.6 or 6?
You should see the -processorpath argument being passed to JavaC when
running with -X.
Post by Mark Derricutt
Hey all,
Has anyone successfully used the new <annotationProcessorPaths> setting
in the maven-compiler-plugin at all?
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path></annotationProcessorPaths>
to my compiler plugins configuration but it doesn't seem to work, when
running maven with -X I see the configuration is picked up, but it doesn't
seem to get passed to the compiler at all?
[DEBUG] Goal: org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile (default-compile)
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0" encoding="UTF-8"?><configuration>
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path>
</annotationProcessorPaths>
<basedir default-value="${basedir}"/>
<buildDirectory default-value="${project.build.directory}"/>
<classpathElements default-value="${project.compileClasspathElements}"/>
<compileSourceRoots default-value="${project.compileSourceRoots}"/>
<compilerId default-value="javac">${maven.compiler.compilerId}</compilerId>
<compilerReuseStrategy default-value="${reuseCreated}">${maven.compiler.compilerReuseStrategy}</compilerReuseStrategy>
<compilerVersion>${maven.compiler.compilerVersion}</compilerVersion>
<debug default-value="true">${maven.compiler.debug}</debug>
<debuglevel>${maven.compiler.debuglevel}</debuglevel>
<encoding default-value="${project.build.sourceEncoding}">${encoding}</encoding>
<executable>${maven.compiler.executable}</executable>
<failOnError default-value="true">${maven.compiler.failOnError}</failOnError>
<forceJavacCompilerUse default-value="false">${maven.compiler.forceJavacCompilerUse}</forceJavacCompilerUse>
<fork default-value="false">${maven.compiler.fork}</fork>
<generatedSourcesDirectory default-value="${project.build.directory}/generated-sources/annotations"/>
<maxmem>${maven.compiler.maxmem}</maxmem>
<meminitial>${maven.compiler.meminitial}</meminitial>
<mojoExecution default-value="${mojoExecution}"/>
<optimize default-value="false">${maven.compiler.optimize}</optimize>
<outputDirectory default-value="${project.build.outputDirectory}"/>
<project default-value="${project}"/>
<projectArtifact default-value="${project.artifact}"/>
<session default-value="${session}"/>
<showDeprecation default-value="false">${maven.compiler.showDeprecation}</showDeprecation>
<showWarnings default-value="false">${maven.compiler.showWarnings}</showWarnings>
<skipMain>${maven.main.skip}</skipMain>
<skipMultiThreadWarning default-value="false">${maven.compiler.skipMultiThreadWarning}</skipMultiThreadWarning>
<source default-value="1.5">${maven.compiler.source}</source>
<staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
<target default-value="1.5">${maven.compiler.target}</target>
<useIncrementalCompilation default-value="true">${maven.compiler.useIncrementalCompilation}</useIncrementalCompilation>
<verbose default-value="false">${maven.compiler.verbose}</verbose></configuration>
When running the compiler with <verbose>true</verbose> I don't see the
dagger-compiler artefact anywhere on the paths mentioned ( to be expected
since it should be on the annotation path not class-path, but we don't
print out the annotation path ).
Am I missing something simple? Including dagger-compiler as a normal
dependency works fine, but then bleeds into the class path.
Mark
--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
Mark Derricutt
2016-03-26 03:24:47 UTC
Permalink
This was using 1.8 and the 3.5.1 of the compiler plugin ( which seems to
have quite major differences in behaviour to 3.5 ), which I think it uses
the tools api and not calling javac ( I do note theres an option to force
using javac tho ) so might give that a shot.
--
"Great artists are extremely selfish and arrogant things" — Steven Wilson,
Porcupine Tree
Post by Thomas Broyer
Have you set source and target to at least 1.6 or 6?
You should see the -processorpath argument being passed to JavaC when
running with -X.
Post by Mark Derricutt
Hey all,
Has anyone successfully used the new <annotationProcessorPaths> setting
in the maven-compiler-plugin at all?
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path></annotationProcessorPaths>
to my compiler plugins configuration but it doesn't seem to work, when
running maven with -X I see the configuration is picked up, but it
doesn't
Post by Mark Derricutt
seem to get passed to the compiler at all?
org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
(default-compile)
Post by Mark Derricutt
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0"
encoding="UTF-8"?><configuration>
Post by Mark Derricutt
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path>
</annotationProcessorPaths>
<basedir default-value="${basedir}"/>
<buildDirectory default-value="${project.build.directory}"/>
<classpathElements
default-value="${project.compileClasspathElements}"/>
Post by Mark Derricutt
<compileSourceRoots default-value="${project.compileSourceRoots}"/>
<compilerId
default-value="javac">${maven.compiler.compilerId}</compilerId>
Post by Mark Derricutt
<compilerReuseStrategy
default-value="${reuseCreated}">${maven.compiler.compilerReuseStrategy}</compilerReuseStrategy>
Post by Mark Derricutt
<compilerVersion>${maven.compiler.compilerVersion}</compilerVersion>
<debug default-value="true">${maven.compiler.debug}</debug>
<debuglevel>${maven.compiler.debuglevel}</debuglevel>
<encoding
default-value="${project.build.sourceEncoding}">${encoding}</encoding>
Post by Mark Derricutt
<executable>${maven.compiler.executable}</executable>
<failOnError
default-value="true">${maven.compiler.failOnError}</failOnError>
Post by Mark Derricutt
<forceJavacCompilerUse
default-value="false">${maven.compiler.forceJavacCompilerUse}</forceJavacCompilerUse>
Post by Mark Derricutt
<fork default-value="false">${maven.compiler.fork}</fork>
<generatedSourcesDirectory
default-value="${project.build.directory}/generated-sources/annotations"/>
Post by Mark Derricutt
<maxmem>${maven.compiler.maxmem}</maxmem>
<meminitial>${maven.compiler.meminitial}</meminitial>
<mojoExecution default-value="${mojoExecution}"/>
<optimize default-value="false">${maven.compiler.optimize}</optimize>
<outputDirectory default-value="${project.build.outputDirectory}"/>
<project default-value="${project}"/>
<projectArtifact default-value="${project.artifact}"/>
<session default-value="${session}"/>
<showDeprecation
default-value="false">${maven.compiler.showDeprecation}</showDeprecation>
Post by Mark Derricutt
<showWarnings
default-value="false">${maven.compiler.showWarnings}</showWarnings>
Post by Mark Derricutt
<skipMain>${maven.main.skip}</skipMain>
<skipMultiThreadWarning
default-value="false">${maven.compiler.skipMultiThreadWarning}</skipMultiThreadWarning>
Post by Mark Derricutt
<source default-value="1.5">${maven.compiler.source}</source>
<staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
<target default-value="1.5">${maven.compiler.target}</target>
<useIncrementalCompilation
default-value="true">${maven.compiler.useIncrementalCompilation}</useIncrementalCompilation>
Post by Mark Derricutt
<verbose
default-value="false">${maven.compiler.verbose}</verbose></configuration>
Post by Mark Derricutt
When running the compiler with <verbose>true</verbose> I don't see the
dagger-compiler artefact anywhere on the paths mentioned ( to be expected
since it should be on the annotation path not class-path, but we don't
print out the annotation path ).
Am I missing something simple? Including dagger-compiler as a normal
dependency works fine, but then bleeds into the class path.
Mark
--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
Andreas Gudian
2016-03-26 11:28:08 UTC
Permalink
Right, in 3.5.1 I fixed an oversight that caused the modules direct
dependencies to also show up in -processorpath.

So anyway, in 3.5.1, it should work just as expected. Are you maybe using a
different plexus-compiler implementation by configuring an
addidtional plugin-dependency?

Here's another example config that does work:
http://mapstruct.org/documentation/1.1/reference/html/index.html#setup

Andreas
Post by Mark Derricutt
This was using 1.8 and the 3.5.1 of the compiler plugin ( which seems to
have quite major differences in behaviour to 3.5 ), which I think it uses
the tools api and not calling javac ( I do note theres an option to force
using javac tho ) so might give that a shot.
--
"Great artists are extremely selfish and arrogant things" — Steven Wilson,
Porcupine Tree
Post by Thomas Broyer
Have you set source and target to at least 1.6 or 6?
You should see the -processorpath argument being passed to JavaC when
running with -X.
Post by Mark Derricutt
Hey all,
Has anyone successfully used the new <annotationProcessorPaths> setting
in the maven-compiler-plugin at all?
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path></annotationProcessorPaths>
to my compiler plugins configuration but it doesn't seem to work, when
running maven with -X I see the configuration is picked up, but it
doesn't
Post by Mark Derricutt
seem to get passed to the compiler at all?
org.apache.maven.plugins:maven-compiler-plugin:3.5.1:compile
(default-compile)
Post by Mark Derricutt
[DEBUG] Style: Regular
[DEBUG] Configuration: <?xml version="1.0"
encoding="UTF-8"?><configuration>
Post by Mark Derricutt
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.1</version>
</path>
</annotationProcessorPaths>
<basedir default-value="${basedir}"/>
<buildDirectory default-value="${project.build.directory}"/>
<classpathElements
default-value="${project.compileClasspathElements}"/>
Post by Mark Derricutt
<compileSourceRoots default-value="${project.compileSourceRoots}"/>
<compilerId
default-value="javac">${maven.compiler.compilerId}</compilerId>
Post by Mark Derricutt
<compilerReuseStrategy
default-value="${reuseCreated}">${maven.compiler.compilerReuseStrategy}</compilerReuseStrategy>
Post by Thomas Broyer
Post by Mark Derricutt
<compilerVersion>${maven.compiler.compilerVersion}</compilerVersion>
<debug default-value="true">${maven.compiler.debug}</debug>
<debuglevel>${maven.compiler.debuglevel}</debuglevel>
<encoding
default-value="${project.build.sourceEncoding}">${encoding}</encoding>
Post by Mark Derricutt
<executable>${maven.compiler.executable}</executable>
<failOnError
default-value="true">${maven.compiler.failOnError}</failOnError>
Post by Mark Derricutt
<forceJavacCompilerUse
default-value="false">${maven.compiler.forceJavacCompilerUse}</forceJavacCompilerUse>
Post by Thomas Broyer
Post by Mark Derricutt
<fork default-value="false">${maven.compiler.fork}</fork>
<generatedSourcesDirectory
default-value="${project.build.directory}/generated-sources/annotations"/>
Post by Thomas Broyer
Post by Mark Derricutt
<maxmem>${maven.compiler.maxmem}</maxmem>
<meminitial>${maven.compiler.meminitial}</meminitial>
<mojoExecution default-value="${mojoExecution}"/>
<optimize default-value="false">${maven.compiler.optimize}</optimize>
<outputDirectory default-value="${project.build.outputDirectory}"/>
<project default-value="${project}"/>
<projectArtifact default-value="${project.artifact}"/>
<session default-value="${session}"/>
<showDeprecation
default-value="false">${maven.compiler.showDeprecation}</showDeprecation>
Post by Mark Derricutt
<showWarnings
default-value="false">${maven.compiler.showWarnings}</showWarnings>
Post by Mark Derricutt
<skipMain>${maven.main.skip}</skipMain>
<skipMultiThreadWarning
default-value="false">${maven.compiler.skipMultiThreadWarning}</skipMultiThreadWarning>
Post by Thomas Broyer
Post by Mark Derricutt
<source default-value="1.5">${maven.compiler.source}</source>
<staleMillis default-value="0">${lastModGranularityMs}</staleMillis>
<target default-value="1.5">${maven.compiler.target}</target>
<useIncrementalCompilation
default-value="true">${maven.compiler.useIncrementalCompilation}</useIncrementalCompilation>
Post by Thomas Broyer
Post by Mark Derricutt
<verbose
default-value="false">${maven.compiler.verbose}</verbose></configuration>
Post by Mark Derricutt
When running the compiler with <verbose>true</verbose> I don't see the
dagger-compiler artefact anywhere on the paths mentioned ( to be
expected
Post by Thomas Broyer
Post by Mark Derricutt
since it should be on the annotation path not class-path, but we don't
print out the annotation path ).
Am I missing something simple? Including dagger-compiler as a normal
dependency works fine, but then bleeds into the class path.
Mark
--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
Mark Derricutt
2016-03-27 09:46:41 UTC
Permalink
Post by Andreas Gudian
Right, in 3.5.1 I fixed an oversight that caused the modules direct
dependencies to also show up in -processorpath.
Hrm, actually that's the reason I was looking at using this method over just listing the deps in the first place - since the processor in question pulls in things like Guava (and a different version ) as dependencies of the processor, and not the generated code, which was causing some issues with other parts of the build based on the class path.
Post by Andreas Gudian
So anyway, in 3.5.1, it should work just as expected. Are you maybe using a
different plexus-compiler implementation by configuring an
addidtional plugin-dependency?
Not in that project no - will check again when I get back to the office after the Easter break.
Post by Andreas Gudian
http://mapstruct.org/documentation/1.1/reference/html/index.html#setup
Hrm, that looks similar to what I had - I'll take a look at making a standalone project and seeing if that exhibits the same issue.

Mark
--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
Andreas Gudian
2016-03-27 10:30:38 UTC
Permalink
Post by Mark Derricutt
Post by Andreas Gudian
Right, in 3.5.1 I fixed an oversight that caused the modules direct
dependencies to also show up in -processorpath.
Hrm, actually that's the reason I was looking at using this method over
just listing the deps in the first place - since the processor in question
pulls in things like Guava (and a different version ) as dependencies of
the processor, and not the generated code, which was causing some issues
with other parts of the build based on the class path.
OK, then you should be fine with 3.5.1 :-)
Post by Mark Derricutt
Post by Andreas Gudian
So anyway, in 3.5.1, it should work just as expected. Are you maybe
using a
Post by Andreas Gudian
different plexus-compiler implementation by configuring an
addidtional plugin-dependency?
Not in that project no - will check again when I get back to the office
after the Easter break.
Post by Andreas Gudian
http://mapstruct.org/documentation/1.1/reference/html/index.html#setup
Hrm, that looks similar to what I had - I'll take a look at making a
standalone project and seeing if that exhibits the same issue.
Alright, just let me know if you find any trouble there. What you described
in your usecase is exactly what that feature is supposed to cover, so let's
make sure it works for you there.

Andreas
Post by Mark Derricutt
Mark
--
Mark Derricutt
http://www.theoryinpractice.net
http://www.chaliceofblood.net
http://plus.google.com/+MarkDerricutt
http://twitter.com/talios
http://facebook.com/mderricutt
Loading...