Skip to content
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

HSEARCH-4928 Rename hibernate-search-mapper-orm-coordination-outbox-polling to something shorter #3749

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ Here are some notable sub-directories:
and do the work of converting between user entities and documents to be indexed.
* `pojo-base`: Contains base classes and APIs that are re-used in other POJO-based mapper.
* `orm`: A mapper for [Hibernate ORM](http://hibernate.org/orm/) entities.
* `orm-coordination-outbox-polling`: An implementation of indexing coordination between nodes
* `orm-outbox-polling`: An implementation of indexing coordination between nodes
in the orm mapper (see above) using an outbox, i.e. an event table in the database.
* `pojo-standalone`: A mapper for POJOs in standalone mode, i.e. without Hibernate ORM.
Currently incubating, i.e. backwards-incompatible changes in APIs may happen.
Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ stage('Non-default environments') {
-pl !integrationtest/v5migrationhelper/orm \
-pl !integrationtest/java/modules/orm-lucene \
-pl !integrationtest/java/modules/orm-elasticsearch \
-pl !integrationtest/java/modules/orm-coordination-outbox-polling-elasticsearch \
-pl !integrationtest/java/modules/orm-outbox-polling-elasticsearch \
'''
String mavenDockerArgs = ""
def startedContainers = false
Expand Down
16 changes: 16 additions & 0 deletions bom/public/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,27 @@
<artifactId>hibernate-search-mapper-orm-jakarta-batch-jberet</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-outbox-polling</artifactId>
<version>${project.version}</version>
</dependency>
<!-- Relocation artifacts: -->
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-coordination-outbox-polling</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-batch-jsr352-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-batch-jsr352-jberet</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public final class ConfigurationRules {
"org.hibernate.search.backend.lucene.cfg.LuceneBackendSettings#TYPE_NAME",
"org.hibernate.search.backend.lucene.cfg.LuceneIndexSettings#SHARDS",
"org.hibernate.search.mapper.orm.cfg.HibernateOrmMapperSettings#COORDINATION",
"org.hibernate.search.mapper.orm.coordination.outboxpolling.cfg.HibernateOrmMapperOutboxPollingSettings#COORDINATION_STRATEGY_NAME",
"org.hibernate.search.mapper.orm.outboxpolling.cfg.HibernateOrmMapperOutboxPollingSettings#COORDINATION_STRATEGY_NAME",
"org.hibernate.search.engine.cfg.EngineSettings#BACKEND",
"org.hibernate.search.engine.cfg.EngineSettings#BACKENDS",
"org.hibernate.search.engine.cfg.BackendSettings#INDEXES"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import static org.hibernate.search.build.enforcer.MavenProjectUtils.DEPLOY_SKIP;
import static org.hibernate.search.build.enforcer.MavenProjectUtils.isAnyParentPublicParent;
import static org.hibernate.search.build.enforcer.MavenProjectUtils.isAnyParentRelocationParent;
import static org.hibernate.search.build.enforcer.MavenProjectUtils.isProjectDeploySkipped;

import java.util.ArrayList;
Expand Down Expand Up @@ -43,23 +44,27 @@ public void execute() throws EnforcerRuleException {

for ( MavenProject project : session.getAllProjects() ) {
boolean publicParent = isAnyParentPublicParent( project );
boolean relocationParent = isAnyParentRelocationParent( project );
boolean shouldBePublished = publicParent || relocationParent;
boolean deploySkipped = isProjectDeploySkipped( project );
if ( dependencies.remove( project.getArtifactId() ) == null ) {
// The project is NOT in the dependencies

if ( publicParent && !deploySkipped ) {
if ( shouldBePublished && !deploySkipped ) {
problems.add( "`" + project.getGroupId() + ":" + project.getArtifactId()
+ "` is missing from the dependency management section." );
}
}
else {
// The project IS in the dependencies

if ( !publicParent || deploySkipped ) {
if ( !shouldBePublished || deploySkipped ) {
problems.add( "`" + project.getGroupId() + ":" + project.getArtifactId()
+ "` either is misconfigured, or it is not published so it should not be in the dependency management section:"
+ " [parents include '" + MavenProjectUtils.HIBERNATE_SEARCH_PARENT_PUBLIC
+ "' = " + publicParent
+ " [parents include '" + MavenProjectUtils.HIBERNATE_SEARCH_PARENT_RELOCATION
+ "' = " + relocationParent
+ ", Maven property '" + DEPLOY_SKIP + "' = " + deploySkipped + "]" );
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ public class MavenProjectUtils {

public static final String HIBERNATE_SEARCH_PARENT_PUBLIC = "hibernate-search-parent-public";
public static final String HIBERNATE_SEARCH_PARENT_INTEGRATION_TEST = "hibernate-search-parent-integrationtest";
public static final String HIBERNATE_SEARCH_PARENT_RELOCATION = "hibernate-search-parent-relocation";
public static final String DEPLOY_SKIP = "deploy.skip";

private MavenProjectUtils() {
Expand All @@ -20,7 +21,13 @@ private MavenProjectUtils() {
public static boolean isAnyParentPublicParent(MavenProject project) {
return project.hasParent()
&& ( HIBERNATE_SEARCH_PARENT_PUBLIC.equals( project.getParent().getArtifactId() )
|| isAnyParentPublicParent( project.getParent() ) );
|| isAnyParentPublicParent( project.getParent() ) );
}

public static boolean isAnyParentRelocationParent(MavenProject project) {
return project.hasParent()
&& ( HIBERNATE_SEARCH_PARENT_RELOCATION.equals( project.getParent().getArtifactId() )
|| isAnyParentRelocationParent( project.getParent() ) );
}

public static boolean isAnyParentIntegrationTestParent(MavenProject project) {
Expand Down
2 changes: 1 addition & 1 deletion build/jqassistant/rules/rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@
WHEN 'hibernate-search-mapper-pojo-base' THEN 'Pojo'
WHEN 'hibernate-search-mapper-pojo-standalone' THEN 'StandalonePojo'
WHEN 'hibernate-search-mapper-orm' THEN 'HibernateOrm'
WHEN 'hibernate-search-mapper-orm-coordination-outbox-polling' THEN 'OutboxPolling'
WHEN 'hibernate-search-mapper-orm-outbox-polling' THEN 'OutboxPolling'
WHEN 'hibernate-search-mapper-orm-jakarta-batch-jberet' THEN 'JBeret'
ELSE 'UNKNOWN-MODULE-SPECIFIC-KEYWORD-PLEASE-UPDATE-JQASSISTANT-RULES'
END
Expand Down
10 changes: 8 additions & 2 deletions build/parents/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -321,9 +321,15 @@
<artifactId>hibernate-search-mapper-orm-jakarta-batch-jberet</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-outbox-polling</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-coordination-outbox-polling</artifactId>
<type>pom</type>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -628,7 +634,7 @@
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-mapper-orm-coordination-outbox-polling</artifactId>
<artifactId>hibernate-search-integrationtest-mapper-orm-outbox-polling</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand All @@ -643,7 +649,7 @@
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-java-modules-orm-coordination-outbox-polling-elasticsearch</artifactId>
<artifactId>hibernate-search-integrationtest-java-modules-orm-outbox-polling-elasticsearch</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
Expand Down
40 changes: 40 additions & 0 deletions build/parents/relocation/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Hibernate Search, full-text search for your domain model
~
~ License: GNU Lesser General Public License (LGPL), version 2.1 or later
~ See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-parent</artifactId>
<version>7.0.0-SNAPSHOT</version>
<relativePath>../../..</relativePath>
</parent>
<artifactId>hibernate-search-parent-relocation</artifactId>
<packaging>pom</packaging>

<name>Hibernate Search Parent POM for Relocation Artifacts</name>
<description>Common build configuration for all relocation artifacts</description>

<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<configuration>
<!-- Keep dependency management -->
<flattenMode>bom</flattenMode>
<pomElements>
<!-- But not properties, they are not useful in a bom -->
<properties>remove</properties>
<distributionManagement>keep</distributionManagement>
</pomElements>
</configuration>
</plugin>
</plugins>
</build>
</project>
6 changes: 3 additions & 3 deletions build/reports/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-coordination-outbox-polling</artifactId>
<artifactId>hibernate-search-mapper-orm-outbox-polling</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
Expand Down Expand Up @@ -140,7 +140,7 @@
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-mapper-orm-coordination-outbox-polling</artifactId>
<artifactId>hibernate-search-integrationtest-mapper-orm-outbox-polling</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -292,7 +292,7 @@
<dependencies>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-java-modules-orm-coordination-outbox-polling-elasticsearch</artifactId>
<artifactId>hibernate-search-integrationtest-java-modules-orm-outbox-polling-elasticsearch</artifactId>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
4 changes: 2 additions & 2 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-coordination-outbox-polling</artifactId>
<artifactId>hibernate-search-mapper-orm-outbox-polling</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -171,7 +171,7 @@
${basedir}/../backend/elasticsearch-aws/src/main/java;
${basedir}/../backend/lucene/src/main/java;
${basedir}/../mapper/lucene/src/main/java;
${basedir}/../mapper/orm-coordination-outbox-polling/src/main/java;
${basedir}/../mapper/orm-outbox-polling/src/main/java;
${basedir}/../mapper/orm-jakarta-batch/core/src/main/java;
</sourcepath>
<docfilessubdirs>true</docfilessubdirs>
Expand Down
4 changes: 2 additions & 2 deletions distribution/src/main/assembly/dist.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@
</includes>
</dependencySet>
<dependencySet>
<outputDirectory>dist/mapper/orm/coordination-outbox-polling</outputDirectory>
<outputDirectory>dist/mapper/orm/outbox-polling</outputDirectory>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<useTransitiveDependencies>true</useTransitiveDependencies>
<useTransitiveFiltering>true</useTransitiveFiltering>
<useStrictFiltering>true</useStrictFiltering>
<includes>
<include>org.hibernate.search:hibernate-search-mapper-orm-coordination-outbox-polling</include>
<include>org.hibernate.search:hibernate-search-mapper-orm-outbox-polling</include>
</includes>
</dependencySet>
<dependencySet>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-backen
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-backend-elasticsearch-spi.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-backend-elasticsearch-aws-spi.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-mapper-orm-spi.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-mapper-orm-coordination-outbox-polling-spi.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-mapper-orm-outbox-polling-spi.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-mapper-pojo-standalone-spi.adoc[opts=optional]
6 changes: 6 additions & 0 deletions documentation/src/main/asciidoc/migration/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,12 @@ This also means that the corresponding Java module names and packages are also u
* The core module is now named `org.hibernate.search.jakarta.batch.core` and the base package for this module is `org.hibernate.search.jakarta.batch.core`
* The JBeret module is now named `org.hibernate.search.jakarta.batch.jberet` and the base package for this module is `org.hibernate.search.jakarta.batch.jberet`

Outbox polling for Hibernate ORM artifact is getting a shorter name: `hibernate-search-mapper-orm-outbox-polling`.
For most of the users this should only be the change in the dependencies, unless some setting keys from `HibernateOrmMapperOutboxPollingSettings`
where referenced in the code, then an import update will be required as well.
The corresponding Java module name and base package are updated to:

* The module is now named `org.hibernate.search.mapper.orm.outboxpolling` and the base package for this module is `org.hibernate.search.mapper.orm.outboxpolling`

[[data-format]]
== Data format and schema changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ When <<mapper-orm,integrating with Hibernate ORM>>::
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-coordination-outbox-polling</artifactId>
<artifactId>hibernate-search-mapper-orm-outbox-polling</artifactId>
<version>{hibernateSearchVersion}</version>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-backen
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-backend-elasticsearch.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-backend-elasticsearch-aws.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-mapper-orm.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-mapper-orm-coordination-outbox-polling.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-mapper-orm-outbox-polling.adoc[opts=optional]
include::{documentationConfigPropertiesOutputDirectory}/_hibernate-search-mapper-pojo-standalone.adoc[opts=optional]
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ You will also need to add this dependency:
----
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-coordination-outbox-polling</artifactId>
<artifactId>hibernate-search-mapper-orm-outbox-polling</artifactId>
<version>{hibernateSearchVersion}</version>
</dependency>
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<version>7.0.0-SNAPSHOT</version>
<relativePath>../../..</relativePath>
</parent>
<artifactId>hibernate-search-integrationtest-java-modules-orm-coordination-outbox-polling-elasticsearch</artifactId>
<artifactId>hibernate-search-integrationtest-java-modules-orm-outbox-polling-elasticsearch</artifactId>
<packaging>jar</packaging>

<name>Hibernate Search ITs - Java - Modules - ORM/Elasticsearch outbox polling</name>
Expand Down Expand Up @@ -41,7 +41,7 @@

<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-mapper-orm-coordination-outbox-polling</artifactId>
<artifactId>hibernate-search-mapper-orm-outbox-polling</artifactId>
</dependency>

<!-- Only needed here so we can require it in module info for Avro -->
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
module org.hibernate.search.integrationtest.java.module.orm.elasticsearch.coordination.outboxpolling {
exports org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.coordination.outboxpolling.service;
opens org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.coordination.outboxpolling.entity to
module org.hibernate.search.integrationtest.java.module.orm.elasticsearch.outboxpolling {
exports org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.outboxpolling.service;
opens org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.outboxpolling.entity to
org.hibernate.orm.core,
/*
* TODO HSEARCH-4302 This part of the "opens" directive ideally should not be necessary.
* Hopefully we should be able to ask for a MethodHandles.Lookup instance from Hibernate ORM
* and take advantage of the fact the package is already open to Hibernate ORM?
*/
org.hibernate.search.mapper.orm;
opens org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.coordination.outboxpolling.config to
opens org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.outboxpolling.config to
org.hibernate.search.engine; // For reflective instantiation of the analysis configurer

requires jakarta.persistence;
requires org.hibernate.orm.core;
requires org.hibernate.search.mapper.orm;
requires org.hibernate.search.backend.elasticsearch;
requires org.hibernate.search.mapper.orm.coordination.outboxpolling;
requires org.hibernate.search.mapper.orm.outboxpolling;

/*
* This is necessary in order to use SessionFactory,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* License: GNU Lesser General Public License (LGPL), version 2.1 or later
* See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
*/
package org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.coordination.outboxpolling.config;
package org.hibernate.search.integrationtest.java.modules.orm.elasticsearch.outboxpolling.config;

import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurationContext;
import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurer;
Expand Down
Loading
Loading