Griffon 0.9 sneak peek: packaging - No Fluff Just Stuff

Griffon 0.9 sneak peek: packaging

Posted by: Andres Almiray on July 7, 2010

The next set of new features to be found in the upcoming Griffon 0.9 release are related to packaging.

1. META-INF resources

Dealing with META-INF resources in a cross platform independent way is not as easy as it sounds given that some versions of Windows simply disregard directory names with all caps and treat them as all lower caps. But Ant knows how to deal with this problem, and given that Gant is built on top of Ant so does Griffon. Placing a file under griffon-app/conf/metainf means it will be packaged inside the jar's META-INF directory. It even works for any directories you place there. As an added benefit of this new resource location is that all resources that are placed there will also be transparently available during testing, your code won't know the difference.

2. Plugin packaging

Plugins have received a huge face lift in this release, one of the main areas is packaging. During plugin/addon packaging the following jars may be generated
  • griffon-<name>-<version>-sources.jar - contains all source files from griffon-app/*, src/main, src/test and additional source directories configured in Buildconfig.groovy
  • griffon-<name>-<version>-javadoc.jar - contains groovydocs generated for all sources.
  • griffon-<name>-<version>-test.jar - contains all compiled tests sources form src/test and all test resources from test/resources

3. Installer plugin integration

Griffon's package command let's you package an application in 4 default formats: zip, jar, applet and webstart. The Installer plugin provides additional installer/launcher targets, like izpack, rpm, deb, mac and windows. Until now you had to call the plugin's scripts to package the application for a particular target, for example
griffon prepare-izpack
griffon create-izpack
Starting in Griffon 0.9 and with the next release of the Installer plugin (0.5) you will be able to call those additional packaging targets as if they were there by default, for example
griffon package izpack
This integration is done via build events so you can hook up other install targets in the same way.

Keep on Groovying!
Andres Almiray

About Andres Almiray

Andres is a Java/Groovy developer and a Java Champion with more than 20 years of experience in software design and development. He has been involved in web and desktop application development since the early days of Java. Andres is a true believer in open source and has participated on popular projects like Groovy, Griffon, and DbUnit, as well as starting his own projects (Json-lib, EZMorph, GraphicsBuilder, JideBuilder). Founding member of the Griffon framework and Hackergarten community event. https://ch.linkedin.com/in/aalmiray

Why Attend the NFJS Tour?

  • » Cutting-Edge Technologies
  • » Agile Practices
  • » Peer Exchange

Current Topics:

  • Languages on the JVM: Scala, Groovy, Clojure
  • Enterprise Java
  • Core Java, Java 8
  • Agility
  • Testing: Geb, Spock, Easyb
  • REST
  • NoSQL: MongoDB, Cassandra
  • Hadoop
  • Spring 4
  • Cloud
  • Automation Tools: Gradle, Git, Jenkins, Sonar
  • HTML5, CSS3, AngularJS, jQuery, Usability
  • Mobile Apps - iPhone and Android
  • More...
Learn More »