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
episodesparameter of thexjcgoal:<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 Summary
Constructors Constructor Description EpisodeArtifact()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetArtifactId()StringgetClassifier()StringgetCoordinate()StringgetGroupId()StringgetResourcePath()An explicit path to the episode resource within the artifact, relative to its root (e.g.StringgetType()StringgetVersion()booleanisOptional()voidsetArtifactId(String artifactId)voidsetClassifier(String classifier)voidsetGroupId(String groupId)voidsetOptional(boolean optional)voidsetResourcePath(String resourcePath)voidsetType(String type)voidsetVersion(String version)StringtoString()voidvalidate()Validates that the mandatory elements of this episode artifact are present.
-
-
-
Method Detail
-
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 tojar.
-
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
nullfor 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:
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
public String getCoordinate()
- Returns:
- The coordinate string
groupId:artifactId:type[:classifier]:version.
-
-