Class EpisodeArtifact
java.lang.Object
org.codehaus.mojo.jaxb2.javageneration.EpisodeArtifact
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAn explicit path to the episode resource within the artifact, relative to its root (e.g.getType()booleanvoidsetArtifactId(String artifactId) voidsetClassifier(String classifier) voidsetGroupId(String groupId) voidsetOptional(boolean optional) voidsetResourcePath(String resourcePath) voidvoidsetVersion(String version) toString()voidvalidate()Validates that the mandatory elements of this episode artifact are present.
-
Constructor Details
-
EpisodeArtifact
public EpisodeArtifact()
-
-
Method Details
-
getGroupId
- Returns:
- The Maven groupId of the episode artifact. Required.
-
setGroupId
- Parameters:
groupId- The Maven groupId of the episode artifact. Required.
-
getArtifactId
- Returns:
- The Maven artifactId of the episode artifact. Required.
-
setArtifactId
- Parameters:
artifactId- The Maven artifactId of the episode artifact. Required.
-
getVersion
- Returns:
- The Maven version of the episode artifact. Required.
-
setVersion
- Parameters:
version- The Maven version of the episode artifact. Required.
-
getType
- Returns:
- The Maven artifact type (extension) of the episode artifact. Defaults to
jar.
-
setType
- Parameters:
type- The Maven artifact type (extension) of the episode artifact. Defaults tojar.
-
getClassifier
- Returns:
- The optional Maven classifier of the episode artifact.
-
setClassifier
- Parameters:
classifier- The optional Maven classifier of the episode artifact.
-
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
nullfor auto-discovery.
-
setResourcePath
- Parameters:
resourcePath- An explicit path to the episode resource within the artifact, relative to its root.
-
isOptional
public boolean isOptional()- Returns:
trueif a missing episode resource within this artifact should be logged and skipped rather than failing the build. Defaults tofalse.
-
setOptional
public void setOptional(boolean optional) - Parameters:
optional-trueif 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
- Returns:
- The coordinate string
groupId:artifactId:type[:classifier]:version.
-
toString
-