Skip to content

Commit

Permalink
HSEARCH-5160 Move all Lucene 10 stuff to a subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
marko-bekhta committed Nov 27, 2024
1 parent 577dabb commit 6b5d4f6
Show file tree
Hide file tree
Showing 538 changed files with 2,088 additions and 56 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@
public class MavenProjectUtils {

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

private MavenProjectUtils() {
}

public static boolean isAnyParentPublicParent(MavenProject project) {
return project.hasParent()
return !HIBERNATE_SEARCH_PARENT_PUBLIC_LUCENE10.equals( project.getArtifactId() )
&& project.hasParent()
&& ( HIBERNATE_SEARCH_PARENT_PUBLIC.equals( project.getParent().getArtifactId() )
|| HIBERNATE_SEARCH_PARENT_PUBLIC_LUCENE10.equals( project.getParent().getArtifactId() )
|| isAnyParentPublicParent( project.getParent() ) );
}

Expand All @@ -31,6 +35,7 @@ public static boolean isAnyParentRelocationParent(MavenProject project) {
public static boolean isAnyParentIntegrationTestParent(MavenProject project) {
return project.hasParent()
&& ( HIBERNATE_SEARCH_PARENT_INTEGRATION_TEST.equals( project.getParent().getArtifactId() )
|| HIBERNATE_SEARCH_PARENT_INTEGRATION_TEST_LUCENE10.equals( project.getParent().getArtifactId() )
|| isAnyParentIntegrationTestParent( project.getParent() ) );
}

Expand Down
46 changes: 41 additions & 5 deletions build/parents/build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
<javadoc.org.apache.lucene.queryparser.url>https://lucene.apache.org/core/${javadoc.org.apache.lucene.tag}/queryparser/</javadoc.org.apache.lucene.queryparser.url>

<version.com.carrotsearch.hppc>0.10.0</version.com.carrotsearch.hppc>
<version.org.apache.lucene10>10.0.0</version.org.apache.lucene10>

<!-- >>> Elasticsearch -->
<!-- The version of the Elasticsearch client used by Hibernate Search, independently of the version of the remote cluster -->
Expand Down Expand Up @@ -581,11 +582,6 @@
<artifactId>hibernate-search-util-internal-integrationtest-backend-lucene</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-util-internal-integrationtest-backend-lucene10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-util-internal-integrationtest-mapper-stub</artifactId>
Expand Down Expand Up @@ -722,6 +718,46 @@
<artifactId>hibernate-search-integrationtest-java-modules-pojo-standalone-lucene</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-backend-lucene10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-mapper-pojo-standalone-realbackend-lucene10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-mapper-orm-realbackend-lucene10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-mapper-orm-jakarta-batch-lucene10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-showcase-library-lucene10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-java-modules-orm-lucene-lucene10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-java-modules-pojo-standalone-lucene-lucene10</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-documentation-lucene10</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Test -->
<dependency>
Expand Down
33 changes: 33 additions & 0 deletions build/reports/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,39 @@
<artifactId>hibernate-search-documentation</artifactId>
<scope>test</scope>
</dependency>
<!-- All Lucene 10 things: -->
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-backend-lucene10</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-mapper-pojo-standalone-realbackend-lucene10</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-mapper-orm-realbackend-lucene10</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-mapper-orm-jakarta-batch-lucene10</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-showcase-library-lucene10</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-java-modules-orm-lucene-lucene10</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-integrationtest-java-modules-pojo-standalone-lucene-lucene10</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-documentation-lucene10</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.hibernate.search.documentation.testsupport.DocumentationSetupHelper;
import org.hibernate.search.mapper.orm.Search;
import org.hibernate.search.mapper.orm.session.SearchSession;
import org.hibernate.search.util.impl.integrationtest.backend.lucene.TotalHitsUtils;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -99,7 +100,7 @@ void lowLevel() {
assertThat( sort.getSort()[0].getType() ).isEqualTo( SortField.Type.CUSTOM );

assertThat( topDocs ).isNotNull();
assertThat( topDocs.totalHits.value ).isEqualTo( 2L );
assertThat( TotalHitsUtils.value( topDocs.totalHits ) ).isEqualTo( 2L );
assertThat( topDocs.scoreDocs ).hasSize( 2 );
} );
}
Expand Down
13 changes: 13 additions & 0 deletions lucene10/ant-copy-sources.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
SPDX-License-Identifier: Apache-2.0
Copyright Red Hat Inc. and Hibernate Authors
-->
<project>
<target name="copy">
<!-- https://ant.apache.org/manual/Tasks/copy.html -->
<copy todir="${transform.output.root.path}" failonerror="false" overwrite="true">
<fileset dir="${transform.original.path}/src/"/>
</copy>
</target>
</project>
44 changes: 1 addition & 43 deletions backend/lucene10/pom.xml → lucene10/backend/lucene/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.hibernate.search</groupId>
<artifactId>hibernate-search-parent-public</artifactId>
<artifactId>hibernate-search-parent-public-lucene10</artifactId>
<version>8.0.0-SNAPSHOT</version>
<relativePath>../../build/parents/public</relativePath>
</parent>
Expand All @@ -19,51 +19,9 @@
<deploy.skip>false</deploy.skip>
<java.module.name>org.hibernate.search.backend.lucene</java.module.name>

<version.org.apache.lucene>10.0.0</version.org.apache.lucene>
<java-version.main.release>21</java-version.main.release>
</properties>

<dependencyManagement>
<dependencies>
<!-- Lucene backend -->
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>${version.org.apache.lucene}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analysis-common</artifactId>
<version>${version.org.apache.lucene}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>${version.org.apache.lucene}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-join</artifactId>
<version>${version.org.apache.lucene}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-facet</artifactId>
<version>${version.org.apache.lucene}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId>
<version>${version.org.apache.lucene}</version>
</dependency>
<dependency>
<groupId>com.carrotsearch</groupId>
<artifactId>hppc</artifactId>
<version>${version.com.carrotsearch.hppc}</version>
</dependency>
</dependencies>
</dependencyManagement>

<dependencies>
<dependency>
<groupId>org.hibernate.search</groupId>
Expand Down
Loading

0 comments on commit 6b5d4f6

Please sign in to comment.