Red Hat Bugzilla – Bug 977984
javapackages-tools: maven_depmap.py should record information about installed JAR files
Last modified: 2013-08-09 07:40:38 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.
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
This feature was implemented in upstream version 2.0.0 (commit 32cd45e).