Skip to content

Commit

Permalink
Merge pull request #38327 from FroMage/panache-marker-removal-docs
Browse files Browse the repository at this point in the history
Updated docs for Panache marker removal
  • Loading branch information
FroMage committed Jan 22, 2024
2 parents 06b3cd2 + 61eec1e commit 6f16104
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 68 deletions.
36 changes: 5 additions & 31 deletions docs/src/main/asciidoc/hibernate-orm-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1412,36 +1412,10 @@ That's all there is to it: with Panache, Hibernate ORM has never looked so trim

== Defining entities in external projects or jars

Hibernate ORM with Panache relies on compile-time bytecode enhancements to your entities.
Hibernate ORM with Panache in Quarkus relies on compile-time bytecode enhancements to your entities. If you define your entities in the
same project where you build your Quarkus application, everything will work fine.

It attempts to identify archives with Panache entities (and consumers of Panache entities)
by the presence of the marker file `META-INF/panache-archive.marker`. Panache includes an
annotation processor that will automatically create this file in archives that depend on
Panache (even indirectly). If you have disabled annotation processors you may need to create
this file manually in some cases.
If the entities come from external projects
or jars, you can make sure that your jar is treated like a Quarkus application library by adding an empty `META-INF/beans.xml` file.

WARNING: If you include the jpa-modelgen annotation processor this will exclude the Panache
annotation processor by default. If you do this you should either create the marker file
yourself, or add the `quarkus-panache-common` as well, as shown below:

[source,xml]
----
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</annotationProcessorPath>
<annotationProcessorPath>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-panache-common</artifactId>
<version>${quarkus.platform.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
----
This will allow Quarkus to index and enhance your entities as if they were inside the current project.
36 changes: 5 additions & 31 deletions docs/src/main/asciidoc/hibernate-reactive-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1173,36 +1173,10 @@ That's all there is to it: with Panache, Hibernate Reactive has never looked so

== Defining entities in external projects or jars

Hibernate Reactive with Panache relies on compile-time bytecode enhancements to your entities.
Hibernate Reactive with Panache relies on compile-time bytecode enhancements to your entities. If you define your entities in the
same project where you build your Quarkus application, everything will work fine.

It attempts to identify archives with Panache entities (and consumers of Panache entities)
by the presence of the marker file `META-INF/panache-archive.marker`. Panache includes an
annotation processor that will automatically create this file in archives that depend on
Panache (even indirectly). If you have disabled annotation processors you may need to create
this file manually in some cases.
If the entities come from external projects
or jars, you can make sure that your jar is treated like a Quarkus application library by adding an empty `META-INF/beans.xml` file.

WARNING: If you include the jpa-modelgen annotation processor this will exclude the Panache
annotation processor by default. If you do this you should either create the marker file
yourself, or add the `quarkus-panache-common` as well, as shown below:

[source,xml]
----
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler-plugin.version}</version>
<configuration>
<annotationProcessorPaths>
<annotationProcessorPath>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<version>${hibernate.version}</version>
</annotationProcessorPath>
<annotationProcessorPath>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-panache-common</artifactId>
<version>${quarkus.platform.version}</version>
</annotationProcessorPath>
</annotationProcessorPaths>
</configuration>
</plugin>
----
This will allow Quarkus to index and enhance your entities as if they were inside the current project.
12 changes: 6 additions & 6 deletions docs/src/main/asciidoc/mongodb-panache.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -1254,13 +1254,13 @@ That's all there is to it: with Panache, MongoDB has never looked so trim and ne

== Defining entities in external projects or jars

MongoDB with Panache relies on compile-time bytecode enhancements to your entities.
MongoDB with Panache relies on compile-time bytecode enhancements to your entities. If you define your entities in the
same project where you build your Quarkus application, everything will work fine.

It attempts to identity archives with Panache entities (and consumers of Panache entities)
by the presence of the marker file `META-INF/panache-archive.marker`. Panache includes an
annotation processor that will automatically create this file in archives that depend on
Panache (even indirectly). If you have disabled annotation processors you may need to create
this file manually in some cases.
If the entities come from external projects
or jars, you can make sure that your jar is treated like a Quarkus application library by adding an empty `META-INF/beans.xml` file.

This will allow Quarkus to index and enhance your entities as if they were inside the current project.

== Multitenancy

Expand Down

0 comments on commit 6f16104

Please sign in to comment.