Bug 1014307 - javapackages-tools: %add_maven_depmap does not include <version> in <maven> part
javapackages-tools: %add_maven_depmap does not include <version> in <maven> part
Product: Fedora
Classification: Fedora
Component: javapackages-tools (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Mikolaj Izdebski
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-10-01 13:12 EDT by Mikolaj Izdebski
Modified: 2013-10-02 11:56 EDT (History)
4 users (show)

See Also:
Fixed In Version: 3.3.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-02 11:56:18 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-10-01 13:12:33 EDT
Description of problem:
In some cases %add_maven_depmap does not include <version> in <maven> part, which causes auto-provides generator to fail.

Either maven_depmap should always include version or auto-provides generator should accept depmaps with missing versions.

Version-Release number of selected component (if applicable):

Steps to Reproduce:
1. build junit in rawhide

Actual results:
Traceback (most recent call last):
  File "/usr/lib/rpm/maven.prov", line 74, in <module>
    builder = TagBuilder ()
  File "/usr/lib/rpm/maven.prov", line 46, in __init__
    depmap = Depmap(path)
  File "/usr/lib/python2.7/site-packages/javapackages/depmap.py", line 62, in __init__
    if not self.get_provided_mappings():
  File "/usr/lib/python2.7/site-packages/javapackages/depmap.py", line 107, in get_provided_mappings
    raise DepmapInvalidException("Depmap {path} does not have version in maven provides".format(path=self.__path))
DepmapInvalidException: Depmap /builddir/build/BUILDROOT/junit-4.11-7.fc21.x86_64/usr/share/maven-fragments/junit does not have version in maven provides

Additional info:
Depmap generated by %add_maven_depmap is:

Comment 1 Stanislav Ochotnicky 2013-10-02 08:41:08 EDT
This is caused by:
%pom_xpath_set pom:project/pom:version "%{version}"

POM class expects only text content for <version> node. Similar problems can be expected in other node handling methods
Comment 2 Stanislav Ochotnicky 2013-10-02 11:13:48 EDT
Fixed by upstream commit b80c1b6b, testcases in 59ec908f
Comment 3 Mikolaj Izdebski 2013-10-02 11:47:04 EDT
Fixed in javapackages-tools-3.3.1-1
Comment 4 Mikolaj Izdebski 2013-10-02 11:47:47 EDT
Verified by rebuilding junit package.
Comment 5 Mikolaj Izdebski 2013-10-02 11:56:18 EDT
I believe that this bug is fixed in javapackages-tools-3.3.1-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.