Package ch.ivyteam.ivy.maven
Class AbstractEngineMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
ch.ivyteam.ivy.maven.AbstractEngineMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractEngineInstanceMojo
,AbstractIntegrationTestMojo
,InstallEngineMojo
,SetupIntegrationTestPropertiesMojo
,SetupIvyResourcesPropertiesMojo
,SetupIvyTestPropertiesMojo
,ShareEngineCoreClasspathMojo
public abstract class AbstractEngineMojo
extends org.apache.maven.plugin.AbstractMojo
A MOJO that relies on an unpacked ivy engine.
- Since:
- 6.0.0
- Author:
- Reguel Wermelinger
-
Field Summary
Modifier and TypeFieldDescriptionprotected static final String
protected static final String
Location where ivy engines in required version can be extracted to.Location where an unpacked (may pre-configured) ivy Engine in therequired version
exists.protected String
The ivy Engine version or version-range that must be used.protected static final String
keep synch with pom.xml > reporting > maven-plugin-plugin > requirementsFields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final File
protected final org.apache.maven.artifact.versioning.ArtifactVersion
getInstalledEngineVersion
(File engineDir) protected final org.apache.maven.artifact.versioning.VersionRange
protected final File
Caution: normally you should favoridentifyAndGetEngineDirectory()
.protected final File
protected final boolean
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.maven.plugin.Mojo
execute
-
Field Details
-
MINIMAL_COMPATIBLE_VERSION
keep synch with pom.xml > reporting > maven-plugin-plugin > requirements- See Also:
-
DEFAULT_VERSION
- See Also:
-
ENGINE_DIRECTORY_PROPERTY
- See Also:
-
engineDirectory
Location where an unpacked (may pre-configured) ivy Engine in therequired version
exists.If parameter is not set it will be a sub-directory of the
engineCacheDirectory
.If the Engine does not yet exist, it can be automatically downloaded.
-
engineCacheDirectory
@Parameter(defaultValue="${settings.localRepository}/.cache/ivy", property="ivy.engine.cache.directory") public File engineCacheDirectoryLocation where ivy engines in required version can be extracted to.If the Engine does not yet exist, it can be automatically downloaded.
-
ivyVersion
@Parameter(property="ivy.engine.version", defaultValue="11.2.0", required=true) protected String ivyVersionThe ivy Engine version or version-range that must be used. Must be equal or higher than "11.2.0" Examples:
- "
6.1.2
" means ivyVersion = 6.1.2 - "
[6.1.0,7.0.0)
" means 6.1.0 <= ivyVersion < 7.0.0 - "
(6.0.0,]
" means ivyVersion > 6.0.0
- "
-
-
Constructor Details
-
AbstractEngineMojo
public AbstractEngineMojo()
-
-
Method Details
-
getRawEngineDirectory
Caution: normally you should favoridentifyAndGetEngineDirectory()
. Otherwise the returned 'directory' could be yet invalid!- Returns:
- the raw engine directory
-
identifyAndGetEngineDirectory
protected final File identifyAndGetEngineDirectory() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
isEngineDirectoryIdentified
protected final boolean isEngineDirectoryIdentified() -
findMatchingEngineInCacheDirectory
protected final File findMatchingEngineInCacheDirectory() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getInstalledEngineVersion
protected final org.apache.maven.artifact.versioning.ArtifactVersion getInstalledEngineVersion(File engineDir) throws org.apache.maven.plugin.MojoExecutionException - Throws:
org.apache.maven.plugin.MojoExecutionException
-
getIvyVersionRange
protected final org.apache.maven.artifact.versioning.VersionRange getIvyVersionRange() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-