public class Overlay
extends java.lang.Object
An overlay is a skeleton WAR added to another WAR project in order to inject a functionality, resources or any other shared component.
Note that a particular WAR dependency can be added multiple times as an overlay with different includes/excludes filter; this allows building a fine grained overwriting policy.
The current project can also be described as an overlay and can not be specified twice. An overlay with no groupId and no artifactId represents the current project.
Modifier and Type | Field and Description |
---|---|
private org.apache.maven.artifact.Artifact |
artifact |
private java.lang.String |
artifactId |
private java.lang.String |
classifier |
static java.lang.String[] |
DEFAULT_EXCLUDES
The list of default excludes.
|
static java.lang.String[] |
DEFAULT_INCLUDES
The list of default includes.
|
private java.lang.String[] |
excludes |
private boolean |
filtered |
private java.lang.String |
groupId |
private java.lang.String |
id |
private java.lang.String[] |
includes |
private boolean |
skip |
private java.lang.String |
targetPath |
private java.lang.String |
type
default overlay type is war
|
Constructor and Description |
---|
Overlay()
Create instance.
|
Overlay(java.lang.String groupId,
java.lang.String artifactId) |
Modifier and Type | Method and Description |
---|---|
static Overlay |
createInstance() |
boolean |
equals(java.lang.Object o) |
org.apache.maven.artifact.Artifact |
getArtifact() |
java.lang.String |
getArtifactId() |
java.lang.String |
getClassifier() |
java.lang.String[] |
getExcludes() |
java.lang.String |
getGroupId() |
java.lang.String |
getId() |
java.lang.String[] |
getIncludes() |
java.lang.String |
getTargetPath() |
java.lang.String |
getType() |
int |
hashCode() |
boolean |
isCurrentProject()
Specify whether this overlay represents the current project or not.
|
boolean |
isFiltered() |
private java.lang.String[] |
parse(java.lang.String s) |
void |
setArtifact(org.apache.maven.artifact.Artifact artifact) |
void |
setArtifactId(java.lang.String artifactId) |
void |
setClassifier(java.lang.String classifier) |
void |
setExcludes(java.lang.String excludes) |
void |
setExcludes(java.lang.String[] excludes) |
void |
setFiltered(boolean filtered) |
void |
setGroupId(java.lang.String groupId) |
void |
setId(java.lang.String id) |
void |
setIncludes(java.lang.String includes) |
void |
setIncludes(java.lang.String[] includes) |
void |
setSkip(boolean skip) |
void |
setTargetPath(java.lang.String targetPath) |
void |
setType(java.lang.String type) |
boolean |
shouldSkip() |
java.lang.String |
toString() |
public static final java.lang.String[] DEFAULT_INCLUDES
public static final java.lang.String[] DEFAULT_EXCLUDES
private java.lang.String id
private java.lang.String groupId
private java.lang.String artifactId
private java.lang.String classifier
private java.lang.String[] includes
private java.lang.String[] excludes
private boolean filtered
private boolean skip
private org.apache.maven.artifact.Artifact artifact
private java.lang.String targetPath
private java.lang.String type
public Overlay()
public Overlay(java.lang.String groupId, java.lang.String artifactId)
groupId
- groupId
artifactId
- artifactId
public boolean isCurrentProject()
public java.lang.String getId()
public void setId(java.lang.String id)
id
- The id.public java.lang.String getGroupId()
groupId
public void setGroupId(java.lang.String groupId)
groupId
- groupId
public java.lang.String getArtifactId()
artifactId
public void setArtifactId(java.lang.String artifactId)
artifactId
- artifactId
public java.lang.String getClassifier()
classifier
public void setClassifier(java.lang.String classifier)
classifier
- classifier
public java.lang.String[] getIncludes()
includes
public void setIncludes(java.lang.String includes)
includes
- includes
public void setIncludes(java.lang.String[] includes)
includes
- includes
public java.lang.String[] getExcludes()
excludes
public void setExcludes(java.lang.String excludes)
excludes
- excludes
public void setExcludes(java.lang.String[] excludes)
excludes
- excludes
public boolean isFiltered()
filtered
public void setFiltered(boolean filtered)
filtered
- filtered
public boolean shouldSkip()
skip
public void setSkip(boolean skip)
skip
- skip
public org.apache.maven.artifact.Artifact getArtifact()
artifact
public void setArtifact(org.apache.maven.artifact.Artifact artifact)
artifact
- artifact
public java.lang.String getTargetPath()
targetPath
public void setTargetPath(java.lang.String targetPath)
targetPath
- targetPath
public java.lang.String getType()
type
public void setType(java.lang.String type)
type
- type
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
private java.lang.String[] parse(java.lang.String s)