maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Osipov (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (MCOMPILER-84) Simplify java version configuration by using project-level property
Date Sun, 06 Sep 2015 20:46:14 GMT

     [ https://issues.apache.org/jira/browse/MCOMPILER-84?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Michael Osipov closed MCOMPILER-84.
-----------------------------------
    Resolution: Auto Closed

This issue has been auto closed because it has been inactive for a long period of time. If
you think this issue still applies, retest your problem with the most recent version of Maven
and the affected component, reopen and post your results.

> Simplify java version configuration by using project-level property
> -------------------------------------------------------------------
>
>                 Key: MCOMPILER-84
>                 URL: https://issues.apache.org/jira/browse/MCOMPILER-84
>             Project: Maven Compiler Plugin
>          Issue Type: Improvement
>            Reporter: Grzegorz Borkowski
>
> I hate the fact that in each project I have to redefine the java source level for maven
compiler, from 1.3 to 1.5. Using 1.3 as default in this  day and age simply doesn't make sense.
I reported issue MCOMPILER-80 about it already. 
> In the meantime, I have some more backword-compatible proposition: change maven compiler
to check for some project-level property, if this property is set, it is used for java source
and target level.
> We nee to decide on property name, it can be called "java.version" or similar ("javaVersion"
?). 
> When it is implemented, specifying java version would be much simplified:
> Instead of:
> <build>
> <plugins>
>       <plugin>
>         <groupId>org.apache.maven.plugins</groupId>
>         <artifactId>maven-compiler-plugin</artifactId>
>         <configuration>
>           <source>1.5</source>
>           <target>1.5</target>
>         </configuration>
>       </plugin>
>     </plugins>
> </build>
> We would have:
> <properties>
>    <java.version>1.5</java.version>
> </properties>
> Much simpler and easier to remember!
> BTW. I believe that java version level is really a part of project metadata, not simply
some plugin metadata. So in best case it should be made a part of POM definition, just like
<artifactId>, <version>, <name>, <packaging> itp. But it requires
new XML schema for pom.xml, so it is candidate for next version of maven. Using property doesn't
require any change to XML schema, so it may be implemented without waiting for new version
of maven.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message