Try Maven->Update Project Configuration after setting maven-compiler-plugin
configuration. And I think you want:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.4</source>
<target>1.4</target>
</configuration>
</plugin>
Best
Brett
On Tue, Feb 24, 2009 at 4:53 AM, sebb <[email protected]> wrote:
> On 18/02/2009, Jason van Zyl <[email protected]> wrote:
> > It is always better to import Maven projects as Maven projects, not
> normal
> > projects and then enabling dependency management. We should probably just
> > remove that option as it seems to confuse many people and can also
> corrupt
> > your eclipse projects.
> >
> > The version of Java used is determined by the JDT integration which
> obeys
> > anything you have setup in the compiler plugin. If nothing is set then
> the
> > default of 1.4 is chosen. This is the configuration framework in action
> and
> > the POM is the source of truth if you are using m2e.
> >
>
> Java version selection does not seem to work, even when the project is
> checked out as a Maven project.
>
> E.g. I checked out maven/surefire/trunk as a Maven project (using
> current version 0.9.7)
>
> This created several projects - looks to be one for each module.
>
> However, all of the projects have been set to use Java 1.3, even
> though some of the POMs specify 1.4.
>
> For example, the surefire-junit4 and surefire-testng POMs have:
>
> <artifactId>maven-compiler-plugin</artifactId>
> <configuration>
> <fork>false</fork>
> <compilerVersion>1.4</compilerVersion>
> </configuration>
>
> yet Eclipse is configured for Java 1.3.
>
> Likewise maven-surefire-plugin, maven-surefire-report-plugin.
>
> [Surefire-booter and surefire-integration-tests seem to require 1.4,
> but fail to specify it in the POM]
>
> >
> > On 18-Feb-09, at 8:30 AM, sebb wrote:
> >
> >
> > > Thanks, that's fixed it.
> > >
> > > Unfortunately it does not seem to deal with multiple Java versions
> > > well - I would expect it to set the Java version to the highest
> > > version it finds - or at least warn the user that there are multiple
> > > requirements.
> > >
> > > On 18/02/2009, Stefan Seidel <[email protected]> wrote:
> > >
> > > > You have to do:
> > > > right click on project -> Maven -> Enable nested modules
> > > >
> > > > HTH,
> > > >
> > > > Stefan
> > > >
> > > >
> > > > On Wed, 18 Feb 2009 00:45:11 +0000
> > > > sebb <[email protected]> wrote:
> > > >
> > > >
> > > > > I tried enabling Maven Dependency Management on a project with
> modules
> > > > > (Surefire 2.4.3) and the dependencies from the top-level project
> were
> > > > > added OK, but none of the dependencies for any of the modules were
> > > > > added.
> > > > >
> > > > > Is this the expected behaviour? Or is it a bug?
> > > > >
> > > > > If if is expected, how can one use the plugin with modules?
> > > > >
> > > > > [Using version 0.0.12.20071107-2300 in Eclipse 3.4.1]
> > > > >
> > > > >
> > > >
> > > >
> > > > >
> > ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail:
> > [email protected]
> > > > > For additional commands, e-mail: [email protected]
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > best regards
> > > >
> > > > Stefan Seidel
> > > > Software Developer
> > > > ________________________
> > > > VUB Printmedia GmbH
> > > > Chopinstraße 4, D-04103 Leipzig
> > > > tel. +49 (341) 9 60 50 93
> > > > fax. +49 (341) 9 60 50 92
> > > > mail. [email protected]
> > > > web. www.vub.de
> > > >
> > > > HRB Köln 24015
> > > > UStID DE 122 649 251
> > > > GF Dr. Achim Preuss Neudorf,
> > > > Dr. Christian Preuss Neudorf
> > > >
> > > >
> > ---------------------------------------------------------------------
> > > > 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]
> > >
> > >
> >
> > Thanks,
> >
> > Jason
> >
> > ----------------------------------------------------------
> > Jason van Zyl
> > Founder, Apache Maven
> > jason at sonatype dot com
> > http://twitter.com/jvanzyl
> > ----------------------------------------------------------
> >
> > Selfish deeds are the shortest path to self destruction.
> >
> > -- The Seven Samuari, Akira Kurosawa
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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]
>
>