Bug 1007203

Summary: javapackages-tools: incorrect artifact extension
Product: [Fedora] Fedora Reporter: Mikolaj Izdebski <mizdebsk>
Component: javapackages-toolsAssignee: Mikolaj Izdebski <mizdebsk>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: java-sig-commits, mizdebsk, msrb, sochotni
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 3.3.1-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-10-02 15:56:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1004310    
Attachments:
Description Flags
Reproducer none

Description Mikolaj Izdebski 2013-09-12 05:58:37 UTC
Description of problem:
maven_depmap.py creates depmap with extension "jar" even if artifact extension is "war".  Such depmaps won't work with XMvn.

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

Steps to Reproduce:

$ python /usr/share/java-utils/maven_depmap.py testfrag /usr/share/maven-poms/JPP-maven-source-plugin.pom /usr/share/java/maven-source-plugin.war 

$ cat testfrag 
<?xml version="1.0" ?>
<dependencyMap>
	<dependency>
		<maven>
			<artifactId>maven-source-plugin</artifactId>
			<groupId>org.apache.maven.plugins</groupId>
			<version>2.2.1</version>
		</maven>
		<jpp>
			<artifactId>maven-source-plugin</artifactId>
			<groupId>JPP</groupId>
		</jpp>
	</dependency>
</dependencyMap>

$ ls -l /usr/share/java/maven-source-plugin.jar
ls: cannot access /usr/share/java/maven-source-plugin.jar: No such file or directory

Actual results:
Extension in <jpp> part is set to "jar", but artifact extension is "war".

Expected results:
maven_depmap.py should either set extension to "war" in <jpp> part or fail if it doesn't support war extension. Silently succeeding with broken depmap is not desired.

Comment 1 Michal Srb 2013-09-13 12:20:26 UTC
I believe that this should be fixed upstream in 86ab3d0e

Comment 2 Mikolaj Izdebski 2013-09-26 05:09:50 UTC
Created attachment 803234 [details]
Reproducer

It is still not fixed.  Reproducer attached.

I expect provides
  mvn(org.tukaani:xz:xyzzy:) = 1.1
but that's what is generated:
  mvn(org.tukaani:xz) = 1.1

Comment 3 Michal Srb 2013-09-26 06:41:42 UTC
Generated depmaps are correct, but problem was in maven.prov. This should be fixed upstream in 859652e.

Comment 4 Mikolaj Izdebski 2013-10-02 15:54:54 UTC
Fixed in javapackages-tools-3.3.1-1

Comment 5 Mikolaj Izdebski 2013-10-02 15:55:48 UTC
Verified by rebuilding reproducer SRPM.
Test case added upstream in 0cf9c97.

Comment 6 Mikolaj Izdebski 2013-10-02 15:56:05 UTC
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:
http://koji.fedoraproject.org/koji/buildinfo?buildID=469008