Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160955 - dev-java/jmock-1.1.0.ebuild packages jmock-cglib-SNAPSHOT.jar, not jmock-SNAPSHOT.jar, into jmock.jar
Summary: dev-java/jmock-1.1.0.ebuild packages jmock-cglib-SNAPSHOT.jar, not jmock-SNAP...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal
Assignee: Java team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-08 17:42 UTC by David Emmett
Modified: 2007-01-09 05:00 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for ebuild, renaming the second java-pkg_newjar file (jmock-1.1.0.ebuild.patch,410 bytes, text/plain)
2007-01-08 17:45 UTC, David Emmett
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Emmett 2007-01-08 17:42:12 UTC
The jmock-1.1.0.ebuild file contains an error. The java-pkg_newjar eclass function is called twice, once to rename jmock-SNAPSHOT.jar into jmock.jar, and once to rename jmock-cglib-SNAPSHOT.jar into jmock.jar.

This means that you end up with a bad jar. When you try to use the jmock.jar in Java projects, you get lots of ClassNotFoundExceptions.

What should have been done is for the jmock-SNAPSHOT.jar to be repackaged into jmock.jar, and jmock-cglib-SNAPSHOT.jar to be repackaged into jmock-cglib.jar. 

Below is a patch of the ebuild to fix this:

------------
--- jmock-1.1.0.ebuild.orig	2007-01-08 18:29:06.000000000 +0100
+++ jmock-1.1.0.ebuild	2007-01-08 18:09:33.000000000 +0100
@@ -46,7 +46,7 @@
 
 src_install() {
 	java-pkg_newjar build/dist/jars/jmock-SNAPSHOT.jar jmock.jar
-	java-pkg_newjar build/dist/jars/jmock-cglib-SNAPSHOT.jar jmock.jar
+	java-pkg_newjar build/dist/jars/jmock-cglib-SNAPSHOT.jar jmock-cglib.jar
 	dodoc CHANGELOG
 	dohtml overview.html
 
------------

Reproducible: Always

Steps to Reproduce:
1. Emerge jmock-1.1.0
2. Check the jmock.jar file in /usr/share/jmock-1.0/lib/
3. Unpack the jmock-1.1.0 distfile, and build the sources using the supplied ant file.
4. Compare the jmock.jar in /usr/share/jmock-1.0/lib/ with the jar file you've just built. They are very different in size.

Actual Results:  
I ended up with a single jmock.jar of size 3264 bytes.

Expected Results:  
I expected to find a much larger jmock.jar and a jmock-cglib.jar
Comment 1 David Emmett 2007-01-08 17:45:47 UTC
Created attachment 106069 [details]
Patch for ebuild, renaming the second java-pkg_newjar file
Comment 2 Josh Nichols (RETIRED) gentoo-dev 2007-01-09 05:00:06 UTC
Fixed with 1.1.0-r1, thanks for reporting!