@Mojo(name="testSchemagen", defaultPhase=GENERATE_TEST_RESOURCES, requiresDependencyResolution=TEST, threadSafe=true) public class TestSchemaGenerationMojo extends AbstractXsdGeneratorMojo
Mojo that creates XML schema(s) from test-scope Java testSources or binaries by invoking the JAXB SchemaGenerator. This implementation is tailored to use the JAXB Reference Implementation from project Kenai.
Note that the TestSchemaGenerationMojo was completely re-implemented for the 2.x versions. Its configuration semantics and parameter set is not backwards compatible with the 1.x plugin versions. If you are upgrading from version 1.x of the plugin, read the documentation carefully.
Modifier and Type | Field and Description |
---|---|
static String |
STALE_FILENAME
The last part of the stale fileName for this TestSchemaGenerationMojo.
|
static List<Filter<File>> |
STANDARD_TEST_SOURCE_EXCLUDE_FILTERS
Default exclude file name suffixes for testSources, used unless overridden by an
explicit configuration in the
testSchemaSourceExcludeFilters parameter. |
CLASS_INCLUDE_FILTERS, clearOutputDir, createJavaDocAnnotations, generateEpisode, javaDocRenderer, SCHEMAGEN_EMITTED_FILENAME, STANDARD_BYTECODE_EXCLUDE_FILTERS, STANDARD_JAVADOC_RENDERER, SYSTEM_TOOLS_CLASSLOADER_PACKAGES
CONTAINS_WHITESPACE, extraFacets, locale, NEWLINE, PACKAGE_INFO_FILENAME, staleFileDirectory, STANDARD_EPISODE_FILENAME, STANDARD_EXCLUDE_FILTERS
Constructor and Description |
---|
TestSchemaGenerationMojo() |
Modifier and Type | Method and Description |
---|---|
protected List<String> |
getClasspath()
Retrieves the configured List of paths from which this AbstractJaxbMojo and its internal toolset
(XJC or SchemaGen) should read bytecode classes.
|
protected List<URL> |
getCompiledClassNames()
Finds a List containing URLs to compiled bytecode files within this Compilation Unit.
|
protected File |
getOutputDirectory()
Retrieves the directory where the generated files should be written to.
|
protected List<URL> |
getSources()
Override this method to acquire a List holding all URLs to the SchemaGen Java sources for which this
AbstractXsdGeneratorMojo should generate Xml Schema Descriptor files.
|
protected String |
getStaleFileName()
Retrieves the last name part of the stale file.
|
protected File |
getWorkDirectory() |
isReGenerationRequired, performExecution, shouldExecutionBeSkipped
execute, getBuildContext, getEncoding, getEpisodeFile, getExecution, getProject, getStaleFile, logAndReturnToolArguments, logSystemPropertiesAndBasedir, warnAboutIncorrectPluginConfiguration
public static final String STALE_FILENAME
protected List<URL> getCompiledClassNames()
getCompiledClassNames
in class AbstractXsdGeneratorMojo
protected List<String> getClasspath() throws org.apache.maven.plugin.MojoExecutionException
getClasspath
in class AbstractJaxbMojo
org.apache.maven.plugin.MojoExecutionException
- if the classpath could not be retrieved.protected List<URL> getSources()
getSources
in class AbstractXsdGeneratorMojo
protected File getOutputDirectory()
getOutputDirectory
in class AbstractJaxbMojo
protected String getStaleFileName()
"." + getExecution().getExecutionId()
before this staleFileName.getStaleFileName
in class AbstractJaxbMojo
protected File getWorkDirectory()
getWorkDirectory
in class AbstractXsdGeneratorMojo
Copyright © 2005–2015 MojoHaus. All rights reserved.