Bug 1033664 - tomcat-juli.jar isn't resolved by xmvn-subst
Summary: tomcat-juli.jar isn't resolved by xmvn-subst
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tomcat
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Mikolaj Izdebski
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-22 14:48 UTC by Robert Rati
Modified: 2014-01-21 14:32 UTC (History)
3 users (show)

Fixed In Version: 7.0.47-3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-21 14:32:11 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Robert Rati 2013-11-22 14:48:34 UTC
Description of problem:
The tomcat-juli.jar isn't resolved by xmvn-subst.  The jar resides in _datadir/tomcat/bin but is symlinked to from _javadir/tomcat.  The other tomcat jars are properly resolved, so I'd guess the tomcat-juli.jar is missing the metadata for resolution or is overwritten in the tomcat packaging.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Stanislav Ochotnicky 2013-11-22 15:10:24 UTC
I'll explain a bit more perhaps:
some time ago %add_maven_depmap has been modified to inject Maven metadata into the jar itself. This way xmvn-subst can then replace jars with symlinks even if the package hasn't been built with Maven.

Other tomcat jars have META-INF/maven/org.apache.tomcat/XXX/pom.properties file injected. juli doesn't (for some reason). It's possible some file juggling in the spec can overwrite the file with injected pom.properties?

Comment 2 Mikolaj Izdebski 2014-01-15 13:53:13 UTC
Fixed in tomcat-7.0.47-2

Comment 3 Mikolaj Izdebski 2014-01-15 14:29:44 UTC
Rebuilding the package didn't fix the problem.

It turns out that JAR which was used during call to %add_maven_depmap is being replaced with a symnlink.  The first JAR with injected pom.properties is lost.

%global libdir %{_javadir}/%{name}
...
%add_maven_depmap JPP.%{name}-tomcat-juli.pom %{name}/tomcat-juli.jar
...
# replace temporary copy with link
%{__ln_s} -f %{bindir}/tomcat-juli.jar ${RPM_BUILD_ROOT}%{libdir}/

Comment 4 Mikolaj Izdebski 2014-01-21 14:08:26 UTC
Commited the fix.

Verification:

$ rpm -q tomcat-lib
tomcat-lib-7.0.47-2.fc21.noarch
$ xmvn-subst tomcat-juli.jar 
[main] INFO org.fedoraproject.xmvn.tools.subst.ArtifactVisitor - Skipping file tomcat-juli.jar: No artifact definition found

$ rpm -q tomcat-lib
tomcat-lib-7.0.47-3.fc21.noarch
$ xmvn-subst tomcat-juli.jar 
[main] INFO org.fedoraproject.xmvn.tools.subst.ArtifactVisitor - Linked tomcat-juli.jar to /usr/share/java/tomcat/tomcat-juli.jar
$ readlink -f tomcat-juli.jar 
/usr/share/tomcat/bin/tomcat-juli.jar

Comment 5 Mikolaj Izdebski 2014-01-21 14:32:11 UTC
I believe that this bug is fixed in tomcat-7.0.47-3,
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=492693


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