Issue 15: Objenesis added to jar
Status:  Fixed
Owner:
Closed:  Dec 2011
Project Member Reported by kandpwel...@gmail.com, Nov 21, 2011
Objenesis is required for both the CGlib and Javassist solutions, so we should include Objenesis jar classes in our jar.  I think we want to repackage them so that it does not conflict with users' possibly already including them in their project independently.  If you are familiar with JarJar Links to do the repackaging it might do the trick, but I don't know if that will work with Gradle, as I think it is Ant-based.

Nov 21, 2011
Project Member #1 codeto...@gmail.com
I think we need a complete manifest of what we want to distribute.

For the binary jar, it sounds like we want:

- the class files for ~/funcito/src
- Objenesis jar

anything else at this point? 
Nov 21, 2011
Project Member #2 kandpwel...@gmail.com
No other major artifacts, but we will want README and/or changelog and a license statement.  I have been using the following as a guide to think about this:

http://producingoss.com/en/packaging.html
Nov 21, 2011
Project Member #3 codeto...@gmail.com
Currently the binary jar contains all library jars. I'll try and exclude the ones we don't want.
Nov 21, 2011
Project Member #4 codeto...@gmail.com
As of the below revision, the binary jar contains only class files and the placeholder txt files. No other jars. I couldn't figure it out yet.

https://code.google.com/p/funcito/source/detail?r=a3a5aa4065af3da278d938827444f060362ac7b5
Nov 21, 2011
Project Member #5 kandpwel...@gmail.com
Have you looked at JarJar Links?

https://code.google.com/p/jarjar/
Nov 22, 2011
Project Member #7 kandpwel...@gmail.com
(No comment was entered for this change.)
Owner: codeto...@gmail.com
Labels: Priority-High Usability
Dec 1, 2011
Project Member #8 codeto...@gmail.com
Please type 'gradle jar' and examine ~/build/libs/funcito-0.1.jar. It will contain the objenesis jar (and only that jar).
Status: CodeComplete
Dec 2, 2011
Project Member #9 kandpwel...@gmail.com
see my code review of the changelist
Dec 8, 2011
Project Member #10 codeto...@gmail.com
New tasks include 'srcJar' and 'binaryJar'. Both are invoked via 'jar'. Please check ~/build/libs for final jar constructs.

Objenesis classes are moved to org/funcito/thirdparty/objenesis/*

I used a post-jar sanity check to ensure that the binary jar works. This should probably be automated somehow.
Status: Fixed
Dec 8, 2011
Project Member #11 kandpwel...@gmail.com
awesomeness!  However, when I gradle build I am getting not only the org/funcito/thirdparty/objenesis/* but also the original classes.  I tried a "gradle clean jar" to make sure it wasn't residual cruft, but I got the same result.
Dec 8, 2011
Project Member #12 kandpwel...@gmail.com
actually, there are no classes there, but I get a lot of empty directories in the jar for the original classpath tree of Objenesis
Dec 8, 2011
Project Member #13 codeto...@gmail.com
Did you do a "git pull origin master" ? What you describe was an early problem but when I do:

gradle clean binaryjar

and then "jar tf build/libs/funcito-0.1.jar", everything looks fine.

Dec 8, 2011
Project Member #14 kandpwel...@gmail.com
Just tried the same thing and I stil get the empty directories.  Can you double check your jar tf outout, or better yet open it in your zip browser of choice to get a better view, to help verify whether we are actually getting different results.  If we need to, let's switch this conversation to a call or email (though I am unavailable shortly)
Dec 8, 2011
Project Member #15 codeto...@gmail.com
I have this message:

Your branch is ahead of 'origin/master' by 1 commit.

This means I'm out of sync somehow. I've seen it before I don't remember what it means. I think we have cleaved the branches somehow. 
Dec 8, 2011
Project Member #16 codeto...@gmail.com
changing status
Status: Started
Dec 8, 2011
Project Member #17 codeto...@gmail.com
I am sync'ed thanks to this answer:

http://stackoverflow.com/a/2586716/12704

When I build the jar and look at "jar tf build/libs/funcito-01.jar" I see classes such as:

org/funcito/thirdparty/objenesis/strategy/BaseInstantiatorStrategy.class
org/funcito/thirdparty/objenesis/strategy/InstantiatorStrategy.class
org/funcito/thirdparty/objenesis/strategy/SerializingInstantiatorStrategy.class
org/funcito/thirdparty/objenesis/strategy/StdInstantiatorStrategy.class

Dec 8, 2011
Project Member #18 kandpwel...@gmail.com
I see those as you do, but I also see *directories* without classes, such as the following:
org/objenesis/
org/objenesis/instantiator/
org/objenesis/instantiator/basic/
org/objenesis/instantiator/gcj/
org/objenesis/instantiator/jrockit/
org/objenesis/instantiator/perc/
org/objenesis/instantiator/sun/
org/objenesis/strategy/

No classes -- just directories.  Can you please check again?
Dec 8, 2011
Project Member #19 kandpwel...@gmail.com
Here's my jar.  You can send me yours if you want.
BTW, how does gradle jar name the jarfile?  My project was started in a local directory called FunctionWrapper (I started before I came up with the Funcito name), and my jarfiles in the build/libs directory get the FunctionWrapper root name instead of Funcito.
FunctionWrapper-0.1.jar
68.8 KB   Download
Dec 9, 2011
Project Member #20 codeto...@gmail.com
comment 19 has been corrected
Dec 9, 2011
Project Member #21 codeto...@gmail.com
Yes, there are directories without classes. I don't know how to get rid of them via JarJar, but I think they are innocuous in the short term?
Dec 9, 2011
Project Member #22 kandpwel...@gmail.com
Harmless but slightly annoying.  If you like we can open this as a new low priority defect so that we can close this one.  Or not.  Great work, btw.
Dec 15, 2011
Project Member #23 kandpwel...@gmail.com
Closing
Dec 15, 2011
Project Member #24 kandpwel...@gmail.com
(No comment was entered for this change.)
Status: Fixed