Package migratedb.maven
Class ScanMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- migratedb.maven.ScanMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="scan", defaultPhase=PROCESS_CLASSES, threadSafe=true, requiresDependencyResolution=COMPILE_PLUS_RUNTIME) public class ScanMojo extends org.apache.maven.plugin.AbstractMojoScans the output of this project (and optionally its dependencies) for database migration resources, e.g. scripts, so they can be found as a 'classpath:' location.MigrateDB looks for the scan results in
db/migrationunless you tweak its configuration.
-
-
Field Summary
Fields Modifier and Type Field Description booleanfailBuildOnUnprocessableClassPathElementWhether the build will fail if the class path contains an unsupported element (such as .war or .ear files).booleanfollowSymlinksWhether the scan will follow symlinks, which can lead to an exception when symlinks create a cycle, e.g., by pointing to one of their parent directories.booleanincludeDependenciesWhether the dependencies of this project should be included in the scan.@Nullable String[]includesResource name prefixes to include in the scan.FileoutputDirectoryThe directory where scan results are placed.org.apache.maven.project.MavenProjectproject
-
Constructor Summary
Constructors Constructor Description ScanMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()
-
-
-
Field Detail
-
project
@Parameter(defaultValue="${project}", readonly=true) public org.apache.maven.project.MavenProject project
-
includes
@Parameter public @Nullable String[] includes
Resource name prefixes to include in the scan. To include packagecom.foo.baryou specifycom/foo/barhere. The separator is always a forward slash and does not depend on the file system implementation.The default value corresponds to the default migration directory/package:
"db/migration"
-
includeDependencies
@Parameter(defaultValue="false") public boolean includeDependencies
Whether the dependencies of this project should be included in the scan. Otherwise only the direct output is scanned.
-
failBuildOnUnprocessableClassPathElement
@Parameter(defaultValue="true") public boolean failBuildOnUnprocessableClassPathElement
Whether the build will fail if the class path contains an unsupported element (such as .war or .ear files). When set tofalsea warning is logged instead.
-
followSymlinks
@Parameter(defaultValue="false") public boolean followSymlinks
Whether the scan will follow symlinks, which can lead to an exception when symlinks create a cycle, e.g., by pointing to one of their parent directories.
-
outputDirectory
@Parameter(defaultValue="${project.build.outputDirectory}/db/migration") public File outputDirectoryThe directory where scan results are placed. The default value corresponds to the default"migratedb.location"configuration ("db/migration").
-
-