-
-
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
base: main
Are you sure you want to change the base?
Conversation
- Add JavaDoc style documentation to the plugin parameters to improve the Maven plugin description - Change the parameter defaults for 'enableLazyInitialization' and 'enableDirtyTracking' to bring it in line with the former behaviour - Modify the 'groupId' and 'artifactId' in the documentation - Provide complete documentation in the User Guide in line with the Ant task for bytecode enhancement
- Rename 'HibernateEnhancerMojo' to 'EnhancerMojo' - Rename 'HibernateEnhancerMojoTest' to 'EnhancerMojoTest' - Add integration test 'HibernateEnhancerMojoTestIT' to test the different configuration options - Make sure that the enhancer is not doing anything if all the enablement parameters are false Signed-off-by: Koen Aers <[email protected]>
- Add dependencies on 'maven-resolver-transport-http' and 'maven-resolver-connector-basic' for MavenCli to be able to download dependencies Signed-off-by: Koen Aers <[email protected]>
This finally has built fine... Thanks @marko-bekhta for your help! |
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.
Thanks! I added a few comments below.
defaultValue = "false", | ||
defaultValue = "true", | ||
required = true) | ||
private boolean enableDirtyTracking; | ||
|
||
/** | ||
* A boolean that indicates whether or not to add lazy initialization | ||
*/ | ||
@Deprecated( | ||
forRemoval = true) | ||
@Parameter( | ||
defaultValue = "false", | ||
defaultValue = "true", |
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.
If I remember correctly, this is actually fixing a regression in 7.0.
If so, can you please open an issue and use the corresponding Jira key in the relevant commit?
@Deprecated( | ||
forRemoval = true) |
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.
Any reason to remove this? Is the plan to make it mandatory in the future?
A @deprecated blah blah
in the javadoc would help remember :)
@@ -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. |
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:
- Renaming of the plugin
- Default settings
- Maybe some Maven plugin configuration e.g. filesets?
While this parameter is mandatory, its value will be ignored if the <<maven-enhance-filesets-parameter, fileSets>> | ||
parameter is specified. |
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.
It is not mandatory if it has a default.
While this parameter is mandatory, its value will be ignored if the <<maven-enhance-filesets-parameter, fileSets>> | |
parameter is specified. | |
If both `classesDirectory` and <<maven-enhance-filesets-parameter,fileSets>> are set, `fileSets` takes precedence. |
This is an optional parameter but if it is specified the | ||
<<maven-enhance-classesDirectory-parameter, classesDirectory>> parameter described above is ignored. |
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.
This is an optional parameter but if it is specified the | |
<<maven-enhance-classesDirectory-parameter, classesDirectory>> parameter described above is ignored. | |
If both <<maven-enhance-classesDirectory-parameter, classesDirectory>> and `fileSets` are set, `fileSets` takes precedence. |
|
||
[[maven-enhance-enableAssociationManagement-parameter]] | ||
===== `*enableAssociationManagement*` ===== | ||
This parameter has a default value of `false`. It indicates that the enhance task should not perform the changes |
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.
This parameter has a default value of `false`. It indicates that the enhance task should not perform the changes | |
This parameter has a default value of `false`. It indicates whether the enhance task should perform the changes |
[[maven-enhance-enableAssociationManagement-parameter]] | ||
===== `*enableAssociationManagement*` ===== | ||
This parameter has a default value of `false`. It indicates that the enhance task should not perform the changes | ||
to enable association management. To enable, set the value of this attribute to `true`. |
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.
to enable association management. To enable, set the value of this attribute to `true`. | |
to enable <<BytecodeEnhancement-dirty-tracking-bidirectional,association management>>. |
|
||
[[maven-enhance-enableExtendedEnhancement-paremeter]] | ||
===== `*enableExtendedEnhancement*` ===== | ||
This parameter has a default value of `false`. It indicates that the enhance task should not perform the changes |
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.
This parameter has a default value of `false`. It indicates that the enhance task should not perform the changes | |
This parameter has a default value of `false`. It indicates whether the enhance task should perform the changes |
to enable the extended enhancement (i.e. even on non-entities). | ||
To enable this, set the value of this attribute to `true`. |
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.
Seems there is no documentation about this anywhere else, so I can't add a link there... but I guess we can describe it shortly:
to enable the extended enhancement (i.e. even on non-entities). | |
To enable this, set the value of this attribute to `true`. | |
to enable the extended enhancement: enhancement of non-entities to trigger lazy-loading and inline dirty tracking even when accessing entity fields directly. |
integrationTest.dependsOn rootProject.childProjects.'hibernate-core'.tasks.publishToMavenLocal | ||
integrationTest.dependsOn publishToMavenLocal |
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.
Should we file an issue to improve on this and make the publishing "local" to the project, so as not to mess with the local Maven repository unnecessarily?
Or was that something you explored with Steve and gave up on due to limitations/bugs?
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license
and can be relicensed under the terms of the LGPL v2.1 license in the future at the maintainers' discretion.
For more information on licensing, please check here.
https://hibernate.atlassian.net/browse/HHH-19519