public final class JkMvn
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Field and Description |
---|---|
static boolean |
INSTALLED
Returns
true if Maven is installed on the machine running this code. |
Modifier and Type | Method and Description |
---|---|
JkMvn |
cleanInstall()
Short hand for #withCommand("deleteArtifacts", "install").
|
JkMvn |
cleanPackage()
Short hand for #withCommand("deleteArtifacts", "package").
|
JkMvn |
commands(java.lang.String... args)
return a new maven command for this working directory.
|
static JkDependencySet |
fromMvnFlatFile(java.nio.file.Path flatFile)
Creates a
JkDependencySet from file describing dependencies the followiung way : |
static JkMvn |
of(java.nio.file.Path workingDir,
java.lang.String... args)
Creates a Maven command.
|
JkDependencySet |
readDependencies()
Reads the dependencies of this Maven project
|
void |
run() |
JkProcess |
toProcess()
Returns the underlying process to execute mvn
|
JkMvn |
withForceUpdate(boolean flag)
Append a "-U" force update to the list of parameters
|
JkMvn |
withVerbose(boolean flag)
Append or remove a "-X" verbose to the list of parameters
|
public static final boolean INSTALLED
true
if Maven is installed on the machine running this code.public static final JkMvn of(java.nio.file.Path workingDir, java.lang.String... args)
public final JkMvn commands(java.lang.String... args)
public final JkMvn cleanPackage()
public final JkMvn cleanInstall()
public JkDependencySet readDependencies()
public final JkMvn withForceUpdate(boolean flag)
public final JkMvn withVerbose(boolean flag)
public JkProcess toProcess()
public void run()
run
in interface java.lang.Runnable
public static JkDependencySet fromMvnFlatFile(java.nio.file.Path flatFile)
JkDependencySet
from file describing dependencies the followiung way :
org.springframework:spring-aop:jar:4.2.3.BUILD-SNAPSHOT:compile
org.yaml:snakeyaml:jar:1.16:runtime
org.slf4j:log4j-over-slf4j:jar:1.7.12:compile
org.springframework.boot:spring-boot:jar:1.3.0.BUILD-SNAPSHOT:compile
org.hamcrest:hamcrest-core:jar:1.3:test
aopalliance:aopalliance:jar:1.0:compile
org.springframework:spring-test:jar:4.2.3.BUILD-SNAPSHOT:test
org.springframework.boot:spring-boot-autoconfigure:jar:1.3.0.BUILD-SNAPSHOT:compile
ch.qos.logback:logback-core:jar:1.1.3:compile
org.hamcrest:hamcrest-library:jar:1.3:test
junit:junit:jar:4.12:test
org.slf4j:slf4j-api:jar:1.7.12:compile
The following format are accepted for each line :