org.jvnet.hyperjaxb3.maven2
Class Hyperjaxb3Mojo

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.jvnet.jaxb2.maven2.AbstractXJC2Mojo<O>
          extended by org.jvnet.jaxb2.maven2.RawXJC2Mojo<com.sun.tools.xjc.Options>
              extended by org.jvnet.mjiip.v_2_2.XJC22Mojo
                  extended by org.jvnet.mjiip.v_2.XJC2Mojo
                      extended by org.jvnet.hyperjaxb3.maven2.Hyperjaxb3Mojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, org.jvnet.jaxb2.maven2.DependencyResourceResolver

@Mojo(name="generate",
      defaultPhase=GENERATE_SOURCES,
      requiresDependencyResolution=COMPILE,
      threadSafe=true)
public class Hyperjaxb3Mojo
extends org.jvnet.mjiip.v_2.XJC2Mojo


Nested Class Summary
static class Hyperjaxb3Mojo.Appender
           
 
Field Summary
 boolean generateEquals
          Whether the equals(...) methods should be generated.
 boolean generateHashCode
          Whether the hashCode() method should be generated.
 boolean generateTransientId
          Whether the generated id property must be transient.
 String persistenceUnitName
          Persistence unit name (EJB3 specific).
 File persistenceXml
          Persistence unit name (EJB3 specific).
 String[] postArgs
           
 String[] preArgs
           
 String[] resourceIncludes
          Patterns for files to be included as resources.
 String result
          Generation result.
 String roundtripTestClassName
          Name of the roundtrip test case.
 File target
          Target directory for the generated mappings.
 String variant
          Persistence variant.
 
Fields inherited from class org.jvnet.jaxb2.maven2.AbstractXJC2Mojo
catalogResolver, plugins
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
Hyperjaxb3Mojo()
           
 
Method Summary
protected  List<String> getArguments()
           
protected  void logConfiguration()
          Logs options defined directly as mojo parameters.
protected  void setupLogging()
          Sets up the verbose and debug mode depending on mvn logging level, and sets up hyperjaxb logging.
protected  void setupMavenPaths()
          Updates XJC's compilePath ans resources and update hyperjaxb2's resources, that is, *.hbm.xml files and hibernate.config.xml file.
 
Methods inherited from class org.jvnet.mjiip.v_2.XJC2Mojo
getOptionsFactory
 
Methods inherited from class org.jvnet.mjiip.v_2_2.XJC22Mojo
doExecute, generateCode, loadModel, writeCode
 
Methods inherited from class org.jvnet.jaxb2.maven2.RawXJC2Mojo
createCatalogResolver, createClassLoader, createOptionsConfiguration, doExecute, execute, getBindingFiles, getBindingUrls, getDependsFiles, getEpisodeArtifacts, getEpisodeFiles, getProducesFiles, getSchemaFiles, getSchemaUrls, getXjcPluginArtifacts, getXjcPluginFiles, getXjcPluginURLs, injectDependencyDefaults, injectDependencyDefaults, isUpToDate, resolveArtifacts, resolveEpisodeArtifacts, resolveXJCPluginArtifacts, setupBindingFiles, setupDependsFiles, setupDirectories, setupFiles, setupProducesFiles, setupSchemaFiles
 
Methods inherited from class org.jvnet.jaxb2.maven2.AbstractXJC2Mojo
cleanPackageDirectory, createResourceEntryUrls, getAccessExternalDTD, getAccessExternalSchema, getAddCompileSourceRoot, getAddTestCompileSourceRoot, getArgs, getArtifactFactory, getArtifactMetadataSource, getArtifactResolver, getBindingDirectory, getBindingExcludes, getBindingIncludes, getBindings, getBuildContext, getCatalog, getCatalogResolver, getCatalogs, getCatalogUrls, getClasspathElements, getCleanPackageDirectories, getContentForWildcard, getDebug, getDisableDefaultExcludes, getDisableXmlSecurity, getEnableIntrospection, getEncoding, getEpisode, getEpisodeFile, getEpisodes, getExtension, getForceRegenerate, getGenerateDirectory, getGeneratePackage, getLocalRepository, getMarkGenerated, getMavenProjectBuilder, getNoFileHeader, getOtherDepends, getPackageLevelAnnotations, getPluginArtifacts, getPlugins, getProduces, getProject, getReadOnly, getRemoveOldOutput, getScanDependenciesForBindings, getSchemaDirectory, getSchemaExcludes, getSchemaIncludes, getSchemaLanguage, getSchemas, getSpecVersion, getStrict, getUseDependenciesAsEpisodes, getVerbose, getWriteCode, logApiConfiguration, resolveDependencyResource, setAccessExternalDTD, setAccessExternalSchema, setAddCompileSourceRoot, setAddTestCompileSourceRoot, setArgs, setArtifactFactory, setArtifactMetadataSource, setArtifactResolver, setBindingDirectory, setBindingExcludes, setBindingIncludes, setBindings, setBuildContext, setCatalog, setCatalogResolver, setCatalogs, setClasspathElements, setCleanPackageDirectories, setContentForWildcard, setDebug, setDisableDefaultExcludes, setDisableXmlSecurity, setEnableIntrospection, setEncoding, setEpisode, setEpisodeFile, setEpisodes, setExtension, setForceRegenerate, setGenerateDirectory, setGeneratePackage, setLocalRepository, setMarkGenerated, setMavenProjectBuilder, setNoFileHeader, setOtherDepends, setPackageLevelAnnotations, setPluginArtifacts, setPlugins, setProduces, setProject, setReadOnly, setRemoveOldOutput, setScanDependenciesForBindings, setSchemaDirectory, setSchemaExcludes, setSchemaIncludes, setSchemaLanguage, setSchemas, setSpecVersion, setStrict, setUseDependenciesAsEpisodes, setVerbose, setWriteCode
 
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

target

@Parameter(property="maven.hj3.target")
public File target
Target directory for the generated mappings. If left empty, mappings are generated together with sources.


roundtripTestClassName

@Parameter(property="maven.hj3.roundtripTestClassName")
public String roundtripTestClassName
Name of the roundtrip test case. If omitted, no roundtrip test case is generated.


resourceIncludes

@Parameter
public String[] resourceIncludes
Patterns for files to be included as resources.


variant

@Parameter(property="maven.hj3.variant",
           defaultValue="ejb")
public String variant
Persistence variant. Switches between various persistence implementations. Possible values are "hibernate" and "ejb-hibernate".


persistenceUnitName

@Parameter(property="maven.hj3.persistenceUnitName")
public String persistenceUnitName
Persistence unit name (EJB3 specific).


persistenceXml

@Parameter(property="maven.hj3.persistenceXml")
public File persistenceXml
Persistence unit name (EJB3 specific).


generateHashCode

@Parameter(property="maven.hj3.generateHashCode",
           defaultValue="true")
public boolean generateHashCode
Whether the hashCode() method should be generated.


generateEquals

@Parameter(property="maven.hj3.generateEquals",
           defaultValue="true")
public boolean generateEquals
Whether the equals(...) methods should be generated.


generateTransientId

@Parameter(property="maven.hj3.generateTransientId",
           defaultValue="false")
public boolean generateTransientId
Whether the generated id property must be transient.


result

@Parameter(property="maven.hj3.result",
           defaultValue="annotations")
public String result
Generation result. Possible values are "annotations", "mappingFiles".


preArgs

@Parameter
public String[] preArgs

postArgs

@Parameter
public String[] postArgs
Constructor Detail

Hyperjaxb3Mojo

public Hyperjaxb3Mojo()
Method Detail

setupLogging

protected void setupLogging()
Sets up the verbose and debug mode depending on mvn logging level, and sets up hyperjaxb logging.

Overrides:
setupLogging in class org.jvnet.jaxb2.maven2.RawXJC2Mojo<com.sun.tools.xjc.Options>

logConfiguration

protected void logConfiguration()
                         throws org.apache.maven.plugin.MojoExecutionException
Logs options defined directly as mojo parameters.

Overrides:
logConfiguration in class org.jvnet.jaxb2.maven2.RawXJC2Mojo<com.sun.tools.xjc.Options>
Throws:
org.apache.maven.plugin.MojoExecutionException

getArguments

protected List<String> getArguments()
                             throws org.apache.maven.plugin.MojoExecutionException
Overrides:
getArguments in class org.jvnet.jaxb2.maven2.RawXJC2Mojo<com.sun.tools.xjc.Options>
Throws:
org.apache.maven.plugin.MojoExecutionException

setupMavenPaths

protected void setupMavenPaths()
Updates XJC's compilePath ans resources and update hyperjaxb2's resources, that is, *.hbm.xml files and hibernate.config.xml file.

Overrides:
setupMavenPaths in class org.jvnet.jaxb2.maven2.RawXJC2Mojo<com.sun.tools.xjc.Options>
Parameters:
xjcOpts -
Throws:
org.apache.maven.plugin.MojoExecutionException


Copyright © 2005-2014. All Rights Reserved.