BuildType build-std-java v0.2
Overview
A standard build for simple java modules, relying on standard phases, and providing compilation, execution and unit tests
Plugins
This build type loads each of the following plugins:
phases-std, clean-std, ivy-provisioning, ivy-publication, ivy-utils, resources-std, compile-java, compile-test-java, manifest, package-jar
Build Phases
This build type takes the following actions during each build phase:
| Phase | Target | Description | From Plugin |
|---|---|---|---|
| clean: delete any artifacts from previous builds | |||
| clean:clean | clean project | clean-std | |
| validate: validate the project is correct and all necessary information is available | |||
| clean:init | clean-std | ||
| lib:init | ivy-provisioning | ||
| publish:init | ivy-publication | ||
| ivy:init | ivy-utils | ||
| resources:init | resources-std | ||
| compile:init | compile-java | ||
| compile-test:abstract-compile-test-java:init | abstract-test | ||
| manifest:init | manifest | ||
| jar:init | package-jar | ||
| provision: supply provision required by this project | |||
| lib:resolve | resolve and retrieve dependencies with ivy | ivy-provisioning | |
| process-resources: copy and process the resources into the destination directory, ready for packaging | |||
| resources:copy-resources | resources-std | ||
| compile: compile the source code of the project | |||
| compile:compile | compile-java | ||
| test-process-resources: copy and process the resources into the test destination directory | |||
| resources:copy-test-resources | resources-std | ||
| test-compile: compile the test source code into the test destination directory | |||
| compile-test:compile | compile-test-java | ||
| prepare-package: perform any operations necessary to prepare a package before the actual packaging. This often results in an unpacked, processed version of the package | |||
| manifest:manifest | generate manifest file | manifest | |
| manifest:manifest-runnable | add manifest attributes required for an executable jar | manifest | |
| package: take the compiled code and package it in its distributable format, such as a JAR. | |||
| jar:jar | package project as a JAR | package-jar | |
| generate-local-version: generate a local version number | |||
| publish-local-version | ivy-publication | ||
| generate-shared-version: generate a version number for shared publication | |||
| publish-shared-version | ivy-publication | ||
| generate-release-version: generate a version number for a release | |||
| publish-release-version | ivy-publication | ||
| publish-local: publish the package into the local repository, for use as a dependency in other projects locally | |||
| publish:publish-local | ivy-publication | ||
| publish-shared: done in an integration environment, copies the final package to the remote repository for sharing with other developers and projects | |||
| publish:publish-shared | ivy-publication | ||
| release: done in an integration or release environment, copies the final package to the remote repository for sharing with other developers and projects | |||
| publish:release | ivy-publication | ||
| report: generate report | |||
| ivy:report | generate dependencies report | ivy-utils | |
Extra Targets
This type defines some extra Ant targets not attached to any build phase:
| Target | Description | From Plugin |
|---|---|---|
| lib-resolve | ivy-provisioning | |
| lib-resolve-main-confs | ivy-provisioning | |
| lib-resolve-test-confs | ivy-provisioning | |
| lib-resolve-provided-confs | ivy-provisioning | |
| publish:clean-local | cleans the local repository | ivy-publication |
| publishdoit | ivy-publication | |
| ivy:clean-cache | clean the ivy cache used to resolve project dependencies | ivy-utils |
| ivy:clean-eacache | clean the ivy cache used by easyant to resolve plugins/ buildtypes | ivy-utils |
| ivy:clean-lib | clean the project libraries directory | ivy-utils |
| ivydoit | ivy-utils | |
| resourcesdoit | resources-std | |
| compiledoit | compile-java | |
| manifest-generate-version-number | manifest | |
| manifestdoit | manifest | |
| jardoit | package-jar | |
Parameters
The following property values can be changed to tune the behavior of this buildtype.
Required parameters must be defined upon import, or the build will fail.
| Parameter | Required? | Description | Default | BuildType Value |
|---|---|---|---|---|
| compile.java.excludes.pattern | No | Pattern describing files excluded in compilation process | ||
| compile.java.includes.pattern | No | Pattern describing files included in compilation process | **/*.java | |
| compile.java.source.version | No | Specify a value of the -source command-line switch; will be ignored by all implementations prior to javac1.4 (or modern when Ant is not running in a 1.3 VM) and jikes | ${ant.java.version} | |
| compile.java.target.version | No | Specify a VM version for Generated class files (e.g., 1.1 or 1.2). | ${ant.java.version} | |
| default.build.number | No | default project version | 1 | |
| fail.publication.if.no.revision | No | fail build if current module has no revision in 'info' tag of the module.ivy | true | |
| ivy.haltonmissing | No | defines if ivy must halt when artifact is missing | true | |
| ivy.module | No | the name of the project, used to fill the Specification-Title and Implementation-Title in the manifest | ||
| ivy.organisation | No | the name of the organisation that is the owner of this module, used to fill the Specification-Vendor and Implementation-Vendor in the manifest | ||
| ivy.revision | No | the revision of the project, used to fill the Specification-Version and Implementation-Version in the manifest | ||
| javac.debug.mode | No | javac debug mode, true or false | true | |
| lib.main | Yes | directory where main libraries are picked up | ${basedir}/lib/main | |
| lib.provided | Yes | directory where provided libraries are picked up | ${basedir}/lib/provided | |
| lib.test | Yes | directory where test libraries are picked up | ${basedir}/lib/test | |
| main.confs | No | confs used for main librairies | default | |
| manifest.classpath | No | If manifest.main.classname is defined, this will be used for the Class-Path attribute. by default this will be automatically computed from the Ivy dependencies of the target artifact. | ||
| manifest.file | No | the manifest-file to create/update. | ${target}/MANIFEST.MF | ${target}/MANIFEST.MF |
| manifest.main.classname | No | If defined, Main-Class and Class-Path attributes are added to produce an executable jar file. | ||
| module.name | No | ${ivy.module} | ||
| package.jar.excludes.pattern | No | Pattern describing files excluded in the output jar | ||
| package.jar.file | No | the location of the package jar file | ${target.artifacts}/${target.artifacts.main.jar.name} | |
| package.jar.includes.pattern | No | Pattern describing files included in the output jar | **/* | |
| package.metainf.basedir | No | basedir of the metainf fileset | ${basedir} | |
| package.metainf.excludes.pattern | No | Pattern describing files excluded in the META-INF of the package | ||
| package.metainf.includes.pattern | No | Pattern describing files included in the META-INF of the package | NOTICE,LICENSE | |
| project.ivy.file | Yes | the name of the file containing dependencies of your project | ${easyant.file} | |
| project.ivy.instance | No | the ivy instance name for your project | project.ivy.instance | |
| project.ivy.settings.file | No | the ivysettings file used by your project | ||
| project.ivy.settings.url | No | the ivysettings url used by your project | ||
| provided.confs | No | confs used for provided librairies | provided | |
| release.resolver | No | the name of the resolver use for release publication | shared | |
| resources.std.excludes.pattern | No | Pattern describing files excluded in compilation process | ||
| resources.std.includes.pattern | No | Pattern describing files included in compilation process | **/* | |
| resources.std.test.excludes.pattern | No | Pattern describing files excluded in test compilation process | ||
| resources.std.test.includes.pattern | No | Pattern describing files included in test compilation process | **/* | |
| retrieve.dependencies | No | defines if dependencies should be retrieve dependencies in the lib directory | false | |
| retrieve.pattern.lib.main | No | retrieve pattern for main artifacts | ${lib.main}/[artifact]-[revision].[ext] | |
| retrieve.pattern.lib.provided | No | retrieve pattern for provided artifacts | ${lib.provided}/[artifact]-[revision].[ext] | |
| retrieve.pattern.lib.test | No | retrieve pattern for test artifacts | ${lib.test}/[artifact]-[revision].[ext] | |
| revision.separator | No | separator for version | -dev-build | |
| shared.resolver | No | the name of the share resolver | shared | |
| src.main.java | Yes | directory where sources to be compiled are | ${basedir}/src/main/java | |
| src.main.resources | Yes | directory where main resources files are stored | ${basedir}/src/main/resources | |
| src.test.java | Yes | directory with test source files | ${basedir}/src/test/java | |
| src.test.resources | Yes | directory where test resources files are stored | ${basedir}/src/test/resources | |
| sync.lib.dir | No | a boolean that define if lib dir should be synchronized or not | true | |
| target | Yes | the target directory to clean | ${basedir}/target | |
| target.artifacts | Yes | destination directory for target artifacts | ${target}/artifacts | |
| target.artifacts.main.jar.name | Yes | main artifact file name | ${module.name}.jar | |
| target.artifacts.main.source.jar.name | No | ${module.name}-source.jar | ||
| target.artifacts.test.source.jar.name | No | ${module.name}-test-source.jar | ||
| target.main.classes | Yes | destination directory where main resources should be put | ${target}/main/classes | |
| target.report | No | ${target}/report | ||
| target.report.ivy | No | the directory where ivy report will be generated | ${target.report}/deps-report | |
| target.test.classes | Yes | destination directory where test resources should be put | ${target}/test/classes | |
| target.test.html | Yes | destination directory for html test report | ${target}/test/html | |
| target.test.xml | Yes | destination directory for xml test report | ${target}/test/xml | |
| test.compile.excludes.pattern | No | Pattern describing files excluded in test compilation process | ||
| test.compile.includes.pattern | No | Pattern describing files included in test compilation process | **/*.java | |
| test.compile.java.source.version | No | Specify a value of the -source command-line switch; will be ignored by all implementations prior to javac1.4 (or modern when Ant is not running in a 1.3 VM) and jikes | ${ant.java.version} | |
| test.compile.java.target.version | No | Specify a VM version for Generated class files (e.g., 1.1 or 1.2). | ${ant.java.version} | |
| test.confs | No | confs used for test librairies | test | |
| test.framework | No | junit | ||
| test.mode | No | mode to use to execute tests: 'run' to only run tests, 'report' to generate html report | run | |
| version | No | the full version of the project | ||
| version.properties.file | No | the version.properties file to create/update. | ${target.main.classes}/META-INF/version.properties |