|
Griffon 1.2.0 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | PROPERTY | CONSTR | METHOD | DETAIL: FIELD | PROPERTY | CONSTR | METHOD |
java.lang.Objectgriffon.util.ArtifactSettings
class ArtifactSettings
Common utilities for dealing with artifacts such as plugins and archetypes.
Field Summary | |
---|---|
private static Pattern |
ARTIFACT_NAME_VERSION_PATTERN
|
private static Logger |
LOG
|
static String |
TIMESTAMP_FORMAT
|
Property Summary | |
---|---|
static String |
ADDON_DESCRIPTOR_SUFFIX
|
static String |
ADDON_DESCRIPTOR_SUFFIX_JAVA
|
static String |
ARCHETYPE_DESCRIPTOR_SUFFIX
|
static String |
PLUGIN_DESCRIPTOR_SUFFIX
|
BuildSettings |
settings
|
Constructor Summary | |
ArtifactSettings(BuildSettings settings)
|
Method Summary | |
---|---|
private String
|
archetypesBase()
|
String
|
artifactBase(String type, boolean framework = false)
|
static int
|
compareVersions(String artifactVersion, String requiredVersion)
Compare two artifact versions |
static Release
|
createReleaseFromMetadata(String type, File file)
|
File[]
|
findAllArtifactDirsForName(String type, String name, boolean framework = false)
|
Resource[]
|
findAllArtifactDirsForType(String type, boolean framework = false)
|
File
|
findArtifactDirForName(String type, String name, boolean framework = false)
|
static Resource
|
getArchetypeDescriptor(String dir)
|
static Resource
|
getArchetypeDescriptor(Resource dir)
|
static String
|
getArchetypeNameFromDescriptor(Resource archetypeDescriptor)
|
static String
|
getArchetypeNameFromDescriptor(String fileName)
|
static Resource
|
getArtifactDescriptor(String type, String dir)
|
static Resource
|
getArtifactDescriptor(String type, Resource dir)
|
static String
|
getArtifactNameFromDescriptor(String type, String dir)
|
static String
|
getArtifactNameFromDescriptor(String type, Resource dir)
|
static Release
|
getArtifactRelease(String type, String dir)
|
static Release
|
getArtifactRelease(String type, File dir)
|
private static def
|
getArtifactVersionInternal(String artifactVersion, def index)
|
File
|
getInstallPathFor(String type, String name, String version, boolean framework = false)
|
Map
|
getInstalledArtifacts(String type, boolean framework = false)
Finds all artifacts of the given type that are installed. |
Release
|
getInstalledRelease(String type, String name, boolean framework = false)
|
Release
|
getInstalledRelease(String type, String name, String version, boolean framework = false)
|
Map
|
getInstalledReleases(String type, boolean framework = false)
|
static String
|
getLowerVersion(String artifactVersion)
Returns the lower version of a Griffon version number expression in a artifact |
static Resource
|
getPluginDescriptor(String dir)
|
static Resource
|
getPluginDescriptor(Resource dir)
|
static String
|
getPluginNameFromDescriptor(Resource artifactDescriptor)
|
static String
|
getPluginNameFromDescriptor(String fileName)
|
static Map
|
getRegisteredArtifacts(String type, Metadata metadata = Metadata.current)
Finds all artifacts of the given type that are registered with the project's metadata. |
Release
|
getReleaseFromMetadata(String type, String name, String version = null, boolean framework = false)
|
static String
|
getUpperVersion(String artifactVersion)
Returns the upper version of a Griffon version number expression in a artifact |
boolean
|
isArtifactInstalled(String type, String name, String version, boolean framework = false)
|
static boolean
|
isValidVersion(String artifactVersion, String requiredVersion)
Check if the required version is a valid for the given artifact version |
static Archetype
|
parseArchetypeFromJSON(def json)
|
static Artifact
|
parseArtifactFromJSON(String type, def json)
|
static Artifact
|
parseArtifactFromXML(String type, def xml)
|
static Plugin
|
parsePluginFromJSON(def json)
|
static Plugin
|
parsePluginFromXML(def xml)
|
static Release
|
parseReleaseFromJSON(def json)
|
static Release
|
parseReleaseFromXML(def xml)
|
private String
|
pluginsBase(boolean framework)
|
Resource[]
|
resolveResources(String pattern)
|
static boolean
|
supportsAtLeastVersion(String artifactVersion, String requiredVersion)
|
private static def
|
trimTag(String artifactVersion)
|
Methods inherited from class Object | |
---|---|
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll |
Field Detail |
---|
private static final Pattern ARTIFACT_NAME_VERSION_PATTERN
private static final Logger LOG
public static final String TIMESTAMP_FORMAT
Property Detail |
---|
static final String ADDON_DESCRIPTOR_SUFFIX
static final String ADDON_DESCRIPTOR_SUFFIX_JAVA
static final String ARCHETYPE_DESCRIPTOR_SUFFIX
static final String PLUGIN_DESCRIPTOR_SUFFIX
final BuildSettings settings
Constructor Detail |
---|
ArtifactSettings(BuildSettings settings)
Method Detail |
---|
private String archetypesBase()
String artifactBase(String type, boolean framework = false)
static int compareVersions(String artifactVersion, String requiredVersion)
artifactVersion
- The artifact versionrequiredVersion
- The required version
static Release createReleaseFromMetadata(String type, File file)
File[] findAllArtifactDirsForName(String type, String name, boolean framework = false)
Resource[] findAllArtifactDirsForType(String type, boolean framework = false)
File findArtifactDirForName(String type, String name, boolean framework = false)
static Resource getArchetypeDescriptor(String dir)
static Resource getArchetypeDescriptor(Resource dir)
static String getArchetypeNameFromDescriptor(Resource archetypeDescriptor)
static String getArchetypeNameFromDescriptor(String fileName)
static Resource getArtifactDescriptor(String type, String dir)
static Resource getArtifactDescriptor(String type, Resource dir)
static String getArtifactNameFromDescriptor(String type, String dir)
static String getArtifactNameFromDescriptor(String type, Resource dir)
static Release getArtifactRelease(String type, String dir)
static Release getArtifactRelease(String type, File dir)
private static def getArtifactVersionInternal(String artifactVersion, def index)
File getInstallPathFor(String type, String name, String version, boolean framework = false)
Map getInstalledArtifacts(String type, boolean framework = false)
type
- one of Archetype.TYPE or Plugin.TYPE.
Release getInstalledRelease(String type, String name, boolean framework = false)
Release getInstalledRelease(String type, String name, String version, boolean framework = false)
Map getInstalledReleases(String type, boolean framework = false)
static String getLowerVersion(String artifactVersion)
static Resource getPluginDescriptor(String dir)
static Resource getPluginDescriptor(Resource dir)
static String getPluginNameFromDescriptor(Resource artifactDescriptor)
static String getPluginNameFromDescriptor(String fileName)
static Map getRegisteredArtifacts(String type, Metadata metadata = Metadata.current)
type
- one of Archetype.TYPE or Plugin.TYPE.
Release getReleaseFromMetadata(String type, String name, String version = null, boolean framework = false)
static String getUpperVersion(String artifactVersion)
boolean isArtifactInstalled(String type, String name, String version, boolean framework = false)
static boolean isValidVersion(String artifactVersion, String requiredVersion)
artifactVersion
- The artifact versionrequiredVersion
- The required version
static Archetype parseArchetypeFromJSON(def json)
static Artifact parseArtifactFromJSON(String type, def json)
static Artifact parseArtifactFromXML(String type, def xml)
static Plugin parsePluginFromJSON(def json)
static Plugin parsePluginFromXML(def xml)
static Release parseReleaseFromJSON(def json)
static Release parseReleaseFromXML(def xml)
private String pluginsBase(boolean framework)
Resource[] resolveResources(String pattern)
static boolean supportsAtLeastVersion(String artifactVersion, String requiredVersion)
private static def trimTag(String artifactVersion)
Groovy Documentation