(Quick Reference)

4.7.8 Force Artifact Upgrades - Reference Documentation

Authors: Andres Almiray

Version: 1.2.0

4.7.8 Force Artifact Upgrades

Griffon follows a convention for version numbers when applied to artifacts (such as plugins and archetypes). This convention splits the version number into the following parts

<major>.<minor>.<revision>-<tag>

where revision and tag may be omitted. When artifacts get upgraded Griffon will check for number compatibility and pick the version whose numbers are greatest than the rest. However in the case of major it will throw an error if two version numbers differ, as the convention is that there's bound to be a compatibility conflict if there are at least two different values for major .

Developers can inspect the conflicts report and consult the release notes for each marked dependency and decide if the upgrade should proceed or not. If the decision is to continue with the upgrade then the developer must inform the build that a forced upgrade must occur. This can be accomplished by setting the griffon.artifact.force.upgrade flag to true, like this

griffon -Dgriffon.artifact.force.upgrade=true clean

Both install-plugin and install-archetype commands have a shortcut option (force-upgrade) that can set the value of this flag. Here's an example report showing two different versions of the swing plugin

! swing-1.1.0 from griffon-local
! glazedlists-0.9 from griffon-local
   ! swing-0.9.5 from griffon-local
Could not resolve plugin dependencies.

The character ! next to each artifact name/version means there's a conflict in that artifact or any of its dependencies. Additional characters may be present (one per line)

  • . the artifact is installed
  • + the artifact will be installed
  • - the artifact will be removed
  • ? the artifact could not be resolved

For example, adding a plugin dependency on bogus-0.0.0 results in the following output

-= INSTALLED =-
. glazedlists-0.9
   . swing-1.1.0
. swing-1.1.0
-= MISSING =-
? bogus-0.0.0 not found in any repository