maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davy Toch <Davy.T...@belgacom.net>
Subject Re: [m1] Keeping plugins up to date
Date Fri, 05 Aug 2005 20:54:48 GMT
Another possibility is : 

Create a maven script maven.xml as follows:

<project default="create-maven-plugin-download-script"
  xmlns:j="jelly:core" xmlns:m="jelly:maven">

  <goal name="create-maven-plugin-download-script">

    <j:set var="x" value=""/>
    <j:forEach var="plugin" items="${context.mavenSession.pluginList}">
      <m:pom var="p" projectDescriptor="${maven.plugin.unpacked.dir}/${plugin}/project.xml"/>
      <j:set var="y" value="maven plugin:download -DgroupId=${p.groupId} -DartifactId=${p.artifactId}
-Dversion=${p.currentVersion}${line.separator}"/>
      <j:set var="x" value="${x.concat(y)}"/>
    </j:forEach>
    <echo file="script.cmd" append="false" message="${x}"/>

  </goal>

</project>

This goal creates a batch file with 'maven plugin:download ...' statements for the Maven installation
you use to run this script. So you can run it 2 times:
- once on a reference Maven installation that has the correct plugins installed (script-REF.cmd)
- once on a Maven installation for which the plugins need to be updated (script.cmd)

Then you execute

  diff script-REF.cmd script.cmd > update-script.cmd

(e.g. using Cygwin diff utility)

Finally you clean up update-script.cmd and you're ready to update the plugins.

Regards,
Davy Toch



Milos Kleint wrote:

>if you want to be sure that evenryone builds with the same version of
>the plugin, add the plugin as a dependency of the project.
>
>Regards
>
>Milos Kleint
>
>On 8/2/05, Grant Ingersoll <GSIngers@syr.edu> wrote:
>  
>
>>Yeah, I did that which is fine when you know the specifics of what you
>>want to update.  I will see if I can come up w/ some script that does it
>>for me.
>>
>>Problem I had was I had a few developers who didn't have the same
>>version of the jar-plugin, and were seeing different results.  Being
>>able to validate that everyone has the same plugins (and update) would
>>be useful, I think
>>
>>-Grant
>>
>>    
>>
>>>>>dantran@gmail.com 08/02/05 2:42 PM >>>
>>>>>          
>>>>>
>>Grant, there is no single maven command to do that, how about put
>>multiple
>>maven commands ( see the link) into a batch file?
>>
>>-D
>>
>>On 8/2/05, Grant Ingersoll <GSIngers@syr.edu> wrote:
>>    
>>
>>>I see from http://maven.apache.org/start/download.html that there is
>>>list of plugins that are to be updated for 1.0.2.
>>>
>>>Is there a way to update all installed plugins automatically via one
>>>command?
>>>
>>>Thanks,
>>>Grant
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>    
>>
>>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>>For additional commands, e-mail: users-help@maven.apache.org
>>>
>>>
>>>      
>>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>>For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>    
>>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>For additional commands, e-mail: users-help@maven.apache.org
>
>
>
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message