Bug 977984 - javapackages-tools: maven_depmap.py should record information about installed JAR files
javapackages-tools: maven_depmap.py should record information about installed...
Product: Fedora
Classification: Fedora
Component: javapackages-tools (Show other bugs)
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: Mikolaj Izdebski
Fedora Extras Quality Assurance
: FutureFeature, Triaged, Upstream
Depends On:
  Show dependency treegraph
Reported: 2013-06-25 14:07 EDT by Mikolaj Izdebski
Modified: 2013-08-09 07:40 EDT (History)
5 users (show)

See Also:
Fixed In Version: 2.0.0-1
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-08-09 07:40:38 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 14:07:44 EDT
%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 14:38:15 EDT
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 07:40:38 EDT
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.