class JavaPlugin extends org.savantbuild.plugin.groovy.BaseGroovyPlugin
The Java plugin. The public methods on this class define the features of the plugin.
| Modifiers | Name | Description |
|---|---|---|
static java.lang.String |
ERROR_MESSAGE |
| Fields inherited from class | Fields |
|---|---|
class org.savantbuild.plugin.groovy.BaseGroovyPlugin |
output, project, runtimeConfiguration |
| Type | Name and description |
|---|---|
org.savantbuild.plugin.dep.DependencyPlugin |
dependencyPlugin |
org.savantbuild.plugin.file.FilePlugin |
filePlugin |
java.nio.file.Path |
javaDocPath |
java.nio.file.Path |
javacPath |
JavaLayout |
layout |
java.util.Properties |
properties |
JavaSettings |
settings |
| Constructor and description |
|---|
JavaPlugin(org.savantbuild.domain.Project project, org.savantbuild.runtime.RuntimeConfiguration runtimeConfiguration, org.savantbuild.output.Output output) |
| Type Params | Return Type | Name and description |
|---|---|---|
|
void |
clean()Cleans the build directory by completely deleting it. |
|
void |
compile()Compiles the main and test Java files (src/main/java and src/test/java). |
|
void |
compileMain()Compiles the main Java files (src/main/java by default). |
|
void |
compileTest()Compiles the test Javafiles (src/test/java by default). |
|
void |
document()Creates the project's JavaDoc. |
|
java.lang.String |
getJavaHome() |
|
java.lang.String |
getMainClasspath()Returns the main classpath for the project |
|
void |
jar()Creates the project's Jar files. |
|
void |
jarjar(java.util.Map<java.lang.String, java.lang.Object> attributes, groovy.lang.Closure closure) |
|
void |
printJDKModuleDeps() |
| Methods inherited from class | Name |
|---|---|
class org.savantbuild.plugin.groovy.BaseGroovyPlugin |
org.savantbuild.plugin.groovy.BaseGroovyPlugin#getMetaClass(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#setMetaClass(groovy.lang.MetaClass), org.savantbuild.plugin.groovy.BaseGroovyPlugin#wait(long, int), org.savantbuild.plugin.groovy.BaseGroovyPlugin#wait(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#wait(long), org.savantbuild.plugin.groovy.BaseGroovyPlugin#equals(java.lang.Object), org.savantbuild.plugin.groovy.BaseGroovyPlugin#toString(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#hashCode(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#getClass(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#notify(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#notifyAll(), org.savantbuild.plugin.groovy.BaseGroovyPlugin#getProperty(java.lang.String), org.savantbuild.plugin.groovy.BaseGroovyPlugin#setProperty(java.lang.String, java.lang.Object), org.savantbuild.plugin.groovy.BaseGroovyPlugin#invokeMethod(java.lang.String, java.lang.Object) |
Cleans the build directory by completely deleting it.
Here is an example of calling this method:
java.clean()
Compiles the main and test Java files (src/main/java and src/test/java).
Here is an example of calling this method:
java.compile()
Compiles the main Java files (src/main/java by default).
Here is an example of calling this method:
java.compileMain()
Compiles the test Javafiles (src/test/java by default).
Here is an example of calling this method:
java.compileTest()
Creates the project's JavaDoc. This executes the javadoc command and outputs the docs to the layout.docDirectory
Here is an example of calling this method:
java.document()
Returns the main classpath for the project
Here is an example of calling this method:
java.getMainClasspath()
Creates the project's Jar files. This creates four Jar files. The main Jar, main source Jar, test Jar and test source Jar.
Here is an example of calling this method:
java.jar()