You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by David Jencks <da...@yahoo.com> on 2005/12/07 18:36:12 UTC

[M1] Plugin hell, help desperately needed

In the geronimo project we are experiencing severe problems with our 
build related to plugins.  Any advice on how to improve this situation 
would be appreciated.

Both maven 1.0.2 and 1.1-b2 are being used to build.

We have 5 plugins that are built as part of the build and used in the 
build.  The build is currently structured as a sequence of reactor 
calls: the plugins are built in step 1 and used in steps 1, 2, 4, and 
5.

Currently the maven.xml for each plugin looks like this:

<project default="plugin:install">
     <goal name="default">
         <attainGoal name="plugin:install"/>
     </goal>

     <goal name="plugin:install" prereqs="plugin:plugin">
         <attainGoal name="plugin:install-now"/>
         <attainGoal name="plugin:repository-install"/>
	<!--
         <copy file="${maven.build.dir}/${maven.final.name}.jar"
           todir="${maven.plugin.dir}" />
	-->
      </goal>


</project>

and the reactor calls this with the goal multiproject:install-callback. 
  The repository-install command is needed both because we are using 
dependencies to order the build and because one plugin relies on itself 
being in the repository to function (it has to construct its own 
classpath including itself, but not other maven dependencies).

This works fine for some people and breaks for other people.  Removing 
~/.maven/cache and all copies of the geronimo plugins from the repo, 
$MAVEN_HOME/plugins and ~/.maven/plugins helps some people.  Sometimes 
building the plugins individually helps. Sometimes repeating this 
procedure over and over again helps.  When the build breaks, usually 
the plugin that is needed is not in the cache.

The commented out "copy" command seems to make the build more reliable 
on 1.0.2 and less reliable on 1.1-b2.  I think that what is happening 
is that each plugin build is clearing the cache  and the other plugins 
are not getting reloaded.

Can anyone suggest a way to produce a reliable build with the current 
plugin releases?  We might be able to restrict ourselves to 1.1-b2.  
Will the proposed 1.7 plugin-plugin release help with this problem?

thanks
david jencks


Re: [M1] Plugin hell, help desperately needed - JIRA 1308 created

Posted by Bill Stoddard <bi...@wstoddard.com>.
David Blevins wrote:
> Just as an fyi, this is a nice addition but doesn't really deal with  
> the "Plugin hell" issue David is talking about.  It seems to be hit  and 
> miss trying to get the new plugins installed and used during any  
> particular maven run.
> 
>  From my experience it seems as if you delete your ~/.maven/cache and  
> ~/.maven/plugins, then the cache gets rebuilt and the latest verision  
> of the plugin from your ~/.maven/repository is used.  But as the  plugin 
> is updated in the future, it will never reach the ~/.maven/ cache and 
> builds will eventually start failing because of it.
> 
> There is more too it than that, David highlighted the frustrations  
> around the problem a bit better in his email.

Indeed, there's a lot of indeterministic behaviour in the build process. It's interesting that some are able 
to successfully build the server w/o the two patches submitted by Donald. That's exceedingly odd and perhaps 
related to plugin hell?

Bill



Re: [M1] Plugin hell, help desperately needed - JIRA 1308 created

Posted by David Blevins <da...@visi.com>.
Just as an fyi, this is a nice addition but doesn't really deal with  
the "Plugin hell" issue David is talking about.  It seems to be hit  
and miss trying to get the new plugins installed and used during any  
particular maven run.

 From my experience it seems as if you delete your ~/.maven/cache and  
~/.maven/plugins, then the cache gets rebuilt and the latest verision  
of the plugin from your ~/.maven/repository is used.  But as the  
plugin is updated in the future, it will never reach the ~/.maven/ 
cache and builds will eventually start failing because of it.

There is more too it than that, David highlighted the frustrations  
around the problem a bit better in his email.

-David

On Dec 7, 2005, at 7:39 PM, Donald Woods wrote:

> JIRA-1308 has been opened for this and I am creating the patch  
> files to attach right now.
>
> configs/geronimo-gbean-deployer/project.xml - uncomment the following
>         <dependency>
>             <groupId>geronimo</groupId>
>             <artifactId>geronimo-packaging-plugin</artifactId>
>             <version>${geronimo_version}</version>
>             <type>plugin</type>
>         </dependency>
>
> assemblies/j2ee-installer/project.xml - insert the following new  
> dependency
>         <dependency>
>             <groupId>geronimo</groupId>
>             <artifactId>geronimo-izpack-plugin</artifactId>
>             <type>plugin</type>
>             <version>${pom.currentVersion}</version>
>         </dependency>
>
>
> -Donald
>
>
> Bill Stoddard wrote:
>> Donald Woods wrote:
>>> Finally got new4 goal to complete using Maven 1.1Beta2 (was  
>>> always failing with the same error you mention below), by editing  
>>> configs/geronimo-gbean-deployer/project.xml and removing the  
>>> comments from around the geronimo-packaging-plugin dependency to  
>>> re-enable it as a depend -
>>>         <!-- dependency on deployer -->
>>>         <dependency>
>>>             <groupId>geronimo</groupId>
>>>             <artifactId>geronimo-packaging-plugin</artifactId>
>>>             <version>${geronimo_version}</version>
>>>             <type>plugin</type>
>>>         </dependency>
>>>
>>> I'm running a full build now via
>>>    maven m:clean new -Dmaven.test.skip=true -Dmaven.itest.skip=true
>>> to verify the change works repeatably before I open a JIRA and  
>>> attach the patch.
>>>
>>>
>>> -Donald
>> Thanks Donald, that change got me over the failure (and I'm using  
>> maven 1.0.2).  I manually placed geronimo-packaging-plugin into  
>> the .maven/cache. Ran into another failure to statisfy a  
>> dependency on tranql-connector-derby-embed-local-1.1-SNAPSHOT.rar  
>> but that's probably because I was doing an offline build.
>> It was a bit tricky mapping this message:
>>     [echo] Running car:install for Geronimo Configuration for  
>> performing service deployments
>> to
>>     geronimo-gbean-deployer/project.xml
>> I made the connection (thank you findstr/grep) but failed to  
>> investigate the dependencies in project.xml. Won't make that  
>> mistake again ;-)
>> Will clean out .maven/cache and kick off a 'maven clean new' build  
>> this evening and report back the results.
>> Bill


Re: [M1] Plugin hell, help desperately needed - JIRA 1308 created

Posted by Donald Woods <dr...@yahoo.com>.
JIRA-1308 has been opened for this and I am creating the patch files to 
attach right now.

configs/geronimo-gbean-deployer/project.xml - uncomment the following
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-packaging-plugin</artifactId>
             <version>${geronimo_version}</version>
             <type>plugin</type>
         </dependency>

assemblies/j2ee-installer/project.xml - insert the following new dependency
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-izpack-plugin</artifactId>
             <type>plugin</type>
             <version>${pom.currentVersion}</version>
         </dependency>


-Donald


Bill Stoddard wrote:
> Donald Woods wrote:
> 
>> Finally got new4 goal to complete using Maven 1.1Beta2 (was always 
>> failing with the same error you mention below), by editing 
>> configs/geronimo-gbean-deployer/project.xml and removing the comments 
>> from around the geronimo-packaging-plugin dependency to re-enable it 
>> as a depend -
>>         <!-- dependency on deployer -->
>>         <dependency>
>>             <groupId>geronimo</groupId>
>>             <artifactId>geronimo-packaging-plugin</artifactId>
>>             <version>${geronimo_version}</version>
>>             <type>plugin</type>
>>         </dependency>
>>
>> I'm running a full build now via
>>    maven m:clean new -Dmaven.test.skip=true -Dmaven.itest.skip=true
>> to verify the change works repeatably before I open a JIRA and attach 
>> the patch.
>>
>>
>> -Donald
> 
> 
> 
> Thanks Donald, that change got me over the failure (and I'm using maven 
> 1.0.2).  I manually placed geronimo-packaging-plugin into the 
> .maven/cache. Ran into another failure to statisfy a dependency on 
> tranql-connector-derby-embed-local-1.1-SNAPSHOT.rar but that's probably 
> because I was doing an offline build.
> 
> It was a bit tricky mapping this message:
>     [echo] Running car:install for Geronimo Configuration for performing 
> service deployments
> to
>     geronimo-gbean-deployer/project.xml
> 
> I made the connection (thank you findstr/grep) but failed to investigate 
> the dependencies in project.xml. Won't make that mistake again ;-)
> 
> Will clean out .maven/cache and kick off a 'maven clean new' build this 
> evening and report back the results.
> 
> Bill
> 
> 
> 

Re: [M1] Plugin hell, help desperately needed

Posted by Bill Stoddard <bi...@wstoddard.com>.
Donald Woods wrote:
> Finally got new4 goal to complete using Maven 1.1Beta2 (was always 
> failing with the same error you mention below), by editing 
> configs/geronimo-gbean-deployer/project.xml and removing the comments 
> from around the geronimo-packaging-plugin dependency to re-enable it as 
> a depend -
>         <!-- dependency on deployer -->
>         <dependency>
>             <groupId>geronimo</groupId>
>             <artifactId>geronimo-packaging-plugin</artifactId>
>             <version>${geronimo_version}</version>
>             <type>plugin</type>
>         </dependency>
> 
> I'm running a full build now via
>    maven m:clean new -Dmaven.test.skip=true -Dmaven.itest.skip=true
> to verify the change works repeatably before I open a JIRA and attach 
> the patch.
> 
> 
> -Donald


Thanks Donald, that change got me over the failure (and I'm using maven 1.0.2).  I manually placed 
geronimo-packaging-plugin into the .maven/cache. Ran into another failure to statisfy a dependency on 
tranql-connector-derby-embed-local-1.1-SNAPSHOT.rar but that's probably because I was doing an offline build.

It was a bit tricky mapping this message:
     [echo] Running car:install for Geronimo Configuration for performing service deployments
to
     geronimo-gbean-deployer/project.xml

I made the connection (thank you findstr/grep) but failed to investigate the dependencies in project.xml. 
Won't make that mistake again ;-)

Will clean out .maven/cache and kick off a 'maven clean new' build this evening and report back the results.

Bill


Re: [M1] Plugin hell, help desperately needed

Posted by Donald Woods <dr...@yahoo.com>.
Finally got new4 goal to complete using Maven 1.1Beta2 (was always 
failing with the same error you mention below), by editing 
configs/geronimo-gbean-deployer/project.xml and removing the comments 
from around the geronimo-packaging-plugin dependency to re-enable it as 
a depend -
         <!-- dependency on deployer -->
         <dependency>
             <groupId>geronimo</groupId>
             <artifactId>geronimo-packaging-plugin</artifactId>
             <version>${geronimo_version}</version>
             <type>plugin</type>
         </dependency>

I'm running a full build now via
    maven m:clean new -Dmaven.test.skip=true -Dmaven.itest.skip=true
to verify the change works repeatably before I open a JIRA and attach 
the patch.


-Donald

Bill Stoddard wrote:
> Bill Stoddard wrote:
> 
>> David Jencks wrote:
>>
>>> In the geronimo project we are experiencing severe problems with our 
>>> build related to plugins.  Any advice on how to improve this 
>>> situation would be appreciated.
>>>
>>
>> Perhaps this is stating the obvious, but on the off chance it is 
>> useful, here goes...
>>
>> I am consistently getting this failure in new4:
>> ...
>> multiproject:install-callback:
>>     [echo] Running car:install for Geronimo Configuration for 
>> performing service deployments
>>
>> BUILD FAILED
>> File...... C:\home\apache\geronimo\maven.xml
>> Element... maven:reactor
>> Line...... 58
>> Column.... 112
>> Unable to obtain goal [multiproject:install-callback] -- C:\Documents 
>> and 
>> Settings\Administrator\.maven\cache\maven-multiproject-plugin-1.4.1\plugin.jelly:256:30: 
>> <attainGoal> No goal [car:install]
>> Total time: 9 seconds
>>
>> Goal [car:install] is implemented by the geronimo-packaging-plugin.
>>
>> After my build fails, I check the maven cache and I only see the 
>> following two plugins:
>>
>> dir c:/Documents and Settings/Administrator/.maven/cache/
>>
>>     geronimo-dependency-plugin-1.0-SNAPSHOT
>>     geronimo-deployment-plugin-1.0-SNAPSHOT
>>
>> No packaging plugin.  Do you think the plugin was removed from the 
>> cache or did it not get put in the cache in the first place?
>>
>> Going to try an experiment... run sysinternals filemon watching for 
>> file geronimo-packaging-plugin-1.0-SNAPSHOT, kick off a build and 
>> watch what happens. If the file is never created, that will be a 
>> useful clue.
>>
>> Bill
>>
>>
>>
> 
> David,
> Ran filemon while doing an offline build. File CREATE and DELETE log 
> entries here:
> 
> 11    4:19:26 PM    java.exe:1256    DELETE 
> C:\home\apache\geronimo\plugins\geronimo-packaging-plugin\target\geronimo-packaging-plugin-1.0-SNAPSHOT.jar 
> SUCCESS       
> 15    4:23:07 PM    java.exe:1256    CREATE 
> C:\home\apache\geronimo\plugins\geronimo-packaging-plugin\target\geronimo-packaging-plugin-1.0-SNAPSHOT.jar 
> SUCCESS    Options: OverwriteIf  Access: All
>     
> 798    4:23:07 PM    java.exe:1256    CREATE    C:\Documents and 
> Settings\Administrator\.maven\repository\geronimo\plugins\geronimo-packaging-plugin-1.0-SNAPSHOT.jar    
> SUCCESS Options: OverwriteIf  Access: All   
> 858    4:23:07 PM    java.exe:1256    CREATE    C:\Documents and 
> Settings\Administrator\.maven\repository\geronimo\plugins\geronimo-packaging-plugin-1.0-SNAPSHOT.jar.md5 
> SUCCESS    Options: OverwriteIf  Access: All   
> 888    4:23:07 PM    java.exe:1256    CREATE    C:\Documents and 
> Settings\Administrator\.maven\repository\geronimo\plugins\geronimo-packaging-plugin-1.0-SNAPSHOT.jar.sha1 
> SUCCESS    Options: OverwriteIf  Access: All   
> 918    4:23:07 PM    java.exe:1256    CREATE    C:\Documents and 
> Settings\Administrator\.maven\repository\geronimo\poms\geronimo-packaging-plugin-1.0-SNAPSHOT.pom    
> SUCCESS Options: OverwriteIf  Access: All   
> 956    4:23:07 PM    java.exe:1256    CREATE    C:\Documents and 
> Settings\Administrator\.maven\repository\geronimo\poms\geronimo-packaging-plugin-1.0-SNAPSHOT.pom.md5    
> SUCCESS Options: OverwriteIf  Access: All   
> 986    4:23:07 PM    java.exe:1256    CREATE    C:\Documents and 
> Settings\Administrator\.maven\repository\geronimo\poms\geronimo-packaging-plugin-1.0-SNAPSHOT.pom.sha1 
> SUCCESS    Options: OverwriteIf  Access: All   
> 
> I was expecting to see something showing up in the maven cache. Is this 
> what you would expect to see?
> 
> Bill
> 
> 
> 

Re: [M1] Plugin hell, help desperately needed

Posted by Bill Stoddard <bi...@wstoddard.com>.
Bill Stoddard wrote:
> David Jencks wrote:
> 
>> In the geronimo project we are experiencing severe problems with our 
>> build related to plugins.  Any advice on how to improve this situation 
>> would be appreciated.
>>
> 
> Perhaps this is stating the obvious, but on the off chance it is useful, 
> here goes...
> 
> I am consistently getting this failure in new4:
> ...
> multiproject:install-callback:
>     [echo] Running car:install for Geronimo Configuration for performing 
> service deployments
> 
> BUILD FAILED
> File...... C:\home\apache\geronimo\maven.xml
> Element... maven:reactor
> Line...... 58
> Column.... 112
> Unable to obtain goal [multiproject:install-callback] -- C:\Documents 
> and 
> Settings\Administrator\.maven\cache\maven-multiproject-plugin-1.4.1\plugin.jelly:256:30: 
> <attainGoal> No goal [car:install]
> Total time: 9 seconds
> 
> Goal [car:install] is implemented by the geronimo-packaging-plugin.
> 
> After my build fails, I check the maven cache and I only see the 
> following two plugins:
> 
> dir c:/Documents and Settings/Administrator/.maven/cache/
> 
>     geronimo-dependency-plugin-1.0-SNAPSHOT
>     geronimo-deployment-plugin-1.0-SNAPSHOT
> 
> No packaging plugin.  Do you think the plugin was removed from the cache 
> or did it not get put in the cache in the first place?
> 
> Going to try an experiment... run sysinternals filemon watching for file 
> geronimo-packaging-plugin-1.0-SNAPSHOT, kick off a build and watch what 
> happens. If the file is never created, that will be a useful clue.
> 
> Bill
> 
> 
> 

David,
Ran filemon while doing an offline build. File CREATE and DELETE log entries here:

11	4:19:26 PM	java.exe:1256	DELETE 
C:\home\apache\geronimo\plugins\geronimo-packaging-plugin\target\geronimo-packaging-plugin-1.0-SNAPSHOT.jar 
SUCCESS		
15	4:23:07 PM	java.exe:1256	CREATE 
C:\home\apache\geronimo\plugins\geronimo-packaging-plugin\target\geronimo-packaging-plugin-1.0-SNAPSHOT.jar 
SUCCESS	Options: OverwriteIf  Access: All
	
798	4:23:07 PM	java.exe:1256	CREATE	C:\Documents and 
Settings\Administrator\.maven\repository\geronimo\plugins\geronimo-packaging-plugin-1.0-SNAPSHOT.jar	SUCCESS 
Options: OverwriteIf  Access: All	
858	4:23:07 PM	java.exe:1256	CREATE	C:\Documents and 
Settings\Administrator\.maven\repository\geronimo\plugins\geronimo-packaging-plugin-1.0-SNAPSHOT.jar.md5 
SUCCESS	Options: OverwriteIf  Access: All	
888	4:23:07 PM	java.exe:1256	CREATE	C:\Documents and 
Settings\Administrator\.maven\repository\geronimo\plugins\geronimo-packaging-plugin-1.0-SNAPSHOT.jar.sha1 
SUCCESS	Options: OverwriteIf  Access: All	
918	4:23:07 PM	java.exe:1256	CREATE	C:\Documents and 
Settings\Administrator\.maven\repository\geronimo\poms\geronimo-packaging-plugin-1.0-SNAPSHOT.pom	SUCCESS 
Options: OverwriteIf  Access: All	
956	4:23:07 PM	java.exe:1256	CREATE	C:\Documents and 
Settings\Administrator\.maven\repository\geronimo\poms\geronimo-packaging-plugin-1.0-SNAPSHOT.pom.md5	SUCCESS 
Options: OverwriteIf  Access: All	
986	4:23:07 PM	java.exe:1256	CREATE	C:\Documents and 
Settings\Administrator\.maven\repository\geronimo\poms\geronimo-packaging-plugin-1.0-SNAPSHOT.pom.sha1 
SUCCESS	Options: OverwriteIf  Access: All	

I was expecting to see something showing up in the maven cache. Is this what you would expect to see?

Bill


Re: [M1] Plugin hell, help desperately needed

Posted by Bill Stoddard <bi...@wstoddard.com>.
David Jencks wrote:
> In the geronimo project we are experiencing severe problems with our 
> build related to plugins.  Any advice on how to improve this situation 
> would be appreciated.
> 

Perhaps this is stating the obvious, but on the off chance it is useful, here goes...

I am consistently getting this failure in new4:
...
multiproject:install-callback:
     [echo] Running car:install for Geronimo Configuration for performing service deployments

BUILD FAILED
File...... C:\home\apache\geronimo\maven.xml
Element... maven:reactor
Line...... 58
Column.... 112
Unable to obtain goal [multiproject:install-callback] -- C:\Documents and 
Settings\Administrator\.maven\cache\maven-multiproject-plugin-1.4.1\plugin.jelly:256:30: <attainGoal> No goal 
[car:install]
Total time: 9 seconds

Goal [car:install] is implemented by the geronimo-packaging-plugin.

After my build fails, I check the maven cache and I only see the following two plugins:

dir c:/Documents and Settings/Administrator/.maven/cache/

	geronimo-dependency-plugin-1.0-SNAPSHOT
	geronimo-deployment-plugin-1.0-SNAPSHOT

No packaging plugin.  Do you think the plugin was removed from the cache or did it not get put in the cache in 
the first place?

Going to try an experiment... run sysinternals filemon watching for file 
geronimo-packaging-plugin-1.0-SNAPSHOT, kick off a build and watch what happens. If the file is never created, 
that will be a useful clue.

Bill


Re: [M1] Plugin hell, help desperately needed

Posted by Arnaud HERITIER <ah...@gmail.com>.
Hi David,

What you are doing seems to be good.
I do the same thing in cargo.

I tryed to launch your build several times with the future 1.1-beta-3 and I
didn't have problems.


Arnaud


On 12/7/05, David Jencks <da...@yahoo.com> wrote:
>
> In the geronimo project we are experiencing severe problems with our
> build related to plugins.  Any advice on how to improve this situation
> would be appreciated.
>
> Both maven 1.0.2 and 1.1-b2 are being used to build.
>
> We have 5 plugins that are built as part of the build and used in the
> build.  The build is currently structured as a sequence of reactor
> calls: the plugins are built in step 1 and used in steps 1, 2, 4, and
> 5.
>
> Currently the maven.xml for each plugin looks like this:
>
> <project default="plugin:install">
>      <goal name="default">
>          <attainGoal name="plugin:install"/>
>      </goal>
>
>      <goal name="plugin:install" prereqs="plugin:plugin">
>          <attainGoal name="plugin:install-now"/>
>          <attainGoal name="plugin:repository-install"/>
>         <!--
>          <copy file="${maven.build.dir}/${maven.final.name}.jar"
>            todir="${maven.plugin.dir}" />
>         -->
>       </goal>
>
>
> </project>
>
> and the reactor calls this with the goal multiproject:install-callback.
>   The repository-install command is needed both because we are using
> dependencies to order the build and because one plugin relies on itself
> being in the repository to function (it has to construct its own
> classpath including itself, but not other maven dependencies).
>
> This works fine for some people and breaks for other people.  Removing
> ~/.maven/cache and all copies of the geronimo plugins from the repo,
> $MAVEN_HOME/plugins and ~/.maven/plugins helps some people.  Sometimes
> building the plugins individually helps. Sometimes repeating this
> procedure over and over again helps.  When the build breaks, usually
> the plugin that is needed is not in the cache.
>
> The commented out "copy" command seems to make the build more reliable
> on 1.0.2 and less reliable on 1.1-b2.  I think that what is happening
> is that each plugin build is clearing the cache  and the other plugins
> are not getting reloaded.
>
> Can anyone suggest a way to produce a reliable build with the current
> plugin releases?  We might be able to restrict ourselves to 1.1-b2.
> Will the proposed 1.7 plugin-plugin release help with this problem?
>
> thanks
> david jencks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>