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 renaming to control the naming of the copies.
See Also:
  • HbmXmlTransformer
API Note:
See note on TransformationNaming with 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
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract org.gradle.api.provider.Property<Boolean>
    Should the hbm.xml files be deleted on successful transformation? Default is false.
    abstract org.gradle.api.file.DirectoryProperty
    If set, transformed xml is written, relatively, to this directory.
    Ability 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?
    void
    renaming(org.gradle.api.Action<TransformationNaming> action)
     
    void
     

    Methods 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, source

    Methods inherited from class org.gradle.api.internal.ConventionTask

    conventionMapping, conventionMapping, getConventionMapping

    Methods 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, usesService

    Methods 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, setImpliesSubProjects

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.gradle.api.Task

    doNotTrackState, notCompatibleWithConfigurationCache
  • Constructor Details

    • TransformHbmXmlTask

      public TransformHbmXmlTask()
  • Method Details

    • getRenaming

      public abstract TransformationNaming getRenaming()
      Ability to create copies of the original with specific naming.
    • getTargetDatabaseName

      @Input public abstract org.gradle.api.provider.Property<String> getTargetDatabaseName()
      See Also:
      • Database
    • 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

      @Input public abstract org.gradle.api.provider.Property<Boolean> getDeleteHbmFiles()
      Should the hbm.xml files 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 naming config)

    • renaming

      public void renaming(org.gradle.api.Action<TransformationNaming> action)
    • transformFiles

      public void transformFiles()