Bug 911277 - [RFE] javapackages-tools: Add pom_xpath_replace
Summary: [RFE] javapackages-tools: Add pom_xpath_replace
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: javapackages-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-14 16:05 UTC by Stanislav Ochotnicky
Modified: 2013-02-15 14:35 UTC (History)
5 users (show)

Fixed In Version: 0.12.0-1
Clone Of:
Environment:
Last Closed: 2013-02-15 14:35:53 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Stanislav Ochotnicky 2013-02-14 16:05:03 UTC
Sometimes it's useful to modify pom.xml files by replacing parts of it, for example like this:
# Replace plexus-maven-plugin with plexus-component-metadata
find -name 'pom.xml' -exec sed \
    -i 's/<artifactId>plexus-maven-plugin<\/artifactId>/<artifactId>plexus-component-metadata<\/artifactId>/' '{}' ';'

Should be possible with something like:
%pom_xpath_replace pom:artifactId plexus-component-metadata

Currently this is partially possible with pom_xpath_remove & pom_xpath_inject duo but a dedicated replacement macro would be able to simplify certain operations

Comment 1 Mikolaj Izdebski 2013-02-15 14:05:19 UTC
Implemented in upstream.

Comment 2 Mikolaj Izdebski 2013-02-15 14:35:53 UTC
I believe that this bug is fixed in javapackages-tools-0.12.0-1,
which is available in Fedora Rawhide.  I am closing the bug now,
thank you for reporting it.  A summary of changes is included below.

* Fri Feb 15 2013 Mikolaj Izdebski <mizdebsk> - 0.12.0-1
- Update to upstream version 0.12.0
- Implement new pom macros: xpath_replace and xpath_set
- Remove Support-local-depmaps.patch (accepted upstream)


Note You need to log in before you can comment on or make changes to this bug.