You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@apache.org> on 2013/07/19 23:40:48 UTC
[jira] [Updated] (MPOM-44) Compiler version settings cannot be
overridden by defining maven.compiler.source/target
[ https://issues.apache.org/jira/browse/MPOM-44?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dennis Lundberg updated MPOM-44:
--------------------------------
Component/s: (was: maven-plugins)
asf
> Compiler version settings cannot be overridden by defining maven.compiler.source/target
> ---------------------------------------------------------------------------------------
>
> Key: MPOM-44
> URL: https://issues.apache.org/jira/browse/MPOM-44
> Project: Maven POMs
> Issue Type: Bug
> Components: asf
> Affects Versions: ASF-13
> Reporter: Sebb
> Attachments: MPOM-44-extended.patch, MPOM-44.patch
>
>
> The compiler plugin by default picks up the source and target from the properties
> maven.compiler.source and maven.compiler.target.
> Unfortunately, the Apache POM uses the following fixed values to specify the version:
> {code}
> <build>
> <pluginManagement>
> <plugins>
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.5.1</version>
> <configuration>
> <source>1.4</source>
> <target>1.4</target>
> </configuration>
> {code}
> This means that child poms which use the properties expecting them to be honoured have to override the configuration as follows:
> {code}
> <plugin>
> <groupId>org.apache.maven.plugins</groupId>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>${maven.compile.source}</source>
> <target>${maven.compile.target}</target>
> </configuration>
> </plugin>
> {code}
> This is unnecessary and wrong.
> For compatibility, the Apache Pom does need to still specify the default source/target as 1.4 (the plugin default is 1.5), but it should do so by using the standard properties which can then be overridden.
> In fact, if the properties are defined, the compiler plugin config could be dropped, as it is the default behaviour.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira