1.1 What's new in Griffon 1.2.0? - Reference Documentation
Authors: Andres Almiray
Version: 1.2.0
1.1 What's new in Griffon 1.2.0?
This section covers the new features that are present in 1.2.0 and is broken down into sections covering the build system and core APIs. Note there are many more small enhancements and improvements, these sections just cover some of the highlights.1.1.1 Buildtime
New Commands
list-templates
This command lists all artifact templates available to the current project. Here's for example, the output generated by this command after an application has been created--------------------------------------------------------------------------------
Location Name FileType
--------------------------------------------------------------------------------
application <none>
-- Plugins ---------------------------------------------------------------------
swing-1.1.0 Controller groovy, java
DialogController groovy, java
DialogModel groovy, java
DialogView groovy, java
Model groovy, java
View groovy, java
-- Archetypes ------------------------------------------------------------------
default GriffonAddon groovy, java
IntegrationTests groovy, java
Model groovy, java
Script groovy
ScriptTests groovy
Service groovy, java
ShellCommand java
ShellHelp txt
Tests groovy, java
upload-release
Release packages may be downloaded from Remote Artifact Repositories, however there was no option for upload a release package to a particular repository until now. This command can upload a release package to any repository supported by the Griffon buildtime.wrapper
This command generates or updates the files required by the Griffon wrapper in order to run. These files were previously created during the initialization of a project or an upgrade sequence.Toolkit Aware Plugin Install
Griffon supports several UI toolkits for which many plugins may exist. Some of these plugins provide the same behavior but targeting a different UI toolkit, for example miglayout (swing
) vs. miglayout-javafx (javafx
). Now, every Griffon application has a default UI toolkit specified in its metadata; this fact makes it possible to simplify plugin installation by only specifying the common plugin name, that is, the following commandgriffon install-plugin miglayout
miglayout-javafx
if the application has javafx
defined as its UI toolkit. On the other hand, it will install miglayout
if the UI toolkit is swing
.Griffon Usage Tracking
An opt-in usage tracking system has been put into place in order to monitor the development of the Griffon community and help drive the roadmap for future features. All information is anonymized; usage tracking can be disabled/enabled at any time. Verifying the current status of usage tracking is done by invoking this commandgriffon usage-stats
griffon usage-stats --enabled=[true|false]
Intellij IDEA DSL Support
The Swing GDSL provided by the swing plugin has been updated to support named parameters for all nodes.Eclipse STS DSLD Support
The Swing DSLD provided by the swing plugin has been upgraded and is now compatible with the latest definitions provided by STS.Platform Specific Packaging
Until now, calling `griffon package` create platform specific packages depending on the currently running platform. Thus, if additional packages were needed developers had to run Griffon on different platforms. The `package` command accepts a new flag that defines the target platform to use. For example, packaging for Windows64 when running on OSX is done by invoking the following commandgriffon package --platform=windows64
Enhanced Plugin/Archetype info command
Bothplugin-info
and archetype-info
will display full plugin/archetype description by default. You may specify a --skip-description
flag if you do not want to see the artifact's description.
1.1.2 Runtime
Service LifeCycle
Services now have their own life-cycle methods, similarly to their MVC counterparts. See the section Service LifeCycle for more information.Service Configuration DSL
Services properties may now be configured externally to the service class, using a simple DSL. Refer to the Service Configuration DSL section to learn more.External Configuration
Applications now have the ability to specify alternate locations for configuration files and scripts. Simply configuregriffon.config.locations
in Config.groovy
, for examplegriffon.config.locations = [ "classpath:${appName}-config.properties", "classpath:${appName}-config.groovy", "file:${userHome}/.griffon/${appName}-config.properties", "file:${userHome}/.griffon/${appName}-config.groovy"]
New Application Events
Instances managed by the application (such as MVC members) will now trigger aDestroyInstance
event when the instance is no longer needed. This event is the counterpart of NewInstance
.EventRouter Factory
It's now possible to instantiate custom instances ofEventRouter
by defining a custom EventRouterFactory
.LogManager Factory
Developers now have the choice to plug in customLogManager
instances, by defining their own LogManagerFactory
. The default implementation relies on Log4j.Remove MVC Configurations
MVC Configurations can now be removed from the application's MVCGroupManager. This paves the way for application plugins that may be turned on/off at runtime.Vetoable Models
In the pastGriffonModel
implemented the griffon.core.Observable
. With this release they got upgraded to griffon.core.Vetoable
.Skip Lifecycle Script/Handlers
Applications now have the choice of skipping the execution of lifecycle scripts at their discretion. Specify the following flag inConfig.groovy
to skip themapp.lifecycle.handler.disable = true
1.1.3 Compatibility
Groovy 2.0 Support
Griffon 1.2.0 has upgraded to Groovy 2.0, which for most part is binary compatible with Groovy 1.8.x. Be advised the Groovy 2.x compiler is stricter than previous versions, you may experience some trouble with particular sources, for which solutions are not that difficult to find.Upgraded dependencies
Griffon has upgraded some of its dependencies. The following list specify which ones exactly- slf4j-api 1.7.2
- slf4j-log4j12 1.7.2
- jcl-over-slf4j 1.7.2
- jul-to-slf4j 1.7.2
- org.springframework.beans 3.2.0.RELEASE
- org.springframework.context 3.2.0.RELEASE
- org.springframework.context.support 3.2.0.RELEASE
- org.springframework.core 3.2.0.RELEASE
Removals
Applications no longer trigger anLog4jConfigStart
event when bootstrapping. The GriffonApplication.Event.LOG4J_CONFIG_START
constant value has been removed@.