Class ModuleInfoGenerator
- java.lang.Object
-
- org.moditect.mavenplugin.generate.ModuleInfoGenerator
-
public class ModuleInfoGenerator extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ArtifactResolutionHelperartifactResolutionHelperprivate java.util.List<java.lang.String>jdepsExtraArgsprivate org.apache.maven.plugin.logging.Loglogprivate java.io.FileoutputDirectoryprivate org.apache.maven.project.MavenProjectprojectprivate java.util.List<org.eclipse.aether.repository.RemoteRepository>remoteReposprivate org.eclipse.aether.RepositorySystemSessionrepoSessionprivate org.eclipse.aether.RepositorySystemrepoSystemprivate java.io.FileworkingDirectory
-
Constructor Summary
Constructors Constructor Description ModuleInfoGenerator(org.apache.maven.project.MavenProject project, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, java.util.List<org.eclipse.aether.repository.RemoteRepository> remoteRepos, ArtifactResolutionHelper artifactResolutionHelper, java.util.List<java.lang.String> jdepsExtraArgs, org.apache.maven.plugin.logging.Log log, java.io.File workingDirectory, java.io.File outputDirectory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleanareEqualClassifiers(java.lang.String classifier1, java.lang.String classifier2)GeneratedModuleInfogenerateModuleInfo(java.nio.file.Path inputJar, java.util.List<ArtifactConfiguration> additionalDependencies, ModuleInfoConfiguration moduleInfo, java.util.Map<ArtifactIdentifier,java.lang.String> assignedNamesByModule)GeneratedModuleInfogenerateModuleInfo(java.nio.file.Path inputJar, java.util.Set<DependencyDescriptor> dependencies, ModuleInfoConfiguration moduleInfo)GeneratedModuleInfogenerateModuleInfo(ArtifactConfiguration artifact, java.util.List<ArtifactConfiguration> additionalDependencies, ModuleInfoConfiguration moduleInfo, java.util.Map<ArtifactIdentifier,java.lang.String> assignedNamesByModule, java.util.Map<ArtifactIdentifier,java.nio.file.Path> modularizedJars)private java.lang.StringgetAssignedModuleName(java.util.Map<ArtifactIdentifier,java.lang.String> assignedNamesByModule, ArtifactIdentifier artifactIdentifier)private java.util.Set<DependencyDescriptor>getDependencies(org.eclipse.aether.artifact.Artifact inputArtifact, java.util.Map<ArtifactIdentifier,java.lang.String> assignedNamesByModule, java.util.Map<ArtifactIdentifier,java.nio.file.Path> modularizedJars)private java.nio.file.PathgetModularizedJar(java.util.Map<ArtifactIdentifier,java.nio.file.Path> modularizedJars, ArtifactIdentifier artifactIdentifier)private java.lang.StringgetVersionFromProject(org.eclipse.aether.artifact.Artifact artifact)
-
-
-
Field Detail
-
project
private final org.apache.maven.project.MavenProject project
-
repoSystem
private final org.eclipse.aether.RepositorySystem repoSystem
-
repoSession
private final org.eclipse.aether.RepositorySystemSession repoSession
-
remoteRepos
private final java.util.List<org.eclipse.aether.repository.RemoteRepository> remoteRepos
-
artifactResolutionHelper
private final ArtifactResolutionHelper artifactResolutionHelper
-
jdepsExtraArgs
private final java.util.List<java.lang.String> jdepsExtraArgs
-
log
private final org.apache.maven.plugin.logging.Log log
-
workingDirectory
private final java.io.File workingDirectory
-
outputDirectory
private final java.io.File outputDirectory
-
-
Constructor Detail
-
ModuleInfoGenerator
public ModuleInfoGenerator(org.apache.maven.project.MavenProject project, org.eclipse.aether.RepositorySystem repoSystem, org.eclipse.aether.RepositorySystemSession repoSession, java.util.List<org.eclipse.aether.repository.RemoteRepository> remoteRepos, ArtifactResolutionHelper artifactResolutionHelper, java.util.List<java.lang.String> jdepsExtraArgs, org.apache.maven.plugin.logging.Log log, java.io.File workingDirectory, java.io.File outputDirectory)
-
-
Method Detail
-
generateModuleInfo
public GeneratedModuleInfo generateModuleInfo(ArtifactConfiguration artifact, java.util.List<ArtifactConfiguration> additionalDependencies, ModuleInfoConfiguration moduleInfo, java.util.Map<ArtifactIdentifier,java.lang.String> assignedNamesByModule, java.util.Map<ArtifactIdentifier,java.nio.file.Path> modularizedJars) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
generateModuleInfo
public GeneratedModuleInfo generateModuleInfo(java.nio.file.Path inputJar, java.util.List<ArtifactConfiguration> additionalDependencies, ModuleInfoConfiguration moduleInfo, java.util.Map<ArtifactIdentifier,java.lang.String> assignedNamesByModule) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
generateModuleInfo
public GeneratedModuleInfo generateModuleInfo(java.nio.file.Path inputJar, java.util.Set<DependencyDescriptor> dependencies, ModuleInfoConfiguration moduleInfo) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getDependencies
private java.util.Set<DependencyDescriptor> getDependencies(org.eclipse.aether.artifact.Artifact inputArtifact, java.util.Map<ArtifactIdentifier,java.lang.String> assignedNamesByModule, java.util.Map<ArtifactIdentifier,java.nio.file.Path> modularizedJars) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getAssignedModuleName
private java.lang.String getAssignedModuleName(java.util.Map<ArtifactIdentifier,java.lang.String> assignedNamesByModule, ArtifactIdentifier artifactIdentifier)
-
getModularizedJar
private java.nio.file.Path getModularizedJar(java.util.Map<ArtifactIdentifier,java.nio.file.Path> modularizedJars, ArtifactIdentifier artifactIdentifier)
-
getVersionFromProject
private java.lang.String getVersionFromProject(org.eclipse.aether.artifact.Artifact artifact) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
areEqualClassifiers
private boolean areEqualClassifiers(java.lang.String classifier1, java.lang.String classifier2)
-
-