It was 2.0.9 that made this change. Details about how it works are here: http://blogs.sonatype.com/people/brian/2008/04/10/maven-209-released/
-----Original Message----- From: Nick Stolwijk [mailto:[EMAIL PROTECTED] Sent: Thursday, October 23, 2008 5:08 AM To: Maven Users List Subject: Re: Actual version of maven-resources-plugin 2.3 bug/dependcies ??? The way Maven works recently changed (I believe around 2.0.7 or 2.0.8). First, Maven tries to use the latest plugin by default, which was considered "bad" behaviour, because it could break working builds, even tagged ones. It was (and still is) considered best practice to version every plugin you use. To enforce this you can use the Enforcer Plugin [1]. Recent versions of Maven has the default plugins (all plugins which are bound to a phase by default) versioned in the super pom. So I recommend updating or enforcing your plugins to have a version to have a really reproducible build. [1]http://maven.apache.org/enforcer/enforcer-rules/requirePluginVersions.html Hth, Nick Stolwijk ~Java Developer~ Iprofs BV. Claus Sluterweg 125 2012 WS Haarlem www.iprofs.nl On Wed, Oct 22, 2008 at 7:54 PM, Jinyuan Zhou <[EMAIL PROTECTED]> wrote: > I had exactly the same problem. My manager is nervous to upgrade. I was > able to fix this without upgrade to 2.0.9. I just added the following > section in bold > <build> > ... > <plugins> > ...... > *<plugin> > <groupId>org.apache.maven.plugins</groupId> > <artifactId>maven-resources-plugin</artifactId> > <version>2.3</version> > </plugin>* > ..... > <.plugins> > </build> > > I also noticed the difference of the version 2.3 subdirectory in the > repository. The fixed one has two more files. which usually present in other > plugins. > I just start to use mvn recently. I am guessing that the maven will always > trying to use the most recent verion for this particular plugin. Or super > POM is not static, this time the super POM tries to use version 2.3 but some > how repository wasns't abot to set up properly. Ours has a local mirror. > The line simple force to down load a correct directory structure to work. > I wish some one can give more information on this issue. > Thanks > > On Mon, Oct 20, 2008 at 4:39 AM, Nick Stolwijk <[EMAIL PROTECTED]>wrote: > >> Yes, and it is very easy. Just add the plugin to your >> build/pluginManagement section. See [1] >> >> [1] http://maven.apache.org/pom.html#Plugin_Management. >> >> Hth, >> >> Nick Stolwijk >> ~Java Developer~ >> >> Iprofs BV. >> Claus Sluterweg 125 >> 2012 WS Haarlem >> www.iprofs.nl >> >> >> >> On Mon, Oct 20, 2008 at 12:56 PM, Andreas Riedel <[EMAIL PROTECTED]> >> wrote: >> > with 2.0.9 it's run. >> > >> > But for the next time this happens: >> > Is it possible set maven to using a fix version of an depending plugin? >> > >> > TIA >> > Andreas >> > >> > >> > --- Olivier Lamy <[EMAIL PROTECTED]> schrieb am Mo, 20.10.2008: >> > >> >> Von: Olivier Lamy <[EMAIL PROTECTED]> >> >> Betreff: Re: Actual version of maven-resources-plugin 2.3 bug/dependcies >> ??? >> >> An: "Maven Users List" <[email protected]>, [EMAIL PROTECTED] >> >> Datum: Montag, 20. Oktober 2008, 12:47 >> >> Which maven version are you using ? >> >> >> >> For me it works fine with 2.0.9. >> >> >> >> -- >> >> Olivier >> >> >> >> 2008/10/20 Andreas Riedel <[EMAIL PROTECTED]>: >> >> > Actual, I've the following üroblem with the new >> >> version of the maven-resource-plugin: >> >> > >> >> > Any idea, what's wrong or how I can use the old >> >> version of the plugin?? >> >> > >> >> > TIA >> >> > Andreas >> >> > >> >> > >> >> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >> >> > >> >> > >> >> > ----------------------------------------------------- >> >> > [INFO] >> >> ------------------------------------------------------------------------ >> >> > [ERROR] BUILD ERROR >> >> > [INFO] >> >> ------------------------------------------------------------------------ >> >> > [INFO] Internal error in the plugin manager executing >> >> goal >> >> 'org.apache.maven.plugins:maven-resources-plugin:2.3:resources': >> >> Unable to find the mojo >> >> 'org.apache.maven.plugins:maven-resources-plugin:2.3:resources' >> >> in the plugin >> >> 'org.apache.maven.plugins:maven-resources-plugin' >> >> > org/codehaus/plexus/interpolation/ValueSource >> >> > [INFO] >> >> ------------------------------------------------------------------------ >> >> > [INFO] Trace >> >> > >> >> org.apache.maven.lifecycle.LifecycleExecutionException: >> >> Internal error in the plugin manager executing goal >> >> 'org.apache.maven.plugins:maven-resources-plugin:2.3:resources': >> >> Unable to find the mojo >> >> 'org.apache.maven.plugins:maven-resources-plugin:2.3:resources' >> >> in the plugin >> >> 'org.apache.maven.plugins:maven-resources-plugin' >> >> > at >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:543) >> >> > at >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) >> >> > at >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) >> >> > at >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) >> >> > at >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) >> >> > at >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) >> >> > at >> >> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) >> >> > at >> >> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) >> >> > at >> >> org.apache.maven.cli.MavenCli.main(MavenCli.java:282) >> >> > 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:315) >> >> > at >> >> org.codehaus.classworlds.Launcher.launch(Launcher.java:255) >> >> > at >> >> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) >> >> > at >> >> org.codehaus.classworlds.Launcher.main(Launcher.java:375) >> >> > Caused by: >> >> org.apache.maven.plugin.PluginManagerException: Unable to >> >> find the mojo >> >> 'org.apache.maven.plugins:maven-resources-plugin:2.3:resources' >> >> in the plugin >> >> 'org.apache.maven.plugins:maven-resources-plugin' >> >> > at >> >> >> org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:575) >> >> > at >> >> >> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:425) >> >> > at >> >> >> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) >> >> > ... 16 more >> >> > Caused by: >> >> >> org.codehaus.plexus.component.repository.exception.ComponentLookupException: >> >> Unable to lookup component >> >> >> 'org.apache.maven.plugin.Mojoorg.apache.maven.plugins:maven-resources-plugin:2.3:resources', >> >> it could not be started >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339) >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440) >> >> > at >> >> >> org.apache.maven.plugin.DefaultPluginManager.getConfiguredMojo(DefaultPluginManager.java:566) >> >> > ... 18 more >> >> > Caused by: >> >> >> org.codehaus.plexus.component.repository.exception.ComponentLifecycleException: >> >> Error starting component >> >> > at >> >> >> org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:109) >> >> > at >> >> >> org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95) >> >> > at >> >> >> org.codehaus.plexus.component.manager.PerLookupComponentManager.getComponent(PerLookupComponentManager.java:48) >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331) >> >> > ... 20 more >> >> > Caused by: >> >> >> org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException: >> >> Error composing component >> >> > at >> >> >> org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:33) >> >> > at >> >> >> org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101) >> >> > at >> >> >> org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105) >> >> > ... 23 more >> >> > Caused by: >> >> org.codehaus.plexus.component.composition.CompositionException: >> >> Composition failed of field mavenResourcesFiltering in >> >> object of type >> >> org.apache.maven.plugin.resources.ResourcesMojo because the >> >> requirement >> >> >> ComponentRequirement{role='org.apache.maven.shared.filtering.MavenResourcesFiltering', >> >> roleHint='default', >> >> fieldName='mavenResourcesFiltering'} was missing >> >> > at >> >> >> org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:154) >> >> > at >> >> >> org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73) >> >> > at >> >> >> org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68) >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486) >> >> > at >> >> >> org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29) >> >> > ... 25 more >> >> > Caused by: >> >> >> org.codehaus.plexus.component.repository.exception.ComponentLookupException: >> >> Unable to lookup component >> >> 'org.apache.maven.shared.filtering.MavenResourcesFilteringdefault', >> >> it could not be started >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:339) >> >> > at >> >> >> org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:129) >> >> > ... 29 more >> >> > Caused by: >> >> >> org.codehaus.plexus.component.repository.exception.ComponentLifecycleException: >> >> Error starting component >> >> > at >> >> >> org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:109) >> >> > at >> >> >> org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:95) >> >> > at >> >> >> org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92) >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331) >> >> > ... 30 more >> >> > Caused by: >> >> >> org.codehaus.plexus.personality.plexus.lifecycle.phase.PhaseExecutionException: >> >> Error composing component >> >> > at >> >> >> org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:33) >> >> > at >> >> >> org.codehaus.plexus.lifecycle.AbstractLifecycleHandler.start(AbstractLifecycleHandler.java:101) >> >> > at >> >> >> org.codehaus.plexus.component.manager.AbstractComponentManager.startComponentLifecycle(AbstractComponentManager.java:105) >> >> > ... 33 more >> >> > Caused by: >> >> org.codehaus.plexus.component.composition.CompositionException: >> >> Composition failed of field mavenFileFilter in object of >> >> type >> >> org.apache.maven.shared.filtering.DefaultMavenResourcesFiltering >> >> because the requirement >> >> >> ComponentRequirement{role='org.apache.maven.shared.filtering.MavenFileFilter', >> >> roleHint='default', >> >> fieldName='mavenFileFilter'} was missing >> >> > at >> >> >> org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:154) >> >> > at >> >> >> org.codehaus.plexus.component.composition.FieldComponentComposer.assembleComponent(FieldComponentComposer.java:73) >> >> > at >> >> >> org.codehaus.plexus.component.composition.DefaultComponentComposerManager.assembleComponent(DefaultComponentComposerManager.java:68) >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.composeComponent(DefaultPlexusContainer.java:1486) >> >> > at >> >> >> org.codehaus.plexus.personality.plexus.lifecycle.phase.CompositionPhase.execute(CompositionPhase.java:29) >> >> > ... 35 more >> >> > Caused by: >> >> >> org.codehaus.plexus.component.repository.exception.ComponentLookupException: >> >> Unable to lookup component >> >> 'org.apache.maven.shared.filtering.MavenFileFilterdefault', >> >> it could not be created >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:335) >> >> > at >> >> >> org.codehaus.plexus.component.composition.FieldComponentComposer.assignRequirementToField(FieldComponentComposer.java:129) >> >> > ... 39 more >> >> > Caused by: >> >> org.codehaus.plexus.component.factory.ComponentInstantiationException: >> >> Could not instanciate component: role: >> >> 'org.apache.maven.shared.filtering.MavenFileFilter', >> >> implementation: >> >> 'org.apache.maven.shared.filtering.DefaultMavenFileFilter', >> >> role hint: 'default' >> >> > at >> >> >> org.codehaus.plexus.component.factory.java.JavaComponentFactory.makeException(JavaComponentFactory.java:77) >> >> > at >> >> >> org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:62) >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.createComponentInstance(DefaultPlexusContainer.java:1464) >> >> > at >> >> >> org.codehaus.plexus.component.manager.AbstractComponentManager.createComponentInstance(AbstractComponentManager.java:93) >> >> > at >> >> >> org.codehaus.plexus.component.manager.ClassicSingletonComponentManager.getComponent(ClassicSingletonComponentManager.java:92) >> >> > at >> >> >> org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:331) >> >> > ... 40 more >> >> > Caused by: java.lang.NoClassDefFoundError: >> >> org/codehaus/plexus/interpolation/ValueSource >> >> > at >> >> java.lang.Class.getDeclaredConstructors0(Native Method) >> >> > at >> >> java.lang.Class.privateGetDeclaredConstructors(Class.java:2357) >> >> > at >> >> java.lang.Class.getConstructor0(Class.java:2671) >> >> > at java.lang.Class.newInstance0(Class.java:321) >> >> > at java.lang.Class.newInstance(Class.java:303) >> >> > at >> >> >> org.codehaus.plexus.component.factory.java.JavaComponentFactory.newInstance(JavaComponentFactory.java:44) >> >> > ... 44 more >> >> > [INFO] >> >> ------------------------------------------------------------------------ >> >> > [INFO] Total time: 14 seconds >> >> > [INFO] Finished at: Mon Oct 20 12:41:40 CEST 2008 >> >> > [INFO] Final Memory: 11M/21M >> >> > [INFO] >> >> ------------------------------------------------------------------------ >> >> > >> >> > >> >> > __________________________________________________ >> >> > Do You Yahoo!? >> >> > Sie sind Spam leid? Yahoo! Mail verfügt über einen >> >> herausragenden Schutz gegen Massenmails. >> >> > http://mail.yahoo.com >> >> > >> >> > >> >> --------------------------------------------------------------------- >> >> > 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] >> > >> > __________________________________________________ >> > Do You Yahoo!? >> > Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz >> gegen Massenmails. >> > http://mail.yahoo.com >> > >> > --------------------------------------------------------------------- >> > To unsubscribe, e-mail: [EMAIL PROTECTED] >> > For additional commands, e-mail: [EMAIL PROTECTED] >> > >> > >> > > > > -- > > Some people lived like they will never die > and died like they have never lived >
