Jar Plugin (quokka.plugin.jar:0.3, namespace=jar)

The Jar Plugin packages up classes and/or resources into a .jar file.

Minor Targets

jar Creates a .jar file from the compilation output

Template Targets

jar-template Template for creating a .jar file. Implements quokka.plugin.lifecycle:package

If you are creating a single .jar artifact in your project then no configuration is required. However, if you are creating multiple .jar artifacts you must create a separated target from the jar-template for each artifact.


jar

Creates a .jar file from the compilation output

  • prefix: q.jar.jar
  • template-name: jar-template

Default Properties

source.set.dir ${q.lifecycle.compileOutput}

jar-template

Template for creating a .jar file

  • template: true
  • enabled-by-default: false
  • Implements: quokka.plugin.lifecycle:package

If your project contains a single artifact of any of the following types (jar, archetype, plugin, or depset), then you don't need to set any properties. However, if you there are multiple matching artifacts, you need to set the artifact property.

Properties:

  • aritfact Mandatory if multiple artifacts. Value is the name and optionally the type in name:type format.
  • additionalTypes Optional. If you wish to build a .jar file and your artifact is not one of the built-in types, you can add it here. The value is a comma separated list of type ids.
  • source Mandatory. The source files to jar. Value: A quokka file set.
  • compress Optional. Not only store data but also compress them, defaults to true. Unless you set the keepCompression attribute to false, this will apply to the entire archive, not only the files you've added while updating.
  • keepCompression Optional. For entries coming from existing archives (like nested zipfilesets or while updating the archive), keep the compression as it has been originally instead of using the compress attribute. Defaults false. Since Ant 1.6
  • encoding Optional. The character encoding to use for filenames inside the archive. Defaults to UTF8. It is not recommended to change this value as the created archive will most likely be unreadable for Java otherwise.
  • filesOnly Optional. Store only file entries, defaults to false
  • defaultExcludes Optional. indicates whether default excludes should be used or not ("yes"/"no"). Default excludes are used when omitted.
  • manifest Optional. the manifest file to use. This can be either the location of a manifest, or the name of a jar added through a fileset. If its the name of an added jar, the task expects the manifest to be in the jar at META-INF/MANIFEST.MF
  • filesetManifest Optional. behavior when a Manifest is found in a zipfileset or zipgroupfileset file is found. Valid values are "skip", "merge", and "mergewithoutmain". "merge" will merge all of the manifests together, and merge this into any other specified manifests. "mergewithoutmain" merges everything but the Main section of the manifests. Default value is "skip".
  • update Optional. indicates whether to update or overwrite the destination file if it already exists. Default is "false".
  • whenManifestOnly Optional. behavior when no files match. Valid values are "fail", "skip", and "create". Default is "create".
  • duplicate Optional. behavior when a duplicate file is found. Valid values are "add", "preserve", and "fail". The default value is "add".
  • index Optional. whether to create an index list to speed up classloading. This is a JDK 1.3+ specific feature. Unless you specify additional jars with nested indexJarsindexJars elements, only the contents of this jar will be included in the index. Defaults to false.
  • manifestEncoding Optional. The encoding used to read the JAR manifest, when a manifest file is specified. Defaults to the platform encoding.
  • roundUp Optional. Whether the file modification times will be rounded up to the next even number of seconds.
    Zip archives store file modification times with a granularity of two seconds, so the times will either be rounded up or down. If you round down, the archive will always seem out-of-date when you rerun the task, so the default is to round up. Rounding up may lead to a different type of problems like JSPs inside a web archive that seem to be slightly more recent than precompiled pages, rendering precompilation useless.
    Defaults to true.
  • level Optional. Non-default level at which file compression should be performed. Valid values range from 0 (no compression/fastest) to 9 (maximum compression/slowest).
  • indexJars Optional. A path containing jars to index. Create the path in the quokka project and reference it using ${q.project.path.name}

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