Last time I checked, the maven compiler plugin uses the 1.4 source level.
In my case, I use Java 5, so my source level it's 1.5

You tell the plugin to use that source level on it's configuration options:

Here's a pom snippet:
<plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
        </configuration>
      </plugin>

I you wish to guarantee the same exact jdk version for all your developers,
you should try the enforcer plugin.

On Fri, Mar 13, 2009 at 6:09 AM, tjunak <[email protected]> wrote:

>
> Hello,
>
> I've got some questions about maven-compiler-plugin regarding compiler. It
> seems
> it is not clarified well on documentation - please help me with those
> questions as I think
> they seem important.
>
> I would like to be able to know what compiler  version is used how to
> change
> it in case sources
> need different version. I know from the (maven-compiler-plugin)
> documentation that there is some builtin compiler in maven-compiler-plugin?
>
> What is the version ?
> Does it change every time new release of JDK ?
> How to check what is the current default version of the compiler ?
>
> There is often a need to compile sources with a specific version of Java
> compiler then how can I specify a compiler version ?
>
> For example in my case is that I need to use: jdk1.6.0 u12
>
> How can I do it ?
> Should I install this JDK on my machine or it exist somwhere packaged as an
> artifact(s) ?
>
>
> This is important as I would like to be sure that all developers will
> compile sources with correct version
> of Java compiler and there is always a consistent build.
>
>
>
> Thank you in advance!
> Tomasz Junak
>
> --
> View this message in context:
> http://www.nabble.com/maven-compiler-plugin---where-does-it-take-compiler-from--tp22495176p22495176.html
> Sent from the Maven - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Open Jfree Software in an Open World...

Reply via email to