-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
HHH-19519: Document breaking changes in new Hibernate Maven Plugin #10835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
@@ -9,8 +9,14 @@ The following sections illustrate how both <<tooling-maven-enhancement,bytecode | |||||||||
Hibernate provides a https://maven.apache.org/[Maven] plugin capable of providing | ||||||||||
build-time enhancement of the domain model as they are compiled as part of a Maven | ||||||||||
build. See the section on <<BytecodeEnhancement>> for details | ||||||||||
on the configuration settings. By default, all enhancements are disabled. | ||||||||||
on the configuration settings. | ||||||||||
|
||||||||||
[[maven-enhance-goal]] | ||||||||||
===== *Enhance Goal* ===== | ||||||||||
|
||||||||||
An example of using the `enhance` goal of the plugin is shown below. By default the plugin will | ||||||||||
perform bytecode enhancement for lazy initialization and dirty tracking. See <<maven-enhance-configuration, below>> | ||||||||||
for more details on the available parameters. | ||||||||||
|
||||||||||
.Apply the Bytecode Enhancement plugin | ||||||||||
==== | ||||||||||
|
@@ -20,6 +26,136 @@ include::extras/maven-example.pom[] | |||||||||
---- | ||||||||||
==== | ||||||||||
|
||||||||||
[[maven-enhance-configuration]] | ||||||||||
===== *Enhance Configuration* ===== | ||||||||||
|
||||||||||
[[maven-enhance-classesDirectory-parameter]] | ||||||||||
====== `*classesDirectory*` ====== | ||||||||||
This parameter points to the folder in which to look for classes to enhance. | ||||||||||
It defaults to the value of `{project.build.directory}/classes` and thus in most cases to `target/classes`. | ||||||||||
While this parameter is mandatory, its value will be ignored if the <<maven-enhance-filesets-parameter, fileSets>> | ||||||||||
parameter is specified. | ||||||||||
Comment on lines
+36
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is not mandatory if it has a default.
Suggested change
|
||||||||||
|
||||||||||
==== | ||||||||||
[source,xml] | ||||||||||
---- | ||||||||||
[...] | ||||||||||
<execution> | ||||||||||
<configuration> | ||||||||||
<classesDirectory>path-to-some-folder</classesDirectory> | ||||||||||
</configuration> | ||||||||||
[...] | ||||||||||
</execution> | ||||||||||
[...] | ||||||||||
---- | ||||||||||
==== | ||||||||||
|
||||||||||
[[maven-enhance-filesets-parameter]] | ||||||||||
====== `*fileSets*` ====== | ||||||||||
This parameter comes in handy when you need to filter the classes that you want to enhance. More information | ||||||||||
on how to use filesets is to be found on the | ||||||||||
https://maven.apache.org/shared/file-management/fileset.html[fileset documentation page]. | ||||||||||
This is an optional parameter but if it is specified the | ||||||||||
<<maven-enhance-classesDirectory-parameter, classesDirectory>> parameter described above is ignored. | ||||||||||
Comment on lines
+58
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
|
||||||||||
==== | ||||||||||
[source,xml] | ||||||||||
---- | ||||||||||
[...] | ||||||||||
<execution> | ||||||||||
<configuration> | ||||||||||
<fileSets> | ||||||||||
<fileset dir="path-to-some-folder"> | ||||||||||
<exclude name='Baz.class' /> | ||||||||||
</fileset> | ||||||||||
</fileSets> | ||||||||||
</configuration> | ||||||||||
[...] | ||||||||||
</execution> | ||||||||||
[...] | ||||||||||
---- | ||||||||||
==== | ||||||||||
|
||||||||||
[[maven-enhance-enableLazyInitialization-parameter]] | ||||||||||
===== `*enableLazyInitialization*` ===== | ||||||||||
This parameter has a default value of `true`. It indicates that the enhance goal should perform the changes | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
to enable lazy loading. To disable, set the value of this attribute to `false`. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
The parameter has been deprecated for removal. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe explain what will happen on removal (always enabled? always disabled?). |
||||||||||
|
||||||||||
==== | ||||||||||
[source,xml] | ||||||||||
---- | ||||||||||
[...] | ||||||||||
<execution> | ||||||||||
<configuration> | ||||||||||
<enableLazyInitialization>false</enableLazyInitialization> | ||||||||||
</configuration> | ||||||||||
[...] | ||||||||||
</execution> | ||||||||||
[...] | ||||||||||
---- | ||||||||||
==== | ||||||||||
|
||||||||||
[[maven-enhance-enableDirtyTracking-parameter]] | ||||||||||
===== `*enableDirtyTracking*` ===== | ||||||||||
This parameter has a default value of `true`. It indicates that the enhance task should perform the changes | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
to enable dirty tracking. To disable, set the value of this attribute to `false`. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||
The parameter has been deprecated for removal. | ||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe explain what will happen on removal (always enabled? always disabled?). |
||||||||||
|
||||||||||
==== | ||||||||||
[source,xml] | ||||||||||
---- | ||||||||||
[...] | ||||||||||
<execution> | ||||||||||
<configuration> | ||||||||||
<enableDirtyTracking>false</enableDirtyTracking> | ||||||||||
</configuration> | ||||||||||
[...] | ||||||||||
</execution> | ||||||||||
[...] | ||||||||||
---- | ||||||||||
==== | ||||||||||
|
||||||||||
[[maven-enhance-enableAssociationManagement-parameter]] | ||||||||||
===== `*enableAssociationManagement*` ===== | ||||||||||
This parameter has a default value of `false`. It indicates that the enhance task should not perform the changes | ||||||||||
yrodiere marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
to enable association management. To enable, set the value of this attribute to `true`. | ||||||||||
yrodiere marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
==== | ||||||||||
[source,xml] | ||||||||||
---- | ||||||||||
[...] | ||||||||||
<execution> | ||||||||||
<configuration> | ||||||||||
<enableAssociationManagement>true</enableAssociationManagement> | ||||||||||
</configuration> | ||||||||||
[...] | ||||||||||
</execution> | ||||||||||
[...] | ||||||||||
---- | ||||||||||
==== | ||||||||||
|
||||||||||
[[maven-enhance-enableExtendedEnhancement-paremeter]] | ||||||||||
===== `*enableExtendedEnhancement*` ===== | ||||||||||
This parameter has a default value of `false`. It indicates that the enhance task should not perform the changes | ||||||||||
yrodiere marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
to enable the extended enhancement (i.e. even on non-entities). | ||||||||||
To enable this, set the value of this attribute to `true`. | ||||||||||
yrodiere marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||||||
|
||||||||||
==== | ||||||||||
[source,xml] | ||||||||||
---- | ||||||||||
[...] | ||||||||||
<execution> | ||||||||||
<configuration> | ||||||||||
<enableExtendedEnhancement>true</enableExtendedEnhancement> | ||||||||||
</configuration> | ||||||||||
[...] | ||||||||||
</execution> | ||||||||||
[...] | ||||||||||
---- | ||||||||||
==== | ||||||||||
|
||||||||||
|
||||||||||
[[tooling-maven-modelgen]] | ||||||||||
==== Static Metamodel Generation | ||||||||||
|
||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, if anything changed, we will need the changes documented in
migration-guide.adoc
at the root of the repository. That needs to happen on the branch where the changes happened, though -- which I think would be 7.0.From the top of my head, the changes are:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this is only the renaming of the plugin. I included this in the other PR I just opened but I'll need to account for your other comments in that one as well.