public abstract class AbstractJibxMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.maven.project.MavenProject |
project
The maven project.
|
| Constructor and Description |
|---|
AbstractJibxMojo() |
| Modifier and Type | Method and Description |
|---|---|
List<String> |
addDependentArtifact(org.apache.maven.artifact.Artifact artifact,
IncludeBaseBinding includeDependentBinding,
List<String> bindingSet) |
List<String> |
addDependentBinding(IncludeBaseBinding includeDependentBinding,
List<String> bindingSet)
Add bindings that are containted in artifacts.
|
List<String> |
addManualDependentBinding(IncludeBaseBinding includeDependentBinding,
List<String> bindingSet)
Add bindings on the filesystem.
|
String |
addToPath(String prePath,
String postPath)
Fix this directory path so it starts at the root project dir.
|
protected void |
checkConfiguration()
Verifies the plugins configuration and sets default values if needed.
|
abstract void |
execute()
Determines if running in single- or multi-module mode, collects all bindings and finally runs the binding
compiler.
|
List<String> |
extractBaseBindingFile(List<String> pathList,
ZipFile zip,
String directory,
String groupId,
String artifactId,
String filePathInJar)
Extract the base binding file(s) from the dependent artifacts.
|
protected String |
fixFilePath(String filePath,
String defaultPath)
Fix this file path.
|
protected String |
getBaseBindingDirectory()
Get the base binding files directory.
|
String[] |
getBaseBindings(String[] bindings)
Get the binding path name for a includeBaseBinding binding.
|
String |
getFullPath(String dir)
Fix this directory path so it starts at the root project dir.
|
protected List<String> |
getIncludedFiles(String path,
ArrayList<String> includeFiles,
ArrayList<String> excludeFiles)
Returns all bindings in the given directory according to the configured include/exclude patterns.
|
protected String |
getProjectBasedir(org.apache.maven.project.MavenProject project)
Returns the basedir of the given project.
|
protected abstract Set<String> |
getProjectCompileClasspathElements(org.apache.maven.project.MavenProject project)
Returns the build output directory of the given project.
|
protected String |
getSchemaBindingDirectory()
Get the binding files directory.
|
public abstract void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected String getProjectBasedir(org.apache.maven.project.MavenProject project)
protected void checkConfiguration()
protected List<String> getIncludedFiles(String path, ArrayList<String> includeFiles, ArrayList<String> excludeFiles) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected String fixFilePath(String filePath, String defaultPath)
filePath - The path to fixdefaultPath - The base path to use.protected abstract Set<String> getProjectCompileClasspathElements(org.apache.maven.project.MavenProject project) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if DependencyResolutionRequiredException occurspublic String[] getBaseBindings(String[] bindings)
basedir - includeBinding - public List<String> addManualDependentBinding(IncludeBaseBinding includeDependentBinding, List<String> bindingSet)
includeDependentBinding - bindingSet - public List<String> addDependentBinding(IncludeBaseBinding includeDependentBinding, List<String> bindingSet)
includeDependentBinding - bindingSet - public List<String> addDependentArtifact(org.apache.maven.artifact.Artifact artifact, IncludeBaseBinding includeDependentBinding, List<String> bindingSet)
public List<String> extractBaseBindingFile(List<String> pathList, ZipFile zip, String directory, String groupId, String artifactId, String filePathInJar)
pathList - zip - directory - groupId - artifactId - filePathInJar - protected String getBaseBindingDirectory()
protected String getSchemaBindingDirectory()
public String getFullPath(String dir)
dir - Copyright © 2005-2013 jibx.org. All Rights Reserved.