Source Plugin (quokka.plugin.source:0.1, namespace=source)
The source plugin will bundle your project source into a .jar file that can be installed in the repository
Minor Targets
| init | Automatically adds 'source' artifacts to the project. Implements quokka.plugin.lifecycle:initialise |
| package | Packages source code into a .jar file |
Template Targets
| package-template | Template for packaging source code into a .jar file. Implements quokka.plugin.lifecycle:package |
If your project has a single java artifact, then no configuration is required. Just include the plugin as follows
<plugin group="quokka.plugin.source" version="?"/>
This will automatically add a source artifact to your project during the init target and package your sources during the package goal.
If you have multiple artifacts, then you will need to specify the artifact the sources are for as follows:
<property name="q.source.init.artifactNames" value="<artifact name>"/> <plugin group="quokka.plugin.source" version="?"/>
If you want to create multiple source bundles, then you need to create a separate target from the package-template for each source bundle. The following example shows how to do this:
<artifacts group="group1" version="0.1-ss">
<artifact name="sample" type="jar"/>
<artifact name="sample2" type="jar"/>
</artifacts>
<dependency-set>
<property name="q.source.init.artifactNames" value="sample, sample2"/>
<plugin group="quokka.plugin.source" version="?">
<target name="package" prefix="q.source.package">
<property name="artifactName" value="sample"/>
<property name="source.set.includes" value="**/sample/**"/>
</target>
<target template="package-template" name="sample2-source">
<property name="artifactName" value="sample2"/>
<property name="source.set.dir" value="${q.source.package.source.set.dir}"/>
<property name="source.set.includes" value="**/sample2/**"/>
</target>
</plugin>
</dependency-set>
init
Automatically adds 'source' artifacts to the project
- prefix: q.source.init
- Implements: quokka.plugin.lifecycle:initialise
Properties:
- artifactNames Optional. Only required if the project has multiple artifacts. Can be a comma separated list of names.
package
Packages source code into a .jar file
- prefix: q.source.package
- template-name: package-template
Default Properties
| source.set.dir | ${q.project.sourceDir}/main/java |
package-template
Template for packaging source code into a .jar file
- template: true
- Implements: quokka.plugin.lifecycle:package
Properties:
- artifactName Optional. The name of the artifact that will be packaged. Only required if there are multiple source artifacts in the project.
- source Mandatory. A resource collection containing the sources to bundle. Only required if there are multiple source artifacts in the project.
- Any of the following properties may also be used: compress, keepCompression, encoding, filesOnly, defaultExcludes, manifest, filesetManifest, update, whenManifestOnly, duplicate, index, manifestEncoding, roundUp, level. See the Jar plugin for more information on these options.
Plugin Paths
runtime : Runtime class path
quokka.core.metadata metadata 0.3
quokka.core.plugin-spi plugin-spi 0.3
quokka.core.util util 0.3
quokka.plugin.lifecycle lifecycle 0.3
quokka.core.plugin-spi plugin-spi 0.3
apache.ant ant 1.7.1
quokka.core.bootstrap-util bootstrap-util 0.3
quokka.core.repo-spi repo-spi 0.3
apache.ant ant 1.7.1