[ https://issues.apache.org/jira/browse/MPOM-44?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hervé Boutemy closed MPOM-44. ----------------------------- Resolution: Fixed Fix Version/s: ASF-15 Assignee: Hervé Boutemy patch applied, thank you > 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 > Assignee: Hervé Boutemy > Fix For: ASF-15 > > 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 was sent by Atlassian JIRA (v6.2#6252)