public class LiquibaseChangeLogArtifactsProcessor extends Object implements ArtifactsProcessor
ArtifactsProcessor
for use in conjunction with the artifact-maven-plugin
that creates a Liquibase changelog
aggregating
changelog fragments found in a MavenProject
's dependencies.Constructor and Description |
---|
LiquibaseChangeLogArtifactsProcessor()
Creates a new
LiquibaseChangeLogArtifactsProcessor . |
Modifier and Type | Method and Description |
---|---|
AggregateChangeLogGenerator |
getChangeLogGenerator()
Returns the
AggregateChangeLogGenerator to be used to
generate changelogs. |
Collection<String> |
getChangeLogResourceNames()
Returns the relative names of resources representing Liquibase
changelog fragments that this
LiquibaseChangeLogArtifactsProcessor will look for. |
Collection<? extends Artifact> |
process(MavenProject project,
Collection<? extends Artifact> artifacts,
Log log)
|
void |
setChangeLogGenerator(AggregateChangeLogGenerator changeLogGenerator)
Sets the
AggregateChangeLogGenerator to be used to
generate changelogs. |
void |
setChangeLogResourceNames(Collection<String> changeLogResourceNames)
Sets the
Collection of relative resource names
representing Liquibase changelog fragments that this LiquibaseChangeLogArtifactsProcessor will look for. |
public LiquibaseChangeLogArtifactsProcessor()
LiquibaseChangeLogArtifactsProcessor
.public AggregateChangeLogGenerator getChangeLogGenerator()
AggregateChangeLogGenerator
to be used to
generate changelogs.
This method may return null
.
AggregateChangeLogGenerator
, or null
setChangeLogGenerator(AggregateChangeLogGenerator)
public void setChangeLogGenerator(AggregateChangeLogGenerator changeLogGenerator)
AggregateChangeLogGenerator
to be used to
generate changelogs.changeLogGenerator
- the new generator to use; may be null
in which case a new AggregateChangeLogGenerator
will be used internally insteadgetChangeLogGenerator()
public Collection<String> getChangeLogResourceNames()
LiquibaseChangeLogArtifactsProcessor
will look for.
This method may return null
.
Typically, this method returns a singleton Collection
containing the text META-INF/liquibase/changelog.xml
.
Collection
of relative resource names
representing Liquibase changelog fragments, or null
setChangeLogResourceNames(Collection)
public void setChangeLogResourceNames(Collection<String> changeLogResourceNames)
Collection
of relative resource names
representing Liquibase changelog fragments that this LiquibaseChangeLogArtifactsProcessor
will look for.changeLogResourceNames
- the names; may be null
getChangeLogResourceNames()
public Collection<? extends Artifact> process(MavenProject project, Collection<? extends Artifact> artifacts, Log log) throws ArtifactsProcessingException
jar:
URL
s from the supplied resolved
Artifact
s and lists them in topological order as <include>
elements inside a generated Liquibase changelog file.
This method never returns null
.
process
in interface ArtifactsProcessor
project
- the MavenProject
currently in effect; will
not be null
artifacts
- a Collection
of Artifact
s
representing the full, transitive set of resolved dependencies of
the supplied MavenProject
; will not be null
log
- a Log
for logging to a Maven console; may be
null
ArtifactsProcessingException
- if an error occursArtifactsProcessor
Copyright © 2014–2015, Laird Nelson. All rights reserved.