Class Overlay

  • Direct Known Subclasses:
    DefaultOverlay

    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.

    • Field Detail

      • DEFAULT_INCLUDES

        public static final java.lang.String[] DEFAULT_INCLUDES
        The list of default includes.
      • DEFAULT_EXCLUDES

        public static final java.lang.String[] DEFAULT_EXCLUDES
        The list of default excludes.
      • id

        private java.lang.String id
      • groupId

        private java.lang.String groupId
      • artifactId

        private java.lang.String artifactId
      • classifier

        private java.lang.String classifier
      • includes

        private java.lang.String[] includes
      • excludes

        private java.lang.String[] excludes
      • filtered

        private boolean filtered
      • skip

        private boolean skip
      • artifact

        private org.apache.maven.artifact.Artifact artifact
      • targetPath

        private java.lang.String targetPath
      • type

        private java.lang.String type
        default overlay type is war
    • Constructor Detail

      • Overlay

        public Overlay()
        Create instance.
      • Overlay

        public Overlay​(java.lang.String groupId,
                       java.lang.String artifactId)
        Parameters:
        groupId - groupId
        artifactId - artifactId
    • Method Detail

      • isCurrentProject

        public boolean isCurrentProject()
        Specify whether this overlay represents the current project or not.
        Returns:
        true if the overlay represents the current project, false otherwise
      • createInstance

        public static Overlay createInstance()
        Returns:
        Overlay instance.
      • getId

        public java.lang.String getId()
        Returns:
        The id.
      • setId

        public void setId​(java.lang.String id)
        Parameters:
        id - The id.
      • getGroupId

        public java.lang.String getGroupId()
        Returns:
        groupId
      • setGroupId

        public void setGroupId​(java.lang.String groupId)
        Parameters:
        groupId - groupId
      • getArtifactId

        public java.lang.String getArtifactId()
        Returns:
        artifactId
      • setArtifactId

        public void setArtifactId​(java.lang.String artifactId)
        Parameters:
        artifactId - artifactId
      • getClassifier

        public java.lang.String getClassifier()
        Returns:
        classifier
      • setClassifier

        public void setClassifier​(java.lang.String classifier)
        Parameters:
        classifier - classifier
      • getIncludes

        public java.lang.String[] getIncludes()
        Returns:
        includes
      • setIncludes

        public void setIncludes​(java.lang.String includes)
        Parameters:
        includes - includes
      • setIncludes

        public void setIncludes​(java.lang.String[] includes)
        Parameters:
        includes - includes
      • getExcludes

        public java.lang.String[] getExcludes()
        Returns:
        excludes
      • setExcludes

        public void setExcludes​(java.lang.String excludes)
        Parameters:
        excludes - excludes
      • setExcludes

        public void setExcludes​(java.lang.String[] excludes)
        Parameters:
        excludes - excludes
      • isFiltered

        public boolean isFiltered()
        Returns:
        filtered
      • setFiltered

        public void setFiltered​(boolean filtered)
        Parameters:
        filtered - filtered
      • shouldSkip

        public boolean shouldSkip()
        Returns:
        skip
      • setSkip

        public void setSkip​(boolean skip)
        Parameters:
        skip - skip
      • getArtifact

        public org.apache.maven.artifact.Artifact getArtifact()
        Returns:
        artifact
      • setArtifact

        public void setArtifact​(org.apache.maven.artifact.Artifact artifact)
        Parameters:
        artifact - artifact
      • getTargetPath

        public java.lang.String getTargetPath()
        Returns:
        targetPath
      • setTargetPath

        public void setTargetPath​(java.lang.String targetPath)
        Parameters:
        targetPath - targetPath
      • getType

        public java.lang.String getType()
        Returns:
        type
      • setType

        public void setType​(java.lang.String type)
        Parameters:
        type - type
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • parse

        private java.lang.String[] parse​(java.lang.String s)