Class BuildClasspathMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.apache.maven.plugins.dependency.AbstractDependencyMojo
org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
org.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo
de.iip_ecosphere.platform.tools.maven.dependencies.BuildClasspathMojo
- All Implemented Interfaces:
Comparator<org.apache.maven.artifact.Artifact>,org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
BuildPluginClasspathMojo
@Mojo(name="build-classpath",
requiresDependencyResolution=TEST,
defaultPhase=GENERATE_SOURCES,
threadSafe=true)
public class BuildClasspathMojo
extends org.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo
Reused build-classpath Mojo, allowing to prepend/append classpath elements not part of the Maven classpath.
Happens for generated platform services.
- Author:
- Holger Eichelberger, SSE
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate booleanprivate booleanprivate Stringprivate Stringprivate Stringprivate Fileprivate Stringprivate Stringprivate List<org.apache.maven.artifact.repository.ArtifactRepository> private List<org.eclipse.aether.repository.RemoteRepository> private org.eclipse.aether.RepositorySystemSessionprivate org.eclipse.aether.RepositorySystemprivate booleanFields inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
classifier, excludeArtifactIds, excludeClassifiers, excludeGroupIds, excludeScope, excludeTransitive, excludeTypes, includeArtifactIds, includeClassifiers, includeGroupIds, includeScope, includeTypes, markersDirectory, overWriteIfNewer, overWriteReleases, overWriteSnapshots, prependGroupId, typeFields inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
outputAbsoluteArtifactFilename, reactorProjects, sessionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdjusts the setup.Copies a given list and applies the specifictransformfunction to the elements.protected voidprivate voidThe actual extended implementation.Returns the befores.private voidHandles the spring loader appends.org.apache.maven.project.ProjectBuildingRequest(package private) static <C extends Collection<String>>
CreadEntries(String contents, C result) Returns the classpath contents as a collection of entries/tokens.readEntriesToList(String contents) Returns the classpath contents as a list of entries/tokens.readEntriesToSet(String contents) Returns the classpath contents as a set of entries/tokens.voidsetBefores(List<String> befores) Sets the befores.voidsetFileSeparator(String theFileSeparator) voidsetLocalRepoProperty(String localRepoProperty) voidsetOutputFile(File outputFile) voidsetPathSeparator(String thePathSeparator) voidvoidsetPrepends(List<String> prepends) Sets the prepends.Methods inherited from class org.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo
appendArtifactPath, attachFile, compare, getMarkedArtifactFilter, isStripVersion, readClasspathFile, setOutputProperty, setRegenerateFile, setStripVersionMethods inherited from class org.apache.maven.plugins.dependency.fromDependencies.AbstractDependencyFilterMojo
filterMarkedDependencies, getArtifactResolver, getClassifierTranslatedDependencies, getDependencyResolver, getDependencySets, getDependencySets, getMarkersDirectory, getRepositoryManager, getResolvedDependencies, isPrependGroupId, resolve, setMarkersDirectory, setPrependGroupIdMethods inherited from class org.apache.maven.plugins.dependency.AbstractDependencyMojo
copyFile, execute, getArchiverManager, getProject, isSilent, isSkip, isUseJvmChmod, newResolvePluginProjectBuildingRequest, setArchiverManager, setSilent, setSkip, setUseJvmChmod, unpack, unpack, unpackMethods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Comparator
equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Field Details
-
TO_WIN
-
TO_LINUX
-
outputFile
-
pathSeparator
-
prefix
-
localRepoProperty
-
fileSeparator
-
cleanup
@Parameter(property="mdep.cleanup", defaultValue="true") private boolean cleanup -
befores
-
prepends
-
appends
-
afters
-
lineSeparator
-
rollout
@Parameter(required=false) private boolean rollout -
addTestArtifact
@Parameter(property="mdep.addTestArtifact", defaultValue="false") private boolean addTestArtifact -
addAppLoader
@Parameter(property="mdep.addAppLoader", defaultValue="false") private boolean addAppLoader -
remoteRepositories
@Parameter(defaultValue="${project.remoteProjectRepositories}", readonly=true) private List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories -
repoSession
@Parameter(defaultValue="${repositorySystemSession}", readonly=true) private org.eclipse.aether.RepositorySystemSession repoSession -
remoteArtifactRepositories
@Parameter(defaultValue="${project.remoteArtifactRepositories}", readonly=true, required=true) private List<org.apache.maven.artifact.repository.ArtifactRepository> remoteArtifactRepositories -
repoSystem
@Component private org.eclipse.aether.RepositorySystem repoSystem -
oldEntries
-
-
Constructor Details
-
BuildClasspathMojo
public BuildClasspathMojo()
-
-
Method Details
-
setOutputFile
- Overrides:
setOutputFilein classorg.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo
-
setFileSeparator
- Overrides:
setFileSeparatorin classorg.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo
-
setPathSeparator
- Overrides:
setPathSeparatorin classorg.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo
-
setLocalRepoProperty
- Overrides:
setLocalRepoPropertyin classorg.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo
-
setPrefix
- Overrides:
setPrefixin classorg.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo
-
setPrepends
Sets the prepends.- Parameters:
prepends- the prepends
-
setBefores
Sets the befores.- Parameters:
befores- the befores
-
getBefores
Returns the befores.- Returns:
- the befores, may be null
-
readEntries
Returns the classpath contents as a collection of entries/tokens.- Type Parameters:
C- the type of collection- Parameters:
contents- the classpath contentsresult- the result collection instance- Returns:
- the entries in
result
-
readEntriesToSet
Returns the classpath contents as a set of entries/tokens.- Parameters:
contents- the classpath contents- Returns:
- the entries
-
readEntriesToList
Returns the classpath contents as a list of entries/tokens.- Parameters:
contents- the classpath contents- Returns:
- the entries
-
copy
Copies a given list and applies the specifictransformfunction to the elements.- Parameters:
list- the list to copy, may be nulltransform- the transform function- Returns:
- the copied list, null if
listis null
-
doExecute
protected void doExecute() throws org.apache.maven.plugin.MojoExecutionException- Overrides:
doExecutein classorg.apache.maven.plugins.dependency.fromDependencies.BuildClasspathMojo- Throws:
org.apache.maven.plugin.MojoExecutionException
-
adjustTo
Adjusts the setup.- Parameters:
func- the adjustment function
-
handleSpringLoader
private void handleSpringLoader()Handles the spring loader appends. -
doExecuteImpl
private void doExecuteImpl() throws org.apache.maven.plugin.MojoExecutionExceptionThe actual extended implementation.- Throws:
org.apache.maven.plugin.MojoExecutionException- if the execution fails
-
newResolveArtifactProjectBuildingRequest
public org.apache.maven.project.ProjectBuildingRequest newResolveArtifactProjectBuildingRequest()- Overrides:
newResolveArtifactProjectBuildingRequestin classorg.apache.maven.plugins.dependency.AbstractDependencyMojo
-