Class GenerateJDepsHandler
java.lang.Object
net.agilhard.maven.plugins.jpacktool.base.handler.AbstractDependencyHandler
net.agilhard.maven.plugins.jpacktool.base.handler.AbstractEndVisitDependencyHandler
net.agilhard.maven.plugins.jpacktool.base.handler.GenerateJDepsHandler
public class GenerateJDepsHandler extends AbstractEndVisitDependencyHandler
-
Nested Class Summary
Nested classes/interfaces inherited from class net.agilhard.maven.plugins.jpacktool.base.handler.AbstractEndVisitDependencyHandler
AbstractEndVisitDependencyHandler.HandleDependencyRootEndVisitor -
Field Summary
Fields Modifier and Type Field Description protected java.util.List<java.lang.String>linkedSystemModulesprotected java.util.List<java.lang.String>systemModulesFields inherited from class net.agilhard.maven.plugins.jpacktool.base.handler.AbstractDependencyHandler
classpathArtifacts, dependencyGraphBuilder, excludedArtifacts, handledNodes, outputDirectoryAutomaticJars, outputDirectoryClasspathJars, outputDirectoryJPacktool, outputDirectoryModules -
Constructor Summary
Constructors Constructor Description GenerateJDepsHandler(AbstractToolMojo mojo, org.apache.maven.shared.dependency.graph.DependencyGraphBuilder dependencyGraphBuilder, java.lang.String jdepsExecutable, boolean generateAutomaticJdeps, boolean generateClassPathJdeps, boolean generateModuleJdeps, java.util.List<java.io.File> classPathElements, java.util.List<java.lang.String> jarsOnClassPath, boolean ignoreMissingDeps, boolean useListDeps) -
Method Summary
Modifier and Type Method Description protected org.codehaus.plexus.util.cli.CommandlinecreateJDepsCommandLine(java.io.File sourceFile)voidexecute()protected voidexecuteCommand(org.codehaus.plexus.util.cli.Commandline cmd, java.io.OutputStream outputStream)protected voidgenerateJdeps(java.lang.String nodeString, java.io.File sourceFile, boolean automaticDep)java.util.List<java.lang.String>getAllModules()java.util.Map<java.lang.String,java.util.List<java.lang.String>>getAllModulesMap()java.util.List<java.lang.String>getAutomaticModules()java.util.Map<java.lang.String,java.util.List<java.lang.String>>getAutomaticModulesMap()java.util.List<java.io.File>getClassPathElements()java.util.List<java.lang.String>getErrors()java.util.List<java.lang.String>getJarsOnClassPath()java.util.List<java.lang.String>getLinkedModules()java.util.Map<java.lang.String,java.util.List<java.lang.String>>getLinkedModulesMap()java.util.List<java.lang.String>getLinkedSystemModules()java.util.Map<java.lang.String,java.util.List<java.lang.String>>getLinkedSystemModulesMap()java.util.List<java.lang.String>getNodeStrings()protected java.lang.StringgetPathSeparatedList(java.util.Collection<java.io.File> elements)Convert a list of elements into a colon separted string.java.util.List<java.lang.String>getSystemModules()java.util.List<java.lang.String>getWarnings()protected voidhandleModJar(org.apache.maven.shared.dependency.graph.DependencyNode dependencyNode, org.apache.maven.artifact.Artifact artifact, java.util.Map.Entry<java.io.File,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> entry)protected voidhandleNonModJar(org.apache.maven.shared.dependency.graph.DependencyNode dependencyNode, org.apache.maven.artifact.Artifact artifact, java.util.Map.Entry<java.io.File,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> entry)protected voidhandleUpdate4JConfig(org.apache.maven.shared.dependency.graph.DependencyNode dependencyNode)Methods inherited from class net.agilhard.maven.plugins.jpacktool.base.handler.AbstractEndVisitDependencyHandler
handleDependencyRootMethods inherited from class net.agilhard.maven.plugins.jpacktool.base.handler.AbstractDependencyHandler
execute, getLog, handleDependencyNode, handleModJarIfNotAlreadyHandled, handleNonModJarIfNotAlreadyHandled, handleOther
-
Field Details
-
systemModules
protected java.util.List<java.lang.String> systemModules -
linkedSystemModules
protected java.util.List<java.lang.String> linkedSystemModules
-
-
Constructor Details
-
GenerateJDepsHandler
public GenerateJDepsHandler(AbstractToolMojo mojo, org.apache.maven.shared.dependency.graph.DependencyGraphBuilder dependencyGraphBuilder, java.lang.String jdepsExecutable, boolean generateAutomaticJdeps, boolean generateClassPathJdeps, boolean generateModuleJdeps, java.util.List<java.io.File> classPathElements, java.util.List<java.lang.String> jarsOnClassPath, boolean ignoreMissingDeps, boolean useListDeps) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Overrides:
executein classAbstractDependencyHandler- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getPathSeparatedList
protected java.lang.String getPathSeparatedList(java.util.Collection<java.io.File> elements) throws org.apache.maven.plugin.MojoFailureExceptionConvert a list of elements into a colon separted string.- Parameters:
elements- The list of elements- Returns:
- The string with the element list which is separated by
:. - Throws:
org.apache.maven.plugin.MojoFailureException- if i/o error occured during execution
-
createJDepsCommandLine
protected org.codehaus.plexus.util.cli.Commandline createJDepsCommandLine(java.io.File sourceFile) throws org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoFailureException
-
generateJdeps
protected void generateJdeps(java.lang.String nodeString, java.io.File sourceFile, boolean automaticDep) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
handleNonModJar
protected void handleNonModJar(org.apache.maven.shared.dependency.graph.DependencyNode dependencyNode, org.apache.maven.artifact.Artifact artifact, java.util.Map.Entry<java.io.File,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> entry) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
handleNonModJarin classAbstractEndVisitDependencyHandler- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
handleModJar
protected void handleModJar(org.apache.maven.shared.dependency.graph.DependencyNode dependencyNode, org.apache.maven.artifact.Artifact artifact, java.util.Map.Entry<java.io.File,org.codehaus.plexus.languages.java.jpms.JavaModuleDescriptor> entry) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
handleModJarin classAbstractEndVisitDependencyHandler- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
handleUpdate4JConfig
protected void handleUpdate4JConfig(org.apache.maven.shared.dependency.graph.DependencyNode dependencyNode) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
executeCommand
protected void executeCommand(org.codehaus.plexus.util.cli.Commandline cmd, java.io.OutputStream outputStream) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getClassPathElements
public java.util.List<java.io.File> getClassPathElements() -
getSystemModules
public java.util.List<java.lang.String> getSystemModules() -
getLinkedSystemModules
public java.util.List<java.lang.String> getLinkedSystemModules() -
getAllModules
public java.util.List<java.lang.String> getAllModules() -
getLinkedModules
public java.util.List<java.lang.String> getLinkedModules() -
getAutomaticModules
public java.util.List<java.lang.String> getAutomaticModules() -
getNodeStrings
public java.util.List<java.lang.String> getNodeStrings() -
getAllModulesMap
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAllModulesMap() -
getLinkedModulesMap
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getLinkedModulesMap() -
getAutomaticModulesMap
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getAutomaticModulesMap() -
getLinkedSystemModulesMap
public java.util.Map<java.lang.String,java.util.List<java.lang.String>> getLinkedSystemModulesMap() -
getJarsOnClassPath
public java.util.List<java.lang.String> getJarsOnClassPath() -
getWarnings
public java.util.List<java.lang.String> getWarnings() -
getErrors
public java.util.List<java.lang.String> getErrors()
-