You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jesse McConnell <jm...@apache.org> on 2008/10/06 20:22:56 UTC
maven-pom-plugin thoughts
hi all,
A long while back I added a plugin into the maven sandbox for
modifying one or more pom files in the process of the build, not the
active pom's in a reactor but at least in instances where you had a
scm checkout process in your build and needed to modify the checked
out project before building it in turn...
It is pretty simple plugin with lots of mojos for dealing with various
instances of pom modification like adding dependencies, altering
dependency versions, tweaking scm info, etc....however most if not all
can be replaced by complex usage of the simple but powerful
alter-by-xpath mojo.
I have gone back and added in some unit tests for examples sake and
cobbled together a website for it....and wanted to see if there was
any thought about perhaps bringing out of the sandbox or simply moving
it over to mojo since its perhaps not a complex enough process to
warrant placement in the official maven plugin set...
https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-pom-plugin
With modern editors I see no reason someone would use this plugin to
modify sets of project files from the command line, but it does offer
the ability to do something like this:
mvn -DprojectFile=pom.xml
-Dxpath="/project/dependencies/dependency[artifactId[.='commons-collections']]/version"
-DnewValue=3.3 org.apache.maven.plugins:maven-pom-plugin:1.0-SNAPSHOT:alter-by-xpath
which could be useful in scripting situations...Or it could be put
into a pom.xml setup that performs the scm checkout and then does a
consistent set of permutations to the project
anyway, thoughts?
jesse
--
jesse mcconnell
jesse.mcconnell@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: maven-pom-plugin thoughts
Posted by Brett Porter <br...@apache.org>.
Cool. It sounds like one of those things people would use more if they
knew it existed.
In the long run, what do you think about unifying it's handling of the
POM with the release plugin?
On 07/10/2008, at 5:22 AM, Jesse McConnell wrote:
> hi all,
>
> A long while back I added a plugin into the maven sandbox for
> modifying one or more pom files in the process of the build, not the
> active pom's in a reactor but at least in instances where you had a
> scm checkout process in your build and needed to modify the checked
> out project before building it in turn...
>
> It is pretty simple plugin with lots of mojos for dealing with various
> instances of pom modification like adding dependencies, altering
> dependency versions, tweaking scm info, etc....however most if not all
> can be replaced by complex usage of the simple but powerful
> alter-by-xpath mojo.
>
> I have gone back and added in some unit tests for examples sake and
> cobbled together a website for it....and wanted to see if there was
> any thought about perhaps bringing out of the sandbox or simply moving
> it over to mojo since its perhaps not a complex enough process to
> warrant placement in the official maven plugin set...
>
> https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-pom-plugin
>
> With modern editors I see no reason someone would use this plugin to
> modify sets of project files from the command line, but it does offer
> the ability to do something like this:
>
> mvn -DprojectFile=pom.xml
> -Dxpath="/project/dependencies/dependency[artifactId[.='commons-
> collections']]/version"
> -DnewValue=3.3 org.apache.maven.plugins:maven-pom-plugin:1.0-
> SNAPSHOT:alter-by-xpath
>
> which could be useful in scripting situations...Or it could be put
> into a pom.xml setup that performs the scm checkout and then does a
> consistent set of permutations to the project
>
> anyway, thoughts?
>
> jesse
>
> --
> jesse mcconnell
> jesse.mcconnell@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
--
Brett Porter
brett@apache.org
http://blogs.exist.com/bporter/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: maven-pom-plugin thoughts
Posted by Stephen Connolly <st...@gmail.com>.
Cheers...
I'd just finished getting update-child-modules (which fixes when the
child modules are out of sync and you cannot build) working this
morning when we found that a big build with 40+ modules had fallen out
of sync...
serendipity strikes ;-)
I'll have to push another alpha once I get all the integration tests written
-Stephen
2008/10/6 Jesse McConnell <je...@gmail.com>:
> ya, I am aware of that one...it does some awesome stuff but totally
> unrelated to the use case I had need for originally and recently..
>
> jesse
>
> On Mon, Oct 6, 2008 at 3:16 PM, Stephen Connolly
> <st...@gmail.com> wrote:
>> FYI, we've also go the versions-maven-plugin over on mojo for
>> manipulating version related stuff
>>
>> 2008/10/6 John Casey <jd...@commonjava.org>:
>>> I think this is a great idea, especially if it can process a reactor full of
>>> POMs, and handle multiple xpaths where a target value might show up (the
>>> set:
>>>
>>> {project/parent/version,
>>> project/version,
>>> project/properties/mavenVersion}
>>>
>>> would be one good first use case, for instance). I've got a plugin that I've
>>> written to do something like this, but it's focused solely on versions for
>>> now...and it also uses xpaths. I'd love to see this expanded to other
>>> xpaths, though, no reason we shouldn't do that...and I think this plugin is
>>> a good place to do it.
>>>
>>> -j
>>>
>>> ---
>>> John Casey
>>> Developer and PMC Member, Apache Maven (http://maven.apache.org)
>>> Member, Apache Software Foundation
>>> Blog: http://www.ejlife.net/blogs/buildchimp
>>>
>>> Jesse McConnell wrote:
>>>>
>>>> hi all,
>>>>
>>>> A long while back I added a plugin into the maven sandbox for
>>>> modifying one or more pom files in the process of the build, not the
>>>> active pom's in a reactor but at least in instances where you had a
>>>> scm checkout process in your build and needed to modify the checked
>>>> out project before building it in turn...
>>>>
>>>> It is pretty simple plugin with lots of mojos for dealing with various
>>>> instances of pom modification like adding dependencies, altering
>>>> dependency versions, tweaking scm info, etc....however most if not all
>>>> can be replaced by complex usage of the simple but powerful
>>>> alter-by-xpath mojo.
>>>>
>>>> I have gone back and added in some unit tests for examples sake and
>>>> cobbled together a website for it....and wanted to see if there was
>>>> any thought about perhaps bringing out of the sandbox or simply moving
>>>> it over to mojo since its perhaps not a complex enough process to
>>>> warrant placement in the official maven plugin set...
>>>>
>>>>
>>>> https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-pom-plugin
>>>>
>>>> With modern editors I see no reason someone would use this plugin to
>>>> modify sets of project files from the command line, but it does offer
>>>> the ability to do something like this:
>>>>
>>>> mvn -DprojectFile=pom.xml
>>>>
>>>> -Dxpath="/project/dependencies/dependency[artifactId[.='commons-collections']]/version"
>>>> -DnewValue=3.3
>>>> org.apache.maven.plugins:maven-pom-plugin:1.0-SNAPSHOT:alter-by-xpath
>>>>
>>>> which could be useful in scripting situations...Or it could be put
>>>> into a pom.xml setup that performs the scm checkout and then does a
>>>> consistent set of permutations to the project
>>>>
>>>> anyway, thoughts?
>>>>
>>>> jesse
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
>
>
> --
> jesse mcconnell
> jesse.mcconnell@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: maven-pom-plugin thoughts
Posted by Jesse McConnell <je...@gmail.com>.
ya, I am aware of that one...it does some awesome stuff but totally
unrelated to the use case I had need for originally and recently..
jesse
On Mon, Oct 6, 2008 at 3:16 PM, Stephen Connolly
<st...@gmail.com> wrote:
> FYI, we've also go the versions-maven-plugin over on mojo for
> manipulating version related stuff
>
> 2008/10/6 John Casey <jd...@commonjava.org>:
>> I think this is a great idea, especially if it can process a reactor full of
>> POMs, and handle multiple xpaths where a target value might show up (the
>> set:
>>
>> {project/parent/version,
>> project/version,
>> project/properties/mavenVersion}
>>
>> would be one good first use case, for instance). I've got a plugin that I've
>> written to do something like this, but it's focused solely on versions for
>> now...and it also uses xpaths. I'd love to see this expanded to other
>> xpaths, though, no reason we shouldn't do that...and I think this plugin is
>> a good place to do it.
>>
>> -j
>>
>> ---
>> John Casey
>> Developer and PMC Member, Apache Maven (http://maven.apache.org)
>> Member, Apache Software Foundation
>> Blog: http://www.ejlife.net/blogs/buildchimp
>>
>> Jesse McConnell wrote:
>>>
>>> hi all,
>>>
>>> A long while back I added a plugin into the maven sandbox for
>>> modifying one or more pom files in the process of the build, not the
>>> active pom's in a reactor but at least in instances where you had a
>>> scm checkout process in your build and needed to modify the checked
>>> out project before building it in turn...
>>>
>>> It is pretty simple plugin with lots of mojos for dealing with various
>>> instances of pom modification like adding dependencies, altering
>>> dependency versions, tweaking scm info, etc....however most if not all
>>> can be replaced by complex usage of the simple but powerful
>>> alter-by-xpath mojo.
>>>
>>> I have gone back and added in some unit tests for examples sake and
>>> cobbled together a website for it....and wanted to see if there was
>>> any thought about perhaps bringing out of the sandbox or simply moving
>>> it over to mojo since its perhaps not a complex enough process to
>>> warrant placement in the official maven plugin set...
>>>
>>>
>>> https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-pom-plugin
>>>
>>> With modern editors I see no reason someone would use this plugin to
>>> modify sets of project files from the command line, but it does offer
>>> the ability to do something like this:
>>>
>>> mvn -DprojectFile=pom.xml
>>>
>>> -Dxpath="/project/dependencies/dependency[artifactId[.='commons-collections']]/version"
>>> -DnewValue=3.3
>>> org.apache.maven.plugins:maven-pom-plugin:1.0-SNAPSHOT:alter-by-xpath
>>>
>>> which could be useful in scripting situations...Or it could be put
>>> into a pom.xml setup that performs the scm checkout and then does a
>>> consistent set of permutations to the project
>>>
>>> anyway, thoughts?
>>>
>>> jesse
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
--
jesse mcconnell
jesse.mcconnell@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: maven-pom-plugin thoughts
Posted by Stephen Connolly <st...@gmail.com>.
FYI, we've also go the versions-maven-plugin over on mojo for
manipulating version related stuff
2008/10/6 John Casey <jd...@commonjava.org>:
> I think this is a great idea, especially if it can process a reactor full of
> POMs, and handle multiple xpaths where a target value might show up (the
> set:
>
> {project/parent/version,
> project/version,
> project/properties/mavenVersion}
>
> would be one good first use case, for instance). I've got a plugin that I've
> written to do something like this, but it's focused solely on versions for
> now...and it also uses xpaths. I'd love to see this expanded to other
> xpaths, though, no reason we shouldn't do that...and I think this plugin is
> a good place to do it.
>
> -j
>
> ---
> John Casey
> Developer and PMC Member, Apache Maven (http://maven.apache.org)
> Member, Apache Software Foundation
> Blog: http://www.ejlife.net/blogs/buildchimp
>
> Jesse McConnell wrote:
>>
>> hi all,
>>
>> A long while back I added a plugin into the maven sandbox for
>> modifying one or more pom files in the process of the build, not the
>> active pom's in a reactor but at least in instances where you had a
>> scm checkout process in your build and needed to modify the checked
>> out project before building it in turn...
>>
>> It is pretty simple plugin with lots of mojos for dealing with various
>> instances of pom modification like adding dependencies, altering
>> dependency versions, tweaking scm info, etc....however most if not all
>> can be replaced by complex usage of the simple but powerful
>> alter-by-xpath mojo.
>>
>> I have gone back and added in some unit tests for examples sake and
>> cobbled together a website for it....and wanted to see if there was
>> any thought about perhaps bringing out of the sandbox or simply moving
>> it over to mojo since its perhaps not a complex enough process to
>> warrant placement in the official maven plugin set...
>>
>>
>> https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-pom-plugin
>>
>> With modern editors I see no reason someone would use this plugin to
>> modify sets of project files from the command line, but it does offer
>> the ability to do something like this:
>>
>> mvn -DprojectFile=pom.xml
>>
>> -Dxpath="/project/dependencies/dependency[artifactId[.='commons-collections']]/version"
>> -DnewValue=3.3
>> org.apache.maven.plugins:maven-pom-plugin:1.0-SNAPSHOT:alter-by-xpath
>>
>> which could be useful in scripting situations...Or it could be put
>> into a pom.xml setup that performs the scm checkout and then does a
>> consistent set of permutations to the project
>>
>> anyway, thoughts?
>>
>> jesse
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org
Re: maven-pom-plugin thoughts
Posted by John Casey <jd...@commonjava.org>.
I think this is a great idea, especially if it can process a reactor
full of POMs, and handle multiple xpaths where a target value might show
up (the set:
{project/parent/version,
project/version,
project/properties/mavenVersion}
would be one good first use case, for instance). I've got a plugin that
I've written to do something like this, but it's focused solely on
versions for now...and it also uses xpaths. I'd love to see this
expanded to other xpaths, though, no reason we shouldn't do that...and I
think this plugin is a good place to do it.
-j
---
John Casey
Developer and PMC Member, Apache Maven (http://maven.apache.org)
Member, Apache Software Foundation
Blog: http://www.ejlife.net/blogs/buildchimp
Jesse McConnell wrote:
> hi all,
>
> A long while back I added a plugin into the maven sandbox for
> modifying one or more pom files in the process of the build, not the
> active pom's in a reactor but at least in instances where you had a
> scm checkout process in your build and needed to modify the checked
> out project before building it in turn...
>
> It is pretty simple plugin with lots of mojos for dealing with various
> instances of pom modification like adding dependencies, altering
> dependency versions, tweaking scm info, etc....however most if not all
> can be replaced by complex usage of the simple but powerful
> alter-by-xpath mojo.
>
> I have gone back and added in some unit tests for examples sake and
> cobbled together a website for it....and wanted to see if there was
> any thought about perhaps bringing out of the sandbox or simply moving
> it over to mojo since its perhaps not a complex enough process to
> warrant placement in the official maven plugin set...
>
> https://svn.apache.org/repos/asf/maven/sandbox/trunk/plugins/maven-pom-plugin
>
> With modern editors I see no reason someone would use this plugin to
> modify sets of project files from the command line, but it does offer
> the ability to do something like this:
>
> mvn -DprojectFile=pom.xml
> -Dxpath="/project/dependencies/dependency[artifactId[.='commons-collections']]/version"
> -DnewValue=3.3 org.apache.maven.plugins:maven-pom-plugin:1.0-SNAPSHOT:alter-by-xpath
>
> which could be useful in scripting situations...Or it could be put
> into a pom.xml setup that performs the scm checkout and then does a
> consistent set of permutations to the project
>
> anyway, thoughts?
>
> jesse
>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org