<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>160955</bug_id>
          
          <creation_ts>2007-01-08 17:42 0000</creation_ts>
          <short_desc>dev-java/jmock-1.1.0.ebuild packages jmock-cglib-SNAPSHOT.jar, not jmock-SNAPSHOT.jar, into jmock.jar</short_desc>
          <delta_ts>2007-01-09 05:00:06 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Ebuilds</component>
          <version>2006.1</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>daisy@xs4all.nl</reporter>
          <assigned_to>java@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>daisy@xs4all.nl</who>
            <bug_when>2007-01-08 17:42:12 0000</bug_when>
            <thetext>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&apos;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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>daisy@xs4all.nl</who>
            <bug_when>2007-01-08 17:45:47 0000</bug_when>
            <thetext>Created an attachment (id=106069)
Patch for ebuild, renaming the second java-pkg_newjar file

</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>nichoj@gentoo.org</who>
            <bug_when>2007-01-09 05:00:06 0000</bug_when>
            <thetext>Fixed with 1.1.0-r1, thanks for reporting!</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>106069</attachid>
            <date>2007-01-08 17:45 0000</date>
            <desc>Patch for ebuild, renaming the second java-pkg_newjar file</desc>
            <filename>jmock-1.1.0.ebuild.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGptb2NrLTEuMS4wLmVidWlsZC5vcmlnCTIwMDctMDEtMDggMTg6Mjk6MDYuMDAwMDAwMDAw
ICswMTAwCisrKyBqbW9jay0xLjEuMC5lYnVpbGQJMjAwNy0wMS0wOCAxODowOTozMy4wMDAwMDAw
MDAgKzAxMDAKQEAgLTQ2LDcgKzQ2LDcgQEAKIAogc3JjX2luc3RhbGwoKSB7CiAJamF2YS1wa2df
bmV3amFyIGJ1aWxkL2Rpc3QvamFycy9qbW9jay1TTkFQU0hPVC5qYXIgam1vY2suamFyCi0JamF2
YS1wa2dfbmV3amFyIGJ1aWxkL2Rpc3QvamFycy9qbW9jay1jZ2xpYi1TTkFQU0hPVC5qYXIgam1v
Y2suamFyCisJamF2YS1wa2dfbmV3amFyIGJ1aWxkL2Rpc3QvamFycy9qbW9jay1jZ2xpYi1TTkFQ
U0hPVC5qYXIgam1vY2stY2dsaWIuamFyCiAJZG9kb2MgQ0hBTkdFTE9HCiAJZG9odG1sIG92ZXJ2
aWV3Lmh0bWwKIAo=
</data>        

          </attachment>
    </bug>

</bugzilla>