Bug 977984 - javapackages-tools: maven_depmap.py should record information about installed JAR files
Summary: javapackages-tools: maven_depmap.py should record information about installed...
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: javapackages-tools
Version: rawhide
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-25 18:07 UTC by Mikolaj Izdebski
Modified: 2013-08-09 11:40 UTC (History)
5 users (show)

Fixed In Version: 2.0.0-1
Clone Of:
Environment:
Last Closed: 2013-08-09 11:40:38 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Mikolaj Izdebski 2013-06-25 18:07:44 UTC
%add_maven_depmap (maven_depmap.py) should record more detailed information about JAR files it adds depmaps for.

Description of problem:
Currently XMvn Subst relies on pom.properties to identify artifact files, but this solution has limitations. JARs not build with Maven don't have pom.properties and thus cannot be identified and are not processed by XMvn Subst.

XMVn Subst has 2 main uses: (1) replacing bundled upstream binary JARs with system libraries and (2) creating symlink structure in packages that ship JAR repositories (like maven or jboss-as).  We can't so much about the first case, but in the second case all JARs should be coming from RPM packages so the situation can be improved signifficantly.  I have 2 proposed solutions:

1) maven_depmap.py would inject pom.properties (preferred solution).  It has knowledge about gId, aId and version so it would only have to open the JAR file and add pom.properties if it's missing. In case pom.properties is present its correctness should be verified and if it doesn't match the POM the build should be aborted.

2) maven_depmap.py would store JAR file hash (like MD5) into fragment file. To identify JAR file XMvn Subst would calculate hash of binary JAR and look it up in fragment files.  This solution is worse and should IMO be implemented only if there are any problems with injecting pom.properties (solution nr 1).

If this reature is implemented then (after rebuild of all packages) XMvn Subst will be able to create symlink structure for any combination of artifacts, as long as they all are in Maven repository.

Comment 1 Mikolaj Izdebski 2013-06-25 18:38:15 UTC
Additional notes:

1) this feature is especially important for automating installation of OSGi bundles, which often contain lib/ directory with dependencies

2) this feature should be implemented before F-20 mass rebuild so that all JARs in distribution have pom.properties injected in Fedora 20

Comment 2 Mikolaj Izdebski 2013-08-09 11:40:38 UTC
This feature was implemented in upstream version 2.0.0 (commit 32cd45e).


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