Class Overlay

java.lang.Object
org.apache.maven.plugins.war.Overlay
Direct Known Subclasses:
DefaultOverlay

public class Overlay extends 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 Details

    • DEFAULT_INCLUDES

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

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

      private String id
    • groupId

      private String groupId
    • artifactId

      private String artifactId
    • classifier

      private String classifier
    • includes

      private String[] includes
    • excludes

      private String[] excludes
    • filtered

      private boolean filtered
    • skip

      private boolean skip
    • artifact

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

      private String targetPath
    • type

      private String type
      default overlay type is war
  • Constructor Details

    • Overlay

      public Overlay()
      Create instance.
    • Overlay

      public Overlay(String groupId, String artifactId)
      Parameters:
      groupId - groupId
      artifactId - artifactId
  • Method Details

    • 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 String getId()
      Returns:
      The id.
    • setId

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

      public String getGroupId()
      Returns:
      groupId
    • setGroupId

      public void setGroupId(String groupId)
      Parameters:
      groupId - groupId
    • getArtifactId

      public String getArtifactId()
      Returns:
      artifactId
    • setArtifactId

      public void setArtifactId(String artifactId)
      Parameters:
      artifactId - artifactId
    • getClassifier

      public String getClassifier()
      Returns:
      classifier
    • setClassifier

      public void setClassifier(String classifier)
      Parameters:
      classifier - classifier
    • getIncludes

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

      public void setIncludes(String includes)
      Parameters:
      includes - includes
    • setIncludes

      public void setIncludes(String[] includes)
      Parameters:
      includes - includes
    • getExcludes

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

      public void setExcludes(String excludes)
      Parameters:
      excludes - excludes
    • setExcludes

      public void setExcludes(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 String getTargetPath()
      Returns:
      targetPath
    • setTargetPath

      public void setTargetPath(String targetPath)
      Parameters:
      targetPath - targetPath
    • getType

      public String getType()
      Returns:
      type
    • setType

      public void setType(String type)
      Parameters:
      type - type
    • toString

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      private String[] parse(String s)