I found the cause of this issue :

As I added the SysdeoMojo.generate execution to this setup profile, two
plugins (eclipse + sysdeo-tomcat) request for a forked @execute
phase="generate-resources".

In both case, maven remove the requesting plugin from the forked lifecycle
to prevent recursive calls, but ONLY the requesting plugin is removed (not
all the plugins that request such a fork). So I get :

mvn -Psetup
"validate" phase
   |_ eclipse:eclipse Fork @execute phase="generate-resources"
       "validate" phase
         |_ sysdeo:tomcat
       "generate-resources" phase
         |_ ...
      eclipse:eclipse execute()
   |_ sysdeo:tomcat Fork @execute phase="generate-resources"
       "validate" phase
         |_ eclipse:eclipse  // FAILS as there is no executedProject.getFile()
???


A workaround is that the sysdeo:tomcat plugin that DOES NOT require a forked
execution (executedProject is never read).

Why does the eclipse plugin require the executedProject ? As this is not an
@aggregator Mojo, the ${project}.getBaseDir() will allways reflect the
current project directory AFAIK ?


I'm not sure if my use case is valid, but it is really usefull for maven
adoption here, as this makes setup really simplier. I've discovered this way
to use profiles as maven "macros" from the CXF project.

Nicolas.


2008/3/28, nicolas de loof <[EMAIL PROTECTED]>:
>
> I've got an issue with eclipse plugin 2.5 & 2.5.1 combined with latest
> maven 2.0.9 RC4 :
>
> I've set a custom profile in my corporate POM to setup eclipse. It runs
> the validate phase and attach eclipse:eclipse plugin goal to this phase.
> Using this, a fresh SVN checkout can configure eclipse by running "mvn
> -Psetup"
>
>     <profile>
>       <id>setup</id>
>       <build>
>         <defaultGoal>validate</defaultGoal>
>         <plugins>
>             <plugin>
>                 <artifactId>maven-eclipse-plugin</artifactId>
>                 <executions>
>                     <execution>
>                         <id>setup</id>
>                         <goals>
>                             <goal>eclipse</goal>
>                         </goals>
>                         <phase>validate</phase>
>                     </execution>
>                 </executions>
>             </plugin>
>
> I get this error :
>
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] BUILD ERROR
> [INFO]
> ------------------------------------------------------------------------
> [INFO] There must be a POM in the current working directory for the
> Eclipse plugin to work.
> [INFO]
> ------------------------------------------------------------------------
>
> The EclispePlugin.validate() method fails on
>
>    if ( executedProject.getFile() == null ||
> !executedProject.getFile().exists() ) ...
>
> What is the distinction between "executedProject" and "project" from a
> plugin point of view ?
> This seem to have changed in maven 2.0.9.
>
> My use case is not really standard, but this may suggest some regression
> either in maven 2.0.9 or the eclipse plugin.
>
> Nicolas
>
>
> 2008/3/28, Richard van Nieuwenhoven <[EMAIL PROTECTED]>:
> >
> > Hi,
> >
> > here is my +1
> >
> > Thanks for the fast release!
> >
> > Ritchie
> >
> > Arnaud HERITIER wrote:
> > > Hi,
> > >
> > >   Since the 2.5 release we did 10 days ago, we solved 3 annoying
> > issues:
> > >     * [MECLIPSE-266] - plugin applies java facet to ear project
> > >     * [MECLIPSE-411] - manifest property usage is only for ogsi
> > maifests
> > >     * [MECLIPSE-413] - EclipseOSGiManifestWriter uses the artifact id
> > > and not the EclipseProjectName
> > >   We also added a new feature :
> > >     * [MECLIPSE-405] - to-maven target should allow to strip qualifier
> > > when creating artifacts from osgi bundles
> > >
> > > There are still a lot of issues left in JIRA :
> > >
> > http://jira.codehaus.org/secure/IssueNavigator.jspa?reset=true&pid=11133&status=1
> > >
> > > Staging repo :
> > > http://people.apache.org/~aheritier/stage/repo/<http://people.apache.org/%7Eaheritier/stage/repo/>
> > >
> > > Staging site (I'm uploading it) :
> > > http://maven.apache.org/plugins/maven-eclipse-plugin-2.5.1/
> > >
> > > Guide to testing staged releases:
> > > http://maven.apache.org/guides/development/guide-testing-releases.html
> > >
> > > Vote open for 5 days. I'll be back on wednesday to do the release if
> > > the vote passes.
> > >
> > > [ ] +1
> > > [ ] +0
> > > [ ] -1
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>

Reply via email to