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 Details

    • MINIMAL_COMPATIBLE_VERSION

      protected static final String MINIMAL_COMPATIBLE_VERSION
      keep synch with pom.xml > reporting > maven-plugin-plugin > requirements
      See Also:
    • DEFAULT_VERSION

      protected static final String DEFAULT_VERSION
      See Also:
    • ENGINE_DIRECTORY_PROPERTY

      protected static final String ENGINE_DIRECTORY_PROPERTY
      See Also:
    • engineDirectory

      @Parameter(property="ivy.engine.directory") public File engineDirectory
      Location where an unpacked (may pre-configured) ivy Engine in the required 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 engineCacheDirectory
      Location 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 ivyVersion
      The 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

      protected final File getRawEngineDirectory()
      Caution: normally you should favor identifyAndGetEngineDirectory(). 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