@Mojo(name="catalog",
defaultPhase=PROCESS_RESOURCES,
requiresDependencyResolution=COMPILE)
public class Catalog
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
static String[] |
ALLOWED_REWRITES |
static String[] |
ALLOWED_URI_PATTERNS |
String |
catalogFileName
The catalog file.
|
List<DelegateEntry> |
delegatesPublic
Allows to add <delegatePublic /> entries to generated catalog.
|
List<DelegateEntry> |
delegatesSystem
Allows to add <delegateSystem /> entries to generated catalog.
|
List<DelegateEntry> |
delegatesURI
Allows to add <delegateURI /> entries to generated catalog.
|
List<String> |
excludes
List of artifacts to exclude.
|
boolean |
generateOxygenCatalog
Allows to generate a special catalog for Oxygen, where
jar:file:/ URIs are transformed to zip:file:/ URIs.
|
List<String> |
generates
The entries to add in catalog.
|
boolean |
includeCurrentArtifact
If true, current artifact (the project which is actually built) will
be included in catalog.
|
List<String> |
includes
List of artifacts to include.
|
List<String> |
nextCatalogs
The next catalog to add to catalog.
|
org.apache.maven.project.MavenProject |
project
Current project
|
boolean |
removeDoctype
If set to true, removes the DOCTYPE from catalog file.
|
static String |
SCHEME |
List<String> |
uriPatterns
The URI patterns to generate.
|
| Constructor and Description |
|---|
Catalog() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
buildPattern(String pattern,
String groupId,
String artifactId,
String version) |
void |
execute() |
protected boolean |
shouldProcessDependency(org.apache.maven.shared.dependency.graph.DependencyNode dn) |
protected void |
writeCatalogEntry(XMLStreamWriter writer,
String entry,
RewriteSystemModel rsm) |
protected void |
writeDelegateEntry(XMLStreamWriter writer,
String delegate,
DelegateEntry entry) |
public static final transient String SCHEME
@Parameter(defaultValue="${project}",
readonly=true,
required=true)
public org.apache.maven.project.MavenProject project
@Parameter(defaultValue="catalog.xml") public String catalogFileName
@Parameter public List<String> uriPatterns
| pattern | URI form |
|---|---|
| standard | dependency:/goupId+artifactId/path/to/file.xml |
| full | dependency:/groupId+artifactId$version/path/to/file.xml |
@Parameter public List<String> generates
@Parameter public boolean includeCurrentArtifact
@Parameter public List<String> nextCatalogs
@Parameter public List<String> excludes
includes are exclusives, and must not be used together.
If excludes is specified, all dependencies are used, except the ones that
match excludes.
Project's artifact is processed neither by excludes nor includes@Parameter public List<String> includes
excludes are exclusives, and must not be used together.
If includes is specified, all dependencies that match includes are used.
Project's artifact is processed neither by excludes nor includes@Parameter public List<DelegateEntry> delegatesPublic
<delegateEntry> <startString>publicIdStartString</startString> <catalog>catalog</catalog> </delegateEntry>
@Parameter public List<DelegateEntry> delegatesSystem
<delegateEntry> <startString>systemIdStartString</startString> <catalog>catalog</catalog> </delegateEntry>
@Parameter public List<DelegateEntry> delegatesURI
<delegateEntry> <startString>uriStartString</startString> <catalog>catalog</catalog> </delegateEntry>
@Parameter(defaultValue="true") public boolean removeDoctype
@Parameter(defaultValue="false") public boolean generateOxygenCatalog
public static final transient String[] ALLOWED_URI_PATTERNS
public static final transient String[] ALLOWED_REWRITES
public void execute()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected boolean shouldProcessDependency(org.apache.maven.shared.dependency.graph.DependencyNode dn)
protected String buildPattern(String pattern, String groupId, String artifactId, String version)
protected void writeDelegateEntry(XMLStreamWriter writer, String delegate, DelegateEntry entry) throws XMLStreamException, org.apache.maven.plugin.MojoExecutionException
XMLStreamExceptionorg.apache.maven.plugin.MojoExecutionExceptionprotected void writeCatalogEntry(XMLStreamWriter writer, String entry, RewriteSystemModel rsm) throws XMLStreamException, org.apache.maven.plugin.MojoExecutionException
XMLStreamExceptionorg.apache.maven.plugin.MojoExecutionExceptionCopyright © 2018. All rights reserved.