-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
HHH-18644: New and improved hibernate-maven-plugin #9145
Conversation
...ibernate-maven-plugin/src/main/java/org/hibernate/orm/tooling/maven/enhance/EnhanceMojo.java
Fixed
Show fixed
Hide fixed
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 left a comment about getting information from the Gradle build into the pom file.
We also need to expose your integration testing into the Gradle build. Unless I am missing something, at the moment one would need to directly call Maven to be able to run these integration tests.
121be65
to
aebae31
Compare
dbc438d
to
ca2e3c5
Compare
- Add MavenInstallTask to install artifacts in local repo - Add MavenInvokerRunTask to run the integration tests - Integrate both tasks in MavenEmbedderPlugin - Add the hibernate-maven-plugin implementation Signed-off-by: Koen Aers <[email protected]>
- Add needed dependencies to pom.xml so that the 'mvn invoker:run' invocation does not complain anymore - Add dependency on jarkarta persistence to 'it/enhance/pom.xml' so that the project compiles when 'mvn invoker:run' is called Signed-off-by: Koen Aers <[email protected]>
- Add plugin installation to MavenInvokerRunTask - Remove use of MavenInstallArtifactTask in MavenEmbedderPlugin - Use version 7.0.0.Beta1 of hibernate-core for now (to make the integration test work using mvn) - Add 'run' goal to the execution of the invoker plugin in pom.xml Signed-off-by: Koen Aers <[email protected]>
- Implement the verification script so that it properly verifies that the class enhancement - Add a script variable definition to pom.xml for use in the verification script Signed-off-by: Koen Aers <[email protected]>
- Add and configure a class 'org.hibernate.build.maven.embedder.logging.Slf4jConfiguration' to be able to have the calls to Maven provide usable logging - Add a Maven wrapper executable to the integration test project and configure the Maven invoker plugin to use that executable - Add the .mvn folder to .gitignore Signed-off-by: Koen Aers <[email protected]>
- Remove the 'tooling/hibernate-maven-plugin/.gitignore' - Add Maven wrapper properties Signed-off-by: Koen Aers <[email protected]>
- Some cleanup of forgotten System.out.println() statements - Removal of unneeded dependencies in pom.xml Signed-off-by: Koen Aers <[email protected]>
- Add hibernate-core publication to the local Maven repo - Add (incomplete) pom generation for hibernate-maven-plugin Signed-off-by: Koen Aers <[email protected]>
- Complete generation of 'pom.xml' in 'tooling/hibernate-maven-plugin/hibernate-maven-plugin.gradle' to include the invoking of the integration tests - Cleanup of class 'MavenPluginDescriptorTask' - Cleanup of class 'MavenInvokerRunTask' - Add possibility to specify path to the pom file in 'MavenInstallArtifactTask' - Change the working directory to 'maven-embedder/working-directory' in 'MavenEmbedderPlugin - Create a task to copy the pom.xml file (generated by task 'generatePomFileForHibernateCorePublication' to the root of the working directory - Create a task to copy the sources to the working directory - Create a task to install 'hibernate-scan-jandex' into the local repository - Create a task to install the hibernate-maven-plugin into the local repository prior to the integration tests - Wire all the tasks together Signed-off-by: Koen Aers <[email protected]>
- Remove unneeded 'pom.xml' file - Make the 'check' gradle task depend on both 'integrationTest' and 'generatePluginDescriptorTask' Signed-off-by: Koen Aers <[email protected]>
- Installing hibernate-core depends on creating the jar - Installing hibernate-scan-jandex depends on creating the jar Signed-off-by: Koen Aers <[email protected]>
- Use the existing publish tasks in 'MavenEmbedderPlugin' * Replace 'generatePomFileForHibernateMavenPluginPublication' by 'generatePomFileForPublishedArtifactsPublication' * Replace 'generatePomFileForHibernateCorePublication' with ':hibernate-core:generatePomFileForPublishedArtifactsPublication' * Adapt the artifact locations to the changes above - Perform some cleanup in 'hibernate-maven-plugin.gradle' * Change 'hibernateMavenPlugin' into the already existing 'publishedArtifacts' so that the correct pom.xml file is also published appropriately * Remove the 'hibernateCore' publication (since we are now using 'publishedArtifacts' in the MavenEmbedderPlugin) * Remove the 'mavenLocal' repository as this is now also handled in the MavenEmbedderPlugin Signed-off-by: Koen Aers <[email protected]>
- Add a task to copy the compiled classes into the Maven working directory - Remove the compilation step from the descriptor generation task Signed-off-by: Koen Aers <[email protected]>
- Fix build problem using 'gradle/publishing-pom.gradle' instead of 'gradle/published-java-module.gradle' Signed-off-by: Koen Aers <[email protected]>
- Use the artifact to be installed as an @InputFile in MavenInstallArtifactTask - Calculate the artifact name in MavenEmbedderPlugin Signed-off-by: Koen Aers <[email protected]>
- Move the copy logic from MavenEmbedderPlugin to hibernate-maven-plugin.gradle Signed-off-by: Koen Aers <[email protected]>
- Add a new Gradle task to generate the Maven wrapper and wire it in the build - Remove the Maven wrapper files from the checked in sources Signed-off-by: Koen Aers <[email protected]>
- Create new gradle task 'RunMavenTask' that can generically execute Maven goals - Redefine the instances of MavenInstallArtifactTask, MavenInvokerRunTask and MavenWrapperTask in MavenEmbedderPlugin to use the above RunMavenTask instead - Remove the unneeded MavenInstallArtifactTask, MavenInvokerRunTask and MavenWrapperTask classes - Use the outcome of the Maven execution to throw an exception if there was an error Signed-off-by: Koen Aers <[email protected]>
Squashed and applied manually. Thanks! |
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-18644