I suppose you could define a convention with a parameter name: since the choice of the JDK used to build is really done in your project pom.xml, if this pom.xml sets the property, you can't have any discrepency
but you're right: activation was created at a time when we didn't think to decouple the JRE running Maven with the JDK used to build code, so there are such edge cases to find and workaround Regards, Hervé Le mardi 16 juin 2015 16:06:54 Martijn Dashorst a écrit : > In our master POM we have defined the following (logical) profile to > disable the doclint of javadoc to be able to actually render our > javadocs. > > <profile> > <id>Java 8</id> > <activation> > <jdk>1.8</jdk> > </activation> > <properties> > <!-- Disable javadoc linter when building with Java 8 > > http://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html > --> > <additionalparam>-Xdoclint:none</additionalparam> > </properties> > </profile> > > However this parameter is not supported by Java 7 and anyone trying to > use this parameter with Java 7 will get an error. Now this is not a > problem you'd think, since this is only active when you run Maven with > Java 8? Right? > > Well, the truth is more complicated when you use maven toolchains... > In our case we have created a release profile with the toolchains > plugin configured to actually use Java 7. So Maven runs with Java 8, > enables the "Java 8" profile, adds the "additionalparam" configuration > to the javadoc plugin, and starts the toolchain... with java 7's > javadoc, giving a big error. > > Does a solution exist for this problem? (granted we can run the build > using Java 7, but that is exactly what I was trying to avoid with the > toolchains!) > > Martijn > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
