Class MavenWorkspaceReader
- java.lang.Object
-
- jadex.platform.service.dependency.maven.MavenWorkspaceReader
-
- All Implemented Interfaces:
org.sonatype.aether.repository.WorkspaceReader
public class MavenWorkspaceReader extends java.lang.Object implements org.sonatype.aether.repository.WorkspaceReaderSearch local file system for parent and sibling module POMs.
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.maven.model.ModelmodelThe start POM.protected MavenDependencyResolverServiceserviceThe maven service.
-
Constructor Summary
Constructors Constructor Description MavenWorkspaceReader(org.apache.maven.model.Model model, MavenDependencyResolverService service)Create a maven workspace reader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.FilefindArtifact(org.sonatype.aether.artifact.Artifact artifact)Locates the specified artifact.protected java.io.FilefindModuleInParent(org.sonatype.aether.artifact.Artifact artifact, org.apache.maven.model.Model parent)Find the artifact as a module in a parent.java.util.List<java.lang.String>findVersions(org.sonatype.aether.artifact.Artifact artifact)Determines all available versions of the specified artifact.org.sonatype.aether.repository.WorkspaceRepositorygetRepository()Gets a description of the workspace repository.
-
-
-
Field Detail
-
model
protected org.apache.maven.model.Model model
The start POM.
-
service
protected MavenDependencyResolverService service
The maven service.
-
-
Constructor Detail
-
MavenWorkspaceReader
public MavenWorkspaceReader(org.apache.maven.model.Model model, MavenDependencyResolverService service)Create a maven workspace reader.
-
-
Method Detail
-
getRepository
public org.sonatype.aether.repository.WorkspaceRepository getRepository()
Gets a description of the workspace repository.- Specified by:
getRepositoryin interfaceorg.sonatype.aether.repository.WorkspaceReader- Returns:
- The repository description, never
null.
-
findArtifact
public java.io.File findArtifact(org.sonatype.aether.artifact.Artifact artifact)
Locates the specified artifact.- Specified by:
findArtifactin interfaceorg.sonatype.aether.repository.WorkspaceReader- Parameters:
artifact- The artifact to locate, must not benull.- Returns:
- The path to the artifact or
nullif the artifact is not available.
-
findModuleInParent
protected java.io.File findModuleInParent(org.sonatype.aether.artifact.Artifact artifact, org.apache.maven.model.Model parent)Find the artifact as a module in a parent.
-
findVersions
public java.util.List<java.lang.String> findVersions(org.sonatype.aether.artifact.Artifact artifact)
Determines all available versions of the specified artifact.- Specified by:
findVersionsin interfaceorg.sonatype.aether.repository.WorkspaceReader- Parameters:
artifact- The artifact whose versions should be listed, must not benull.- Returns:
- The available versions of the artifact, must not be
null.
-
-