-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-17157 - Some improvements to the metamodel generator documentation
Signed-off-by: Jan Schatteman <jschatte@redhat.com>
- Loading branch information
Showing
6 changed files
with
77 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...mentation/src/main/asciidoc/userguide/chapters/tooling/extras/maven-example-metamodel.pom
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<build> | ||
<plugins> | ||
[...] | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>...</version> | ||
<configuration> | ||
<annotationProcessorPaths> | ||
<path> | ||
<groupId>org.hibernate.orm</groupId> | ||
<artifactId>hibernate-jpamodelgen</artifactId> | ||
<version>$currentHibernateVersion</version> | ||
<!-- Optionally exclude transitive dependencies --> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>org.sample</groupId> | ||
<artifactId>sample-dependency</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</path> | ||
</annotationProcessorPaths> | ||
</configuration> | ||
</plugin> | ||
[...] | ||
</plugins> | ||
</build> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 22 additions & 4 deletions
26
documentation/src/main/asciidoc/userguide/chapters/tooling/maven.adoc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,34 @@ | ||
[[tooling-maven]] | ||
=== Maven Plugin | ||
=== Maven | ||
|
||
The following sections illustrate how both <<tooling-maven-enhancement,bytecode enhancement>> and <<tooling-maven-modelgen,metamodel generation>> capabilities can be integrated into Maven builds. | ||
|
||
[[tooling-maven-enhancement]] | ||
==== Bytecode Enhancement | ||
|
||
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 the <<tooling-gradle>> for details | ||
build. See the section on <<BytecodeEnhancement>> for details | ||
on the configuration settings. By default, all enhancements are disabled. | ||
|
||
|
||
.Apply the Maven plugin | ||
.Apply the Bytecode Enhancement plugin | ||
==== | ||
[source,xml] | ||
---- | ||
include::extras/maven-example.pom[] | ||
---- | ||
==== | ||
==== | ||
|
||
[[tooling-maven-modelgen]] | ||
==== Static Metamodel Generation | ||
|
||
The recommended way to integrate the metamodel generation into a maven project is through the annotation processor paths of the maven compiler plugin (roughly equivalent to how the generator is integrated in a gradle project). | ||
|
||
.Integrate the metamodel generator | ||
==== | ||
[source,xml] | ||
---- | ||
include::extras/maven-example-metamodel.pom[] | ||
---- | ||
==== |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters