Hi there,

More plugin configuration inheritance queries I'm afraid - I have
something like the following:

A parent pom:

<project>
        <modelVersion>4.0.0</modelVersion>
        <groupId>mygroup</groupId>
        <artifactId>myparent</artifactId>
        <packaging>pom</packaging>
        <version>0.1-SNAPSHOT</version>
        <build>
                <pluginManagement>
                        <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>
                </pluginManagement>
        </build>
</project>

A project pom:

<project>
        <parent>
                <groupId>mygroup</groupId>
                <artifactId>myparent</artifactId>
                <version>0.1-SNAPSHOT</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <groupId>mygroup</groupId>
        <artifactId>myproject</artifactId>
        <packaging>pom</packaging>
        <version>0.1-SNAPSHOT</version>
        <modules>
                <module>mycomponent</module>
        </modules>
</project>

And a component pom:

<project>
        <parent>
                <groupId>mygroup</groupId>
                <artifactId>myproject</artifactId>
                <version>0.1-SNAPSHOT</version>
        </parent>
        <modelVersion>4.0.0</modelVersion>
        <groupId>mygroup</groupId>
        <artifactId>mycomponent</artifactId>
        <packaging>jar</packaging>
        <version>0.1-SNAPSHOT</version>
</project>

AFAIK the compiler plugin config should be inherited by the component
project.  This does happen when running m2 on the component pom, but
not when running m2 on the project pom.  I'm running the svn head
version of m2, any ideas?

Cheers,

Mark

On 5/8/05, Brett Porter <[EMAIL PROTECTED]> wrote:
> I get the same failure on testCompile. Thanks, will fix ASAP.
> 
> - Brett
> 
> On 5/9/05, Mark Hobson <[EMAIL PROTECTED]> wrote:
> > Hi Brett,
> >
> > I'm bootstrapping with m2-bootstrap-all.sh from the svn head, and then
> > using that to build my project.  The resolved versions are as follows:
> >
> > [INFO] 
> > ----------------------------------------------------------------------------
> > [INFO] Building uk.co.iizuka:iizuka-parent:pom:0.1-SNAPSHOT
> > [INFO] 
> > ----------------------------------------------------------------------------
> > [INFO] maven-compiler-plugin: using locally installed snapshot
> > [INFO] plexus-compilers: resolved to version 1.3-20050423.062258-2
> > from local repository
> > [INFO] plexus-compiler: resolved to version 1.3-20050411.081334-1 from
> > local repository
> > [INFO] maven-clean-plugin: using locally installed snapshot
> > [INFO] [clean:clean]
> > [INFO] Deleting directory c:\Documents and Settings\mark\My
> > Documents\projects\iizuka\target
> > [INFO] maven-resources-plugin: using locally installed snapshot
> > [INFO] maven-surefire-plugin: using locally installed snapshot
> > [INFO] maven-install-plugin: using locally installed snapshot
> > [INFO] [resources:resources]
> > [INFO] [compiler:compile]
> > [INFO] No sources to compile
> > [INFO] [resources:testResources]
> >
> > So would maven overwrite the bootstrapped plugins with the repository
> > versions when run?
> >
> > Cheers,
> >
> > Mark
> >
> > On 5/8/05, Brett Porter <[EMAIL PROTECTED]> wrote:
> > > Hey Mark,
> > >
> > > Works for me. I've added an integration test to ensure it stays that way 
> > > :)
> > >
> > > My guess is you are downloading the snapshot published to the
> > > repository, instead of a locally built copy.
> > >
> > > At the moment, we don't regularly publish m2 snapshots, the only
> > > supported configurations are the alpha-1 release, or bootstrapping m2
> > > from SVN (which we appreciate people doing if they can).
> > >
> > > The plugin API has changed (and been finalised) for alpha-2, so
> > > plugins do need to be updated and recompiled.
> > >
> > > Can you confirm whether you were completely bootstrapping? What
> > > version does the SNAPSHOT resolve to in the messages leading up to the
> > > compile?
> > >
> > > Cheers,
> > > Brett
> > >
> > > On 5/9/05, Mark Hobson <[EMAIL PROTECTED]> wrote:
> > > > 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]

Reply via email to