Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
*/
// TODO Is this general enough to be in Plexus Archiver?
public class ManifestConfiguration {

/**
* The simple layout.
*/
Expand All @@ -34,7 +35,7 @@ public class ManifestConfiguration {
public static final String CLASSPATH_LAYOUT_TYPE_REPOSITORY = "repository";

/**
* custom layout type.
* Custom layout type.
*/
public static final String CLASSPATH_LAYOUT_TYPE_CUSTOM = "custom";

Expand Down Expand Up @@ -97,7 +98,7 @@ public String getMainClass() {
/**
* <p>Getter for the field <code>packageName</code>.</p>
*
* @return the package name.
* @return the package name
*/
public String getPackageName() {
return packageName;
Expand All @@ -106,7 +107,7 @@ public String getPackageName() {
/**
* <p>isAddClasspath.</p>
*
* @return if addClasspath true or false.
* @return if addClasspath true or false
*/
public boolean isAddClasspath() {
return addClasspath;
Expand Down Expand Up @@ -160,7 +161,7 @@ public boolean isAddExtensions() {
/**
* <p>Setter for the field <code>addClasspath</code>.</p>
*
* @param addClasspath turn on addClasspath or off.
* @param addClasspath turn on addClasspath or off
*/
public void setAddClasspath(boolean addClasspath) {
this.addClasspath = addClasspath;
Expand All @@ -169,7 +170,7 @@ public void setAddClasspath(boolean addClasspath) {
/**
* <p>Setter for the field <code>addDefaultEntries</code>.</p>
*
* @param addDefaultEntries add default entries true/false.
* @param addDefaultEntries add default entries true/false
*/
public void setAddDefaultEntries(boolean addDefaultEntries) {
this.addDefaultEntries = addDefaultEntries;
Expand All @@ -178,7 +179,7 @@ public void setAddDefaultEntries(boolean addDefaultEntries) {
/**
* <p>Setter for the field <code>addBuildEnvironmentEntries</code>.</p>
*
* @param addBuildEnvironmentEntries add build environment information true/false.
* @param addBuildEnvironmentEntries add build environment information true/false
*/
public void setAddBuildEnvironmentEntries(boolean addBuildEnvironmentEntries) {
this.addBuildEnvironmentEntries = addBuildEnvironmentEntries;
Expand All @@ -187,7 +188,7 @@ public void setAddBuildEnvironmentEntries(boolean addBuildEnvironmentEntries) {
/**
* <p>Setter for the field <code>addDefaultImplementationEntries</code>.</p>
*
* @param addDefaultImplementationEntries true to add default implementations false otherwise.
* @param addDefaultImplementationEntries true to add default implementations false otherwise
*/
public void setAddDefaultImplementationEntries(boolean addDefaultImplementationEntries) {
this.addDefaultImplementationEntries = addDefaultImplementationEntries;
Expand All @@ -196,7 +197,7 @@ public void setAddDefaultImplementationEntries(boolean addDefaultImplementationE
/**
* <p>Setter for the field <code>addDefaultSpecificationEntries</code>.</p>
*
* @param addDefaultSpecificationEntries add default specifications true/false.
* @param addDefaultSpecificationEntries add default specifications true/false
*/
public void setAddDefaultSpecificationEntries(boolean addDefaultSpecificationEntries) {
this.addDefaultSpecificationEntries = addDefaultSpecificationEntries;
Expand All @@ -205,7 +206,7 @@ public void setAddDefaultSpecificationEntries(boolean addDefaultSpecificationEnt
/**
* <p>Setter for the field <code>addExtensions</code>.</p>
*
* @param addExtensions true to add extensions false otherwise.
* @param addExtensions true to add extensions false otherwise
*/
public void setAddExtensions(boolean addExtensions) {
this.addExtensions = addExtensions;
Expand All @@ -214,7 +215,7 @@ public void setAddExtensions(boolean addExtensions) {
/**
* <p>Setter for the field <code>classpathPrefix</code>.</p>
*
* @param classpathPrefix The prefix.
* @param classpathPrefix the prefix
*/
public void setClasspathPrefix(String classpathPrefix) {
this.classpathPrefix = classpathPrefix;
Expand All @@ -223,7 +224,7 @@ public void setClasspathPrefix(String classpathPrefix) {
/**
* <p>Setter for the field <code>mainClass</code>.</p>
*
* @param mainClass The main class.
* @param mainClass the main class
*/
public void setMainClass(String mainClass) {
this.mainClass = mainClass;
Expand All @@ -232,7 +233,7 @@ public void setMainClass(String mainClass) {
/**
* <p>Setter for the field <code>packageName</code>.</p>
*
* @param packageName The package name.
* @param packageName the package name
*/
public void setPackageName(String packageName) {
this.packageName = packageName;
Expand All @@ -241,15 +242,13 @@ public void setPackageName(String packageName) {
/**
* <p>Getter for the field <code>classpathPrefix</code>.</p>
*
* @return The classpath prefix.
* @return the classpath prefix
*/
public String getClasspathPrefix() {
String cpp = classpathPrefix.replaceAll("\\\\", "/");

if (cpp.length() != 0 && !cpp.endsWith("/")) {
cpp += "/";
}

return cpp;
}

Expand All @@ -261,7 +260,7 @@ public String getClasspathPrefix() {
* <b>NOTE:</b> If you specify a type of 'custom' you MUST set
* {@link ManifestConfiguration#setCustomClasspathLayout(String)}.
*
* @return The classpath layout type.
* @return the classpath layout type
*/
public String getClasspathLayoutType() {
return classpathLayoutType;
Expand All @@ -275,7 +274,7 @@ public String getClasspathLayoutType() {
* <b>NOTE:</b> If you specify a type of 'custom' you MUST set
* {@link ManifestConfiguration#setCustomClasspathLayout(String)}.
*
* @param classpathLayoutType The classpath layout type.
* @param classpathLayoutType the classpath layout type
*/
public void setClasspathLayoutType(String classpathLayoutType) {
this.classpathLayoutType = classpathLayoutType;
Expand All @@ -293,7 +292,7 @@ public void setClasspathLayoutType(String classpathLayoutType) {
* <br>
* <b>NOTE:</b> If you specify a layout type of 'custom' you MUST set this layout expression.
*
* @return The custom classpath layout.
* @return the custom classpath layout
*/
public String getCustomClasspathLayout() {
return customClasspathLayout;
Expand All @@ -319,7 +318,7 @@ public String getCustomClasspathLayout() {
* </ol>
* how such an expression looks like.
*
* @param customClasspathLayout The custom classpath layout.
* @param customClasspathLayout the custom classpath layout
*/
public void setCustomClasspathLayout(String customClasspathLayout) {
this.customClasspathLayout = customClasspathLayout;
Expand All @@ -332,7 +331,7 @@ public void setCustomClasspathLayout(String customClasspathLayout) {
* <b>NOTE:</b> If the snapshot was installed locally, this flag will not have an effect on
* that artifact's inclusion, since it will have the same version either way (i.e. -SNAPSHOT naming).
*
* @return The state of {@link #useUniqueVersions}
* @return the state of {@link #useUniqueVersions}
*/
public boolean isUseUniqueVersions() {
return useUniqueVersions;
Expand All @@ -345,7 +344,7 @@ public boolean isUseUniqueVersions() {
* <b>NOTE:</b> If the snapshot was installed locally, this flag will not have an effect on that artifact's
* inclusion, since it will have the same version either way (i.e. -SNAPSHOT naming).
*
* @param useUniqueVersions true to use unique versions or not.
* @param useUniqueVersions true to use unique versions or not
*/
public void setUseUniqueVersions(boolean useUniqueVersions) {
this.useUniqueVersions = useUniqueVersions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public class ManifestSection {
/**
* <p>addManifestEntry.</p>
*
* @param key The key of the manifest entry.
* @param value The appropriate value.
* @param key the key of the manifest entry
* @param value the appropriate value
*/
public void addManifestEntry(String key, String value) {
manifestEntries.put(key, value);
Expand All @@ -43,7 +43,7 @@ public void addManifestEntry(String key, String value) {
/**
* <p>Getter for the field <code>manifestEntries</code>.</p>
*
* @return The entries.
* @return the entries
*/
public Map<String, String> getManifestEntries() {
return manifestEntries;
Expand All @@ -52,7 +52,7 @@ public Map<String, String> getManifestEntries() {
/**
* <p>Getter for the field <code>name</code>.</p>
*
* @return The name.
* @return the name
*/
public String getName() {
return name;
Expand All @@ -61,7 +61,7 @@ public String getName() {
/**
* <p>Setter for the field <code>name</code>.</p>
*
* @param name the name.
* @param name the name
*/
public void setName(String name) {
this.name = name;
Expand All @@ -70,7 +70,7 @@ public void setName(String name) {
/**
* <p>addManifestEntries.</p>
*
* @param map The map to add.
* @param map the map to add
*/
public void addManifestEntries(Map<String, String> map) {
manifestEntries.putAll(map);
Expand All @@ -79,7 +79,7 @@ public void addManifestEntries(Map<String, String> map) {
/**
* <p>isManifestEntriesEmpty.</p>
*
* @return true if empty false otherwise.
* @return true if empty false otherwise
*/
public boolean isManifestEntriesEmpty() {
return manifestEntries.isEmpty();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
*/
// TODO Is this general enough to be in Plexus Archiver?
public class MavenArchiveConfiguration {

private boolean compress = true;

private boolean recompressAddedZips = true;
Expand Down Expand Up @@ -117,7 +118,7 @@ public ManifestConfiguration getManifest() {
/**
* <p>Setter for the field <code>compress</code>.</p>
*
* @param compress set compress to true/false.
* @param compress set compress to true/false
*/
public void setCompress(boolean compress) {
this.compress = compress;
Expand All @@ -126,7 +127,7 @@ public void setCompress(boolean compress) {
/**
* <p>Setter for the field <code>addMavenDescriptor</code>.</p>
*
* @param addMavenDescriptor activate to add maven descriptor or not.
* @param addMavenDescriptor activate to add maven descriptor or not
*/
public void setAddMavenDescriptor(boolean addMavenDescriptor) {
this.addMavenDescriptor = addMavenDescriptor;
Expand All @@ -135,7 +136,7 @@ public void setAddMavenDescriptor(boolean addMavenDescriptor) {
/**
* <p>Setter for the field <code>manifestFile</code>.</p>
*
* @param manifestFile The manifest file.
* @param manifestFile the manifest file
*/
public void setManifestFile(Path manifestFile) {
this.manifestFile = manifestFile;
Expand All @@ -153,8 +154,8 @@ public void setManifest(ManifestConfiguration manifest) {
/**
* <p>addManifestEntry.</p>
*
* @param key The key of the entry.
* @param value The value of the entry.
* @param key the key of the entry
* @param value the value of the entry
*/
public void addManifestEntry(String key, String value) {
manifestEntries.put(key, value);
Expand All @@ -163,7 +164,7 @@ public void addManifestEntry(String key, String value) {
/**
* <p>addManifestEntries.</p>
*
* @param map The whole map which should be added.
* @param map the whole map which should be added
*/
public void addManifestEntries(Map<String, String> map) {
manifestEntries.putAll(map);
Expand All @@ -172,7 +173,7 @@ public void addManifestEntries(Map<String, String> map) {
/**
* <p>isManifestEntriesEmpty.</p>
*
* @return are there entries true yes false otherwise.
* @return are there entries true yes false otherwise
*/
public boolean isManifestEntriesEmpty() {
return manifestEntries.isEmpty();
Expand Down Expand Up @@ -208,7 +209,7 @@ public void addManifestSection(ManifestSection section) {
/**
* <p>addManifestSections.</p>
*
* @param list Added list of {@link ManifestSection}.
* @param list added list of {@link ManifestSection}
*/
public void addManifestSections(List<ManifestSection> list) {
manifestSections.addAll(list);
Expand All @@ -217,7 +218,7 @@ public void addManifestSections(List<ManifestSection> list) {
/**
* <p>isManifestSectionsEmpty.</p>
*
* @return if manifestSections is empty or not.
* @return if manifestSections is empty or not
*/
public boolean isManifestSectionsEmpty() {
return manifestSections.isEmpty();
Expand All @@ -235,7 +236,7 @@ public List<ManifestSection> getManifestSections() {
/**
* <p>Setter for the field <code>manifestSections</code>.</p>
*
* @param manifestSections set The list of {@link ManifestSection}.
* @param manifestSections set The list of {@link ManifestSection}
*/
public void setManifestSections(List<ManifestSection> manifestSections) {
this.manifestSections = manifestSections;
Expand All @@ -255,7 +256,7 @@ public void setManifestSections(List<ManifestSection> manifestSections) {
* ignored.
* </p>
*
* @return True, if the target archive should always be created; false otherwise
* @return true, if the target archive should always be created; false otherwise
* @see #setForced(boolean)
*/
public boolean isForced() {
Expand All @@ -276,7 +277,7 @@ public boolean isForced() {
* ignored.
* </p>
*
* @param forced True, if the target archive should always be created; false otherwise
* @param forced true, if the target archive should always be created; false otherwise
* @see #isForced()
*/
public void setForced(boolean forced) {
Expand Down
Loading