maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Patrick <nhoj.patr...@gmail.com>
Subject Re: Why does mvn compiile using java 1.3?
Date Fri, 16 Nov 2012 13:21:00 GMT
Jasper,

I also experience similar issues, it comes down to what version of
java you have installed, what version of the plugin you use and what
their respective defaults are. To avoid this I would explicitly state
version's of plugins and also a few other useful properties. I always
but at the least the following in every new project pom;

<project ...
[...]
   <build>
[...]
      <pluginManagement>
[...]
         <plugins>
[...]
            <plugin>
               <groupId>org.apache.maven.plugins</groupId>
               <artifactId>maven-compiler-plugin</artifactId>
               <version>2.5.1</version>
            </plugin>
[...]
         </plugins>
[...]
      </pluginManagement>
[...]
   </build>
[...]
   <properties>
[...]
      <project.custom.encoding>UTF-8</project.custom.encoding>
      <project.custom.java.version>1.6</project.custom.java.version>
      <maven.compiler.source>${project.custom.java.version}</maven.compiler.source>
      <maven.compiler.target>${project.custom.java.version}</maven.compiler.target>
      <project.build.sourceEncoding>${project.custom.encoding}</project.build.sourceEncoding>
      <project.build.outputEncoding>${project.custom.encoding}</project.build.outputEncoding>
      <project.reporting.outputEncoding>${project.custom.encoding}</project.reporting.outputEncoding>
[...]
   </properties>
</project>

John

On 16 November 2012 09:50, Olivier Lamy <olamy@apache.org> wrote:
> Hi,
> Which maven-compiler-plugin version are you using ?
> Does your colleague set JAVA_HOME env var on windows ?
>
> 2012/11/16 Jasper Floor <j.floor@onehippo.com>:
>> Hi,
>>
>> For some reason mvn is compiling using java 1.3. I do not understand this
>> behavior. I have never seen this before and it doesn't do this on my
>> colleagues machine with the same project. The big difference is he is a
>> windows use and I am a linux user.
>>
>> Apache Maven 3.0.4
>> Maven home: /usr/share/maven
>> Java version: 1.6.0_33, vendor: Sun Microsystems Inc.
>> Java home: /opt/jdk/jdk1.6.0_33/jre
>> Default locale: en_US, platform encoding: UTF-8
>> OS name: "linux", version: "3.2.0-29-generic", arch: "amd64", family: "unix"
>>
>> Its a Mint distro, but with my own java installed as I required the 1.6
>>  jdk.
>>
>>
>> mvg,
>> Jasper
>
>
>
> --
> Olivier Lamy
> Talend: http://coders.talend.com
> http://twitter.com/olamy | http://linkedin.com/in/olamy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message