This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Other Languages and the fly likes Packaging and Documentation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Languages » Other Languages
Bookmark "Packaging and Documentation" Watch "Packaging and Documentation" New topic
Author

Packaging and Documentation

Ed Smith
Greenhorn

Joined: Jun 06, 2006
Posts: 3
As I am thinking about using Groovy in an open-source project, I am curious about two things:

a) Can Groovy scripts be packaged up in a JAR and be easily used as a third party library?

b) Can Javadoc comments be included in and subsequently generated from Groovy scripts?

Thanks,

Ed
Tug Wilson
Ranch Hand

Joined: Dec 12, 2006
Posts: 33
You can put the Groovy source in the jar and the Groovy classloader will compile them "on the fly". Alternativly you can use grovyc to compile them to class files and put the class files in the jar file.

We do not have a gerovydoc implementation at the moment - it's on the todo list
Scott Hickey
Greenhorn

Joined: Dec 12, 2006
Posts: 5
On a project I work on, we use Groovy for a calculation component. We compile the Groovy using Ant and package up the class files in a jar. The jar is wrapped in an EJB. When compiled into .class files, Groovy integrates with Java seemlessly.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Packaging and Documentation