protoj.lang
Class ClassesArchive.ClassesEntry

java.lang.Object
  extended by protoj.lang.ClassesArchive.ClassesEntry
Enclosing class:
ClassesArchive

public static final class ClassesArchive.ClassesEntry
extends java.lang.Object

Adds classes specific information to a wrapped ArchiveEntry instance.

Author:
Ashley Williams

Constructor Summary
ClassesArchive.ClassesEntry(ArchiveFeature parent, java.lang.String name, java.lang.String fileName, java.lang.String manifest, java.lang.String includes, java.lang.String excludes, ArgRunnable<ClassesArchive> config)
          See the ArchiveEntry accessors.
 
Method Summary
 ArchiveEntry<ClassesArchive> getArchiveEntry()
          The wrapped helper.
 java.lang.String getGpgOptions()
          The options to gpg responsible for creating the ascii armored detached signature file.
 java.lang.String getPomResource()
          The maven pom resource on the classpath used to publish the artifact in this entry.
 void initPublish(java.lang.String pomResource, java.lang.String gpgOptions)
          Specifies the information used in publishing the artifact.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassesArchive.ClassesEntry

public ClassesArchive.ClassesEntry(ArchiveFeature parent,
                                   java.lang.String name,
                                   java.lang.String fileName,
                                   java.lang.String manifest,
                                   java.lang.String includes,
                                   java.lang.String excludes,
                                   ArgRunnable<ClassesArchive> config)
See the ArchiveEntry accessors.

Parameters:
parent -
name - TODO
fileName -
manifest -
includes -
excludes -
config -
Method Detail

initPublish

public void initPublish(java.lang.String pomResource,
                        java.lang.String gpgOptions)
Specifies the information used in publishing the artifact. Javadoc and source archives of the same name will automatically get attached and published so there is no equivalent method on those.

The pomResource is used to specify the location on the classpath of the maven pom file describing the artifact to be published, for example "/proj/pom-pub.xml". ${var} variables can be specified in this resource file since it gets streamed into a temp file. Then those variables get replaced with entries that were specified by ResourceFeature.initReplacements(org.apache.commons.configuration.Configuration).

If the gpg executable is available to the operating system then options can be specified to produce the ascii armored detached signature file to also be published. Simply specify a string that will be passed to String.format() whose first parameter is the name of the file to be signed and the second parameter is the name of the signature file to be created. Here is an example:

 "--armor --output %2$s --detach-sign %1$s"
 
The publish feature will correctly pass in the two arguments for each archive. Hint: to supply additional options such as --local-user, read in a system property when composing the string.

Parameters:
pomResource - the name of the classpath pom resource used to publish the artifact.
gpgOptions - the options to the gpg executable that will generate the ascii armored detached signature file, or null if signing isn't required.

getPomResource

public java.lang.String getPomResource()
The maven pom resource on the classpath used to publish the artifact in this entry. See initPublish(String, String) for more information.

Returns:

getGpgOptions

public java.lang.String getGpgOptions()
The options to gpg responsible for creating the ascii armored detached signature file. See initPublish(String, String) for more information.

Returns:

getArchiveEntry

public ArchiveEntry<ClassesArchive> getArchiveEntry()
The wrapped helper.

Returns: