Class BaseMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
cloud.piranha.maven.plugins.piranha.BaseMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
public abstract class BaseMojo
extends org.apache.maven.plugin.AbstractMojo
The base Mojo for the start and run goals.
- Author:
- Manfred Riem ([email protected])
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
Stores the build directory.protected String
Stores the context path.protected Integer
Stores the HTTP port.protected String
Stores the JVM arguments.protected File
Stores the local repository directory.protected File
Stores the Piranha JAR file.protected String
Stores the runtime directory.protected static final String
Stores the 'Unable to create directories' message.protected String
Stores the version of the Piranha runtime to use.protected String
Stores the WAR name.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected String
convertGroupIdToPath
(String groupId) Convert a Maven groupId to a path snippet.protected String
createArtifactPath
(String groupId, String artifactId, String version, String type) Create an artifact path from a groupId, artifactId, version and type.protected URL
createMavenCentralArtifactUrl
(String groupId, String artifactId, String version, String type) Create the Maven central artifact URLprotected void
Determine what version of Piranha to use.protected void
Get the Piranha distribution JAR file.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
-
UNABLE_TO_CREATE_DIRECTORIES
Stores the 'Unable to create directories' message.- See Also:
-
buildDirectory
@Parameter(defaultValue="${project.build.directory}", required=true, readonly=true) protected String buildDirectoryStores the build directory. -
contextPath
Stores the context path. -
httpPort
Stores the HTTP port. -
jvmArguments
Stores the JVM arguments. -
localRepositoryDirectory
Stores the local repository directory. -
piranhaJarFile
Stores the Piranha JAR file. -
runtimeDirectory
@Parameter(defaultValue="${project.build.directory}/piranha", required=true) protected String runtimeDirectoryStores the runtime directory. -
version
Stores the version of the Piranha runtime to use. -
warName
@Parameter(defaultValue="${project.build.finalName}", required=true, readonly=true) protected String warNameStores the WAR name.
-
-
Constructor Details
-
BaseMojo
public BaseMojo()
-
-
Method Details
-
convertGroupIdToPath
Convert a Maven groupId to a path snippet.- Parameters:
groupId
- the groupId.- Returns:
- the path.
-
createArtifactPath
Create an artifact path from a groupId, artifactId, version and type.- Parameters:
groupId
- the groupId.artifactId
- the artifactId.version
- the versiontype
- the type.- Returns:
- the artifact path.
-
createMavenCentralArtifactUrl
protected URL createMavenCentralArtifactUrl(String groupId, String artifactId, String version, String type) throws IOException Create the Maven central artifact URL- Parameters:
groupId
- the groupId.artifactId
- the artifactId.version
- the versiontype
- the type.- Returns:
- the URL.
- Throws:
IOException
- when an I/O error occurs.
-
determineVersionToUse
protected void determineVersionToUse()Determine what version of Piranha to use. -
getPiranhaJarFile
Get the Piranha distribution JAR file.- Throws:
IOException
- when an I/O error occurs.
-