Ah, I thought you could pass some option to javac to compile file with a given source
level?
$ javac -help
(...)
-source <release> Provide source compatibility with specified release
(...)
In the pom you can specify the target java version, so the maven compiler plugin could in
theory pass that option to javac ;)
Adam
On Jun 3, 2011, at 9:44 AM, Strong Liu wrote:
well, if you're using jdk6, you won't found it, maven version
doesn't matter :D
hibernate 3.6 -- JDK 5
hibernate 4 -- JDK 6
-----------
Strong Liu <stliu(a)hibernate.org>
http://hibernate.org
http://github.com/stliu
On Jun 3, 2011, at 3:40 PM, Adam Warski wrote:
> Fixed, sorry!
>
> I wonder why I didn't get a compile error - I've got maven 3.0.2 and I'm
doing a "mvn clean install".
> Which Maven does the Hudson job use?
>
> Adam
>
> On Jun 3, 2011, at 9:14 AM, Strong Liu wrote:
>
>> envers tries to override method in interface, which is not compilable on jdk1.5
>>
>> [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:testCompile (default-testCompile) on
project hibernate-envers: Compilation failure
>>
>> [ERROR]
/mnt/hudson_workspace/workspace/hibernate-core-branch36/hibernate-envers/src/test/java/org/hibernate/envers/test/entities/StrTestEntityComparator.java:[8,5]
method does not override a method from its superclass
>>
>> [ERROR] -> [Help 1]
>>
>> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:2.0.2:testCompile (default-testCompile) on
project hibernate-envers: Compilation failure
>>
/mnt/hudson_workspace/workspace/hibernate-core-branch36/hibernate-envers/src/test/java/org/hibernate/envers/test/entities/StrTestEntityComparator.java:[8,5]
method does not override a method from its superclass
>>
>>
>> at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:199)
>> at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
>> at
org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:140)
>> at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
>> at
org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
>> at
org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
>> at
org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
>> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:316)
>> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
>> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:451)
>> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:188)
>> at org.apache.maven.cli.MavenCli.main(MavenCli.java:134)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:585)
>> at
org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
>> at
org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
>> at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
>> Caused by: org.apache.maven.plugin.CompilationFailureException: Compilation
failure
>>
/mnt/hudson_workspace/workspace/hibernate-core-branch36/hibernate-envers/src/test/java/org/hibernate/envers/test/entities/StrTestEntityComparator.java:[8,5]
method does not override a method from its superclass
>>
>>
>>
>> -----------
>> Strong Liu <stliu(a)hibernate.org>
>>
http://hibernate.org
>>
http://github.com/stliu
>>
>
> --
> Adam Warski
>
http://www.warski.org
>
http://www.softwaremill.eu
>
>
>
>