Sorry to drag this up again, but the svn head version of m2 doesn't
seem to compile Java5 again. I've got this, which works for
m2-alpha-1:
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>1.0-alpha-2-SNAPSHOT</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
</plugins>
</build>
But get:
[INFO]
----------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
----------------------------------------------------------------------------
[ERROR] Cause:
org.apache.maven.plugin.MojoExecutionException: Error configuring
plugin for execution of 'compiler:testCompile'.
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:417)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.processGoals(DefaultLifecycleExecutor.java:167)
at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:89)
at org.apache.maven.DefaultMaven.processProject(DefaultMaven.java:227)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:143)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:223)
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.classworlds.Launcher.launchEnhanced(Launcher.java:303)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:243)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:416)
at org.codehaus.classworlds.Launcher.main(Launcher.java:363)
Caused by: org.apache.maven.plugin.PluginConfigurationException:
ERROR: Cannot override read-only parameter: classpathEl
ements in goal: compiler:testCompile
at
org.apache.maven.plugin.DefaultPluginManager.validatePomConfiguration(DefaultPluginManager.java:465)
at
org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:370)
... 13 more
Any idea on what has changed?
Cheers,
Mark
On 4/11/05, Brett Porter <[EMAIL PROTECTED]> wrote:
> Yep, no problem.
>
> We need to document the compiler plugin. The settings you need in your POM
> are:
>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <source>1.5</source>
> <target>1.5</target>
> </configuration>
> </plugin>
> </plugins>
> </build>
>
> By default, it is source 1.3, target 1.1. (in alpha-1, this was due to
> inadvertantly using a 1.3 class, now it is actually configured as such
> and using the defined API)
>
> If this doesn't work with the alpha release, try adding this just
> under artifactId:
> <version>1.0-alpha-2-SNAPSHOT</version>
> (a newer version of the compiler plugin, only just deployed, may take
> 4 hours to appear at ibiblio)
>
> - Brett
>
> On Apr 11, 2005 10:03 PM, Mark Hobson <[EMAIL PROTECTED]> wrote:
> > Hi there,
> >
> > Just trying out the alpha release of M2 & was wondering if there's any
> > issues with compiling Java5? It doesn't seem to like the new syntax -
> > is there a property I need to set to anywhere?
> >
> > Aside from that it's looking great at the moment - keep up the good
> > work! BTW, is this the correct mailing list for M2? I did read some
> > discussion about merging M1 & M2 mailing lists back together, so I
> > assumed so.
> >
> > Cheers,
> >
> > Mark
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]