Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
I have one profile to configure maven-javadoc-plugin which is only activate for jdk 1.8 or greater. (doclint exist since java 1.8)
And another profile to use toolchain with jdk 1.7.
<profile> <id>configure-doclint</id> <activation> <jdk>[1.8,)</jdk> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> <configuration> <doclint>all,-missing</doclint> </configuration> </plugin> </plugins> </build> </profile> <profile> <id>useToolchain</id> <build> <plugins> <plugin> <artifactId>maven-toolchains-plugin</artifactId> <executions> <execution> <goals> <goal>toolchain</goal> </goals> </execution> </executions> <configuration> <toolchains> <jdk> <version>1.7</version> </jdk> </toolchains> </configuration> </plugin> </plugins> </build> </profile>
The issue is that if I run "mvn install javadoc:javadoc -PuseToolchain" with java 8 or greater, t}}his will failed with a "{{Exit code: 1 - javadoc: error - invalid flag: -Xdoclint:none"
I guess this is because jdk version which run maven is used instead of toolchain jdk version to decide to activate or not "configure-doclint" profile.
Maybe it could make sense to add a new profile activation field <toolchain-jdk>.
If no toolchain is used the current running version of maven should be used and so in this case behave like <jdk>
WDYT ?
Attachments
Issue Links
- is related to
-
MPOM-264 Parameterize maven-compiler-plugin with parameter "release" when running on JDK 9+
- Closed