Class AbstractMetadataPackageMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.jackrabbit.filevault.maven.packaging.mojo.AbstractMetadataPackageMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractSourceAndMetadataPackageMojo
,GenerateMetadataMojo
public abstract class AbstractMetadataPackageMojo extends org.apache.maven.plugin.AbstractMojo
Common ancestor of all mojos dealing with package metadata.
-
-
Field Summary
Fields Modifier and Type Field Description protected String
classifier
Optional classifier to add to the generated package.protected String
outputTimestamp
Timestamp for reproducible output archive entries, either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).protected org.apache.maven.project.MavenProject
project
The Maven project.
-
Constructor Summary
Constructors Constructor Description AbstractMetadataPackageMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected static File
getFirstExistingDirectory(File[] directories)
protected File
getMetaInfVaultSourceDirectory()
protected static File
getMetaInfVaultSourceDirectory(File[] metaInfVaultDirectory, org.apache.maven.plugin.logging.Log log)
protected String
getProjectRelativeFilePath(File file)
protected static String
getRelativePath(Path base, Path file)
protected static File
resolveArtifact(org.eclipse.aether.artifact.Artifact artifact, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, List<org.eclipse.aether.repository.RemoteRepository> repositories)
void
setPrefix(String prefix)
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
project
@Parameter(property="project", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
The Maven project.
-
classifier
@Parameter(property="vault.classifier") protected String classifier
Optional classifier to add to the generated package. If given, the artifact will be attached as a supplemental artifact having this classifier. Also all generated metadata will be pushed to<workDirectory>-<classifier>
and will preferably be looked up from there. In addition the embedded file names will be exchanged leveraging a classifier specific property.- Since:
- 1.1.4
-
outputTimestamp
@Parameter(defaultValue="${project.build.outputTimestamp}") protected String outputTimestamp
Timestamp for reproducible output archive entries, either formatted as ISO 8601yyyy-MM-dd'T'HH:mm:ssXXX
or as an int representing seconds since the epoch (like SOURCE_DATE_EPOCH).- Since:
- 1.1.0
-
-
Method Detail
-
setPrefix
public void setPrefix(String prefix)
-
getMetaInfVaultSourceDirectory
protected File getMetaInfVaultSourceDirectory()
- Returns:
- the first matching directory from the list given in
metaInfVaultDirectory
-
getMetaInfVaultSourceDirectory
protected static File getMetaInfVaultSourceDirectory(File[] metaInfVaultDirectory, org.apache.maven.plugin.logging.Log log)
-
resolveArtifact
protected static File resolveArtifact(org.eclipse.aether.artifact.Artifact artifact, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, List<org.eclipse.aether.repository.RemoteRepository> repositories) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-