Class TransformHbmXmlTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.SourceTask
org.hibernate.orm.tooling.gradle.misc.TransformHbmXmlTask
- All Implemented Interfaces:
Comparable<org.gradle.api.Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, org.gradle.api.Named, org.gradle.api.plugins.ExtensionAware, org.gradle.api.Task, org.gradle.api.tasks.util.PatternFilterable, org.gradle.util.Configurable<org.gradle.api.Task>
@CacheableTask
public abstract class TransformHbmXmlTask
extends org.gradle.api.tasks.SourceTask
Task to transform a legacy
`hbm.xml` file into the
mapping format.
The task creates copies of `hbm.xml` files:
-
Into the specified
output directory, if one was set; otherwise into the same directory as the`hbm.xml`file. -
Use
renamingto control the naming of the copies.
- See Also:
- API Note:
- See note on
TransformationNamingwith regard to making copies in place and not specifying renaming effectively replacing the original (destructive).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Named
org.gradle.api.Named.Namer -
Field Summary
Fields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract org.gradle.api.provider.Property<Boolean> Should thehbm.xmlfiles be deleted on successful transformation? Default is false.abstract org.gradle.api.file.DirectoryPropertyIf set, transformed xml is written, relatively, to this directory.abstract TransformationNamingAbility to create copies of the original with specific naming.abstract org.gradle.api.provider.Property<String> abstract org.gradle.api.provider.Property<org.hibernate.boot.jaxb.hbm.transform.UnsupportedFeatureHandling> How should features supported in `hbm.xml` files, which are not supported for transformation, be handled?voidrenaming(org.gradle.api.Action<TransformationNaming> action) voidMethods inherited from class org.gradle.api.tasks.SourceTask
exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSet, getPatternSetFactory, getSource, include, include, include, include, setExcludes, setIncludes, setSource, setSource, sourceMethods inherited from class org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMappingMethods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, notCompatibleWithConfigurationCache
-
Constructor Details
-
TransformHbmXmlTask
public TransformHbmXmlTask()
-
-
Method Details
-
getRenaming
Ability to create copies of the original with specific naming. -
getTargetDatabaseName
- See Also:
-
getUnsupportedFeatures
@Input public abstract org.gradle.api.provider.Property<org.hibernate.boot.jaxb.hbm.transform.UnsupportedFeatureHandling> getUnsupportedFeatures()How should features supported in `hbm.xml` files, which are not supported for transformation, be handled? -
getDeleteHbmFiles
Should thehbm.xmlfiles be deleted on successful transformation? Default is false. -
getOutputDirectory
@OutputDirectory public abstract org.gradle.api.file.DirectoryProperty getOutputDirectory()If set, transformed xml is written, relatively, to this directory.E.g. transforming the resource `org/hibernate/test/my_mappings.hbm.xml` into `/home/me/hibernate` would transform the HBM mapping and save it as `/home/me/hibernate/org/hibernate/test/my_mappings.hbm.xml` (depending on
namingconfig) -
renaming
-
transformFiles
public void transformFiles()
-