Bug 977975 - javapackages-tools: Improve adding POM dependencies and plugins
javapackages-tools: Improve adding POM dependencies and plugins
Product: Fedora
Classification: Fedora
Component: javapackages-tools (Show other bugs)
Unspecified Unspecified
medium Severity unspecified
: ---
: ---
Assigned To: Mikolaj Izdebski
Fedora Extras Quality Assurance
: FutureFeature, Triaged, Upstream
Depends On:
  Show dependency treegraph
Reported: 2013-06-25 13:27 EDT by Mikolaj Izdebski
Modified: 2013-09-12 01:41 EDT (History)
6 users (show)

See Also:
Fixed In Version: 3.0.3-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-09-12 01:41:20 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Mikolaj Izdebski 2013-06-25 13:27:33 EDT
Description of problem:
Macros that add new dependencies or plugins should add parent XML node if it's missing.

For example, currently %pom_add_dep fails to add a dependency if the POM doesn't have <dependencies> node -- empty "<dependencies/>" node needs to be injected prior to adding dependency:

%pom_xpath_inject pom:project "<dependencies/>"
%pom_add_dep foo:bar

The same applies to adding plugins.

Version-Release number of selected component (if applicable):
Comment 1 Mikolaj Izdebski 2013-08-09 07:36:28 EDT
Feature implemented upstream in commit 022b926
Comment 2 Mikolaj Izdebski 2013-09-12 01:33:23 EDT
Verified in rawhide.

$ rpm -q javapackages-tools

$ cat pom.xml

$ (pom_add_dep foo:bar)

$ cat pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- section added by maintainer -->
<!-- begin of code added by maintainer -->
<!-- end of code added by maintainer -->
Comment 3 Mikolaj Izdebski 2013-09-12 01:33:40 EDT
Fixed in javapackages-tools-3.0.3-1
Comment 4 Mikolaj Izdebski 2013-09-12 01:41:20 EDT
I believe that this bug is fixed in javapackages-tools-3.0.3-1,
which is available in Fedora Rawhide, so I am closing this bug now.

The build containing the fix can be found at Koji:

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