Good to know that Maven is now only 8 years behind. Better than 12, I suppose!

Ron

On 28/11/2012 10:40 AM, Stephen Connolly wrote:
Up until m-c-p 2.5ish the default value for source was 1.3.

That was updated and newer versions of m-c-p use 1.5 as the default

http://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#source

Maven 3.1.0 will have m-c-p's default version pinned at least at 2.5, so
when that gets released you will have, by default, the source level at 1.5
(unless you downgrade your m-c-p plugin or override it to something lower


On 28 November 2012 15:14, Jasper Floor <j.fl...@onehippo.com> wrote:

I use mvn on the command line. I actually solved the problem by setting the
java version explicitly. I have jdk 1.6.0_33. I found some things on
various sites which suggested mvn always compiles in 1.3 mode. You might
not notice this in an IDE (if it is true) since your IDE is likely to fix
this for you. After all, you also have an explicit java version in your
IDE.

mvg,
Jasper

On Fri, Nov 16, 2012 at 4:42 PM, Ron Wheeler <
rwhee...@artifact-software.com
wrote:
What IDE are you using.
If your colleagues are using the same pom, you need to look at your IDE
setup.

For example, Eclipse will let you select any of the available compilers.

Ron


On 16/11/2012 8:21 AM, John Patrick wrote:

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 <ol...@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.fl...@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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

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



--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102



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




--
Ron Wheeler
President
Artifact Software Inc
email: rwhee...@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


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

Reply via email to