Class EpisodeArtifact

java.lang.Object
org.codehaus.mojo.jaxb2.javageneration.EpisodeArtifact

public class EpisodeArtifact extends Object

Configuration model for a Maven artifact containing a JAXB episode file, to be used as an external binding by XJC when compiling another schema. Declared within the episodes parameter of the xjc goal:

    
        <episodes>
            <episode>
                <groupId>com.acme.schemas</groupId>
                <artifactId>schema-a</artifactId>
                <version>1.4.0</version>
                <!-- optional elements: -->
                <type>jar</type>
                <classifier></classifier>
                <resourcePath>META-INF/sun-jaxb.episode</resourcePath>
                <optional>false</optional>
            </episode>
        </episodes>
    
Since:
4.1.1
See Also:
  • XjcMojo.episodes
  • Constructor Details

    • EpisodeArtifact

      public EpisodeArtifact()
  • Method Details

    • getGroupId

      public String getGroupId()
      Returns:
      The Maven groupId of the episode artifact. Required.
    • setGroupId

      public void setGroupId(String groupId)
      Parameters:
      groupId - The Maven groupId of the episode artifact. Required.
    • getArtifactId

      public String getArtifactId()
      Returns:
      The Maven artifactId of the episode artifact. Required.
    • setArtifactId

      public void setArtifactId(String artifactId)
      Parameters:
      artifactId - The Maven artifactId of the episode artifact. Required.
    • getVersion

      public String getVersion()
      Returns:
      The Maven version of the episode artifact. Required.
    • setVersion

      public void setVersion(String version)
      Parameters:
      version - The Maven version of the episode artifact. Required.
    • getType

      public String getType()
      Returns:
      The Maven artifact type (extension) of the episode artifact. Defaults to jar.
    • setType

      public void setType(String type)
      Parameters:
      type - The Maven artifact type (extension) of the episode artifact. Defaults to jar.
    • getClassifier

      public String getClassifier()
      Returns:
      The optional Maven classifier of the episode artifact.
    • setClassifier

      public void setClassifier(String classifier)
      Parameters:
      classifier - The optional Maven classifier of the episode artifact.
    • getResourcePath

      public String getResourcePath()

      An explicit path to the episode resource within the artifact, relative to its root (e.g. META-INF/sun-jaxb.episode). When omitted, the plugin discovers the episode using its standard search order and fails if the result is ambiguous.

      Returns:
      The explicit episode resource path within the artifact, or null for auto-discovery.
    • setResourcePath

      public void setResourcePath(String resourcePath)
      Parameters:
      resourcePath - An explicit path to the episode resource within the artifact, relative to its root.
    • isOptional

      public boolean isOptional()
      Returns:
      true if a missing episode resource within this artifact should be logged and skipped rather than failing the build. Defaults to false.
    • setOptional

      public void setOptional(boolean optional)
      Parameters:
      optional - true if a missing episode resource should be skipped rather than failing the build.
    • validate

      public void validate()
      Validates that the mandatory elements of this episode artifact are present.
      Throws:
      IllegalArgumentException - if groupId, artifactId or version is missing.
    • getCoordinate

      public String getCoordinate()
      Returns:
      The coordinate string groupId:artifactId:type[:classifier]:version.
    • toString

      public String toString()
      Overrides:
      toString in class Object