Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug
Bug#: 160955
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Java team <java@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: David Emmett <daisy@xs4all.nl>
Add CC:
CC:
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
jmock-1.1.0.ebuild.patch Patch for ebuild, renaming the second java-pkg_newjar file text/plain David Emmett 2007-01-08 17:45 0000 410 bytes Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 160955 depends on: Show dependency tree
Bug 160955 blocks:
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2007-01-08 17:42 0000
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 From David Emmett 2007-01-08 17:45:47 0000 -------
Created an attachment (id=106069) [details]
Patch for ebuild, renaming the second java-pkg_newjar file

------- Comment #2 From Josh Nichols (RETIRED) 2007-01-09 05:00:06 0000 -------
Fixed with 1.1.0-r1, thanks for reporting!

Bug List: (This bug is not in your last search results)   Show last search results      Search page      Enter new bug