Skip to content

Commit 3a7c42a

Browse files
committed
hsearch-feature-examples: Upgrade to Quarkus 2.12.2
1 parent 38a1cf5 commit 3a7c42a

File tree

12 files changed

+6
-393
lines changed

12 files changed

+6
-393
lines changed

hibernate-search/hsearch-feature-examples/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
# hsearch-feature-examples
22

3-
## Setting up the environment
4-
5-
Install docker and docker-compose, then run this from the root of the project:
6-
7-
```
8-
docker-compose -f environment-stack.yml -p hsearch-feature-examples up
9-
```
10-
11-
You can later remove the created services and volumes with this command:
12-
13-
```
14-
docker-compose -f environment-stack.yml -p hsearch-feature-examples down -v
15-
```
16-
173
## Running the application
184

195
See the README inside the following three sub-directories, each with a different version of the application:

hibernate-search/hsearch-feature-examples/base/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@ This project uses Quarkus, the Supersonic Subatomic Java Framework.
44

55
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
66

7-
## Setting up the environment
8-
9-
Install docker and docker-compose, then run this from the root of the project:
10-
11-
```shell script
12-
docker-compose -f ../environment-stack.yml -p hsearch-feature-examples up
13-
```
14-
15-
You can later remove the created services and volumes with this command:
16-
17-
```shell script
18-
docker-compose -f ../environment-stack.yml -p hsearch-feature-examples down -v
19-
```
20-
217
## Running the application in dev mode
228

239
You can run your application in dev mode that enables live coding using:

hibernate-search/hsearch-feature-examples/base/pom.xml

Lines changed: 1 addition & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,12 @@
1313
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1414
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
1515
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
16-
<quarkus.platform.version>2.7.0.CR1</quarkus.platform.version>
16+
<quarkus.platform.version>2.12.2.Final</quarkus.platform.version>
1717
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
1818

1919
<mapstruct.version>1.4.1.Final</mapstruct.version>
2020
<lombok.version>1.18.16</lombok.version>
2121
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
22-
23-
<docker-maven-plugin.version>0.34.1</docker-maven-plugin.version>
24-
<test.postgres.run.skip>true</test.postgres.run.skip>
25-
<test.postgres.run.image.name>postgres</test.postgres.run.image.name>
26-
<test.postgres.run.image.tag>13.1</test.postgres.run.image.tag>
2722
</properties>
2823
<dependencyManagement>
2924
<dependencies>
@@ -150,57 +145,6 @@
150145
</systemPropertyVariables>
151146
</configuration>
152147
</plugin>
153-
<plugin>
154-
<groupId>io.fabric8</groupId>
155-
<artifactId>docker-maven-plugin</artifactId>
156-
<version>${docker-maven-plugin.version}</version>
157-
<configuration>
158-
<skip>${test.containers.run.skip}</skip>
159-
<startParallel>true</startParallel>
160-
<images>
161-
<image>
162-
<name>${test.postgres.run.image.name}:${test.postgres.run.image.tag}</name>
163-
<alias>postgres</alias>
164-
<run>
165-
<skip>${test.postgres.run.skip}</skip>
166-
<env>
167-
<POSTGRES_USER>hsearch_feature_examples</POSTGRES_USER>
168-
<POSTGRES_PASSWORD>hsearch_feature_examples</POSTGRES_PASSWORD>
169-
<POSTGRES_DB>hsearch_feature_examples</POSTGRES_DB>
170-
</env>
171-
<ports>
172-
<port>5432:5432</port>
173-
</ports>
174-
<log>
175-
<prefix>PostgreSQL: </prefix>
176-
<date>default</date>
177-
<color>blue</color>
178-
</log>
179-
<wait>
180-
<log>database system is ready to accept connections</log>
181-
</wait>
182-
</run>
183-
</image>
184-
</images>
185-
</configuration>
186-
<executions>
187-
<execution>
188-
<id>docker-start</id>
189-
<phase>process-test-classes</phase>
190-
<goals>
191-
<goal>stop</goal>
192-
<goal>start</goal>
193-
</goals>
194-
</execution>
195-
<execution>
196-
<id>docker-stop</id>
197-
<phase>post-integration-test</phase>
198-
<goals>
199-
<goal>stop</goal>
200-
</goals>
201-
</execution>
202-
</executions>
203-
</plugin>
204148
</plugins>
205149
</build>
206150
<profiles>

hibernate-search/hsearch-feature-examples/base/src/main/resources/application.properties

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
quarkus.ssl.native=false
22

33
quarkus.datasource.db-kind=postgresql
4-
quarkus.datasource.username=hsearch_feature_examples
5-
quarkus.datasource.password=hsearch_feature_examples
6-
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/hsearch_feature_examples
74

8-
quarkus.hibernate-orm.database.generation=drop-and-create
95
quarkus.hibernate-orm.sql-load-script=import.sql
106

117
quarkus.hibernate-orm.fetch.batch-size=20

hibernate-search/hsearch-feature-examples/environment-stack.yml

Lines changed: 0 additions & 68 deletions
This file was deleted.

hibernate-search/hsearch-feature-examples/search-advanced/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@ This project uses Quarkus, the Supersonic Subatomic Java Framework.
44

55
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
66

7-
## Setting up the environment
8-
9-
Install docker and docker-compose, then run this from the root of the project:
10-
11-
```shell script
12-
docker-compose -f ../environment-stack.yml -p hsearch-feature-examples up
13-
```
14-
15-
You can later remove the created services and volumes with this command:
16-
17-
```shell script
18-
docker-compose -f ../environment-stack.yml -p hsearch-feature-examples down -v
19-
```
20-
217
## Running the application in dev mode
228

239
You can run your application in dev mode that enables live coding using:

hibernate-search/hsearch-feature-examples/search-advanced/pom.xml

Lines changed: 1 addition & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,12 @@
1414
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
1515
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
1616
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
17-
<quarkus.platform.version>2.7.0.CR1</quarkus.platform.version>
17+
<quarkus.platform.version>2.12.2.Final</quarkus.platform.version>
1818
<surefire-plugin.version>3.0.0-M5</surefire-plugin.version>
1919

2020
<mapstruct.version>1.4.1.Final</mapstruct.version>
2121
<lombok.version>1.18.16</lombok.version>
2222
<lombok-mapstruct-binding.version>0.2.0</lombok-mapstruct-binding.version>
23-
24-
<docker-maven-plugin.version>0.34.1</docker-maven-plugin.version>
25-
<test.postgres.run.skip>true</test.postgres.run.skip>
26-
<test.postgres.run.image.name>postgres</test.postgres.run.image.name>
27-
<test.postgres.run.image.tag>13.1</test.postgres.run.image.tag>
28-
<test.elasticsearch.run.skip>true</test.elasticsearch.run.skip>
29-
<test.elasticsearch.run.image.name>elastic/elasticsearch</test.elasticsearch.run.image.name>
30-
<test.elasticsearch.run.image.tag>7.16.3</test.elasticsearch.run.image.tag>
3123
</properties>
3224
<dependencyManagement>
3325
<dependencies>
@@ -156,91 +148,6 @@
156148
</systemPropertyVariables>
157149
</configuration>
158150
</plugin>
159-
<plugin>
160-
<groupId>io.fabric8</groupId>
161-
<artifactId>docker-maven-plugin</artifactId>
162-
<version>${docker-maven-plugin.version}</version>
163-
<configuration>
164-
<skip>${test.containers.run.skip}</skip>
165-
<startParallel>true</startParallel>
166-
<images>
167-
<image>
168-
<name>${test.elasticsearch.run.image.name}:${test.elasticsearch.run.image.tag}</name>
169-
<alias>elasticsearch</alias>
170-
<run>
171-
<skip>${test.elasticsearch.run.skip}</skip>
172-
<env>
173-
<logger.level>WARN</logger.level>
174-
<discovery.type>single-node</discovery.type>
175-
<!-- Limit the RAM usage.
176-
Recent versions of ES limit themselves to 50% of the total available RAM,
177-
but on CI this is sometimes too much, as we also have the Maven JVM
178-
and the JVM that runs tests taking up a significant amount of RAM,
179-
leaving too little for filesystem caches and resulting in freezes.
180-
-->
181-
<ES_JAVA_OPTS>-Xms1g -Xmx1g</ES_JAVA_OPTS>
182-
</env>
183-
<ports>
184-
<port>9200:9200</port>
185-
</ports>
186-
<log>
187-
<prefix>Elasticsearch: </prefix>
188-
<date>default</date>
189-
<color>cyan</color>
190-
</log>
191-
<wait>
192-
<http>
193-
<url>http://localhost:9200</url>
194-
<method>GET</method>
195-
<status>200</status>
196-
</http>
197-
<time>20000</time>
198-
</wait>
199-
</run>
200-
</image>
201-
<image>
202-
<name>${test.postgres.run.image.name}:${test.postgres.run.image.tag}</name>
203-
<alias>postgres</alias>
204-
<run>
205-
<skip>${test.postgres.run.skip}</skip>
206-
<env>
207-
<POSTGRES_USER>hsearch_feature_examples</POSTGRES_USER>
208-
<POSTGRES_PASSWORD>hsearch_feature_examples</POSTGRES_PASSWORD>
209-
<POSTGRES_DB>hsearch_feature_examples</POSTGRES_DB>
210-
</env>
211-
<ports>
212-
<port>5432:5432</port>
213-
</ports>
214-
<log>
215-
<prefix>PostgreSQL: </prefix>
216-
<date>default</date>
217-
<color>blue</color>
218-
</log>
219-
<wait>
220-
<log>database system is ready to accept connections</log>
221-
</wait>
222-
</run>
223-
</image>
224-
</images>
225-
</configuration>
226-
<executions>
227-
<execution>
228-
<id>docker-start</id>
229-
<phase>process-test-classes</phase>
230-
<goals>
231-
<goal>stop</goal>
232-
<goal>start</goal>
233-
</goals>
234-
</execution>
235-
<execution>
236-
<id>docker-stop</id>
237-
<phase>post-integration-test</phase>
238-
<goals>
239-
<goal>stop</goal>
240-
</goals>
241-
</execution>
242-
</executions>
243-
</plugin>
244151
</plugins>
245152
</build>
246153
<profiles>

hibernate-search/hsearch-feature-examples/search-advanced/src/main/java/org/hibernate/demos/hsearchfeatureexamples/search/AnalysisConfigurer.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
package org.hibernate.demos.hsearchfeatureexamples.search;
22

3-
import javax.enterprise.context.Dependent;
4-
import javax.inject.Named;
5-
63
import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurationContext;
74
import org.hibernate.search.backend.elasticsearch.analysis.ElasticsearchAnalysisConfigurer;
85

9-
@Dependent
10-
@Named("analysis")
6+
import io.quarkus.hibernate.search.orm.elasticsearch.SearchExtension;
7+
8+
@SearchExtension
119
public class AnalysisConfigurer implements ElasticsearchAnalysisConfigurer {
1210
@Override
1311
public void configure(ElasticsearchAnalysisConfigurationContext context) {

hibernate-search/hsearch-feature-examples/search-advanced/src/main/resources/application.properties

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,12 @@
11
quarkus.ssl.native=false
22

33
quarkus.datasource.db-kind=postgresql
4-
quarkus.datasource.username=hsearch_feature_examples
5-
quarkus.datasource.password=hsearch_feature_examples
6-
quarkus.datasource.jdbc.url=jdbc:postgresql://localhost/hsearch_feature_examples
74

8-
quarkus.hibernate-orm.database.generation=drop-and-create
95
quarkus.hibernate-orm.sql-load-script=import.sql
106

117
quarkus.hibernate-orm.fetch.batch-size=20
128

139
quarkus.hibernate-search-orm.elasticsearch.version=7
14-
quarkus.hibernate-search-orm.elasticsearch.hosts=localhost:9200
15-
quarkus.hibernate-search-orm.elasticsearch.protocol=http
16-
quarkus.hibernate-search-orm.elasticsearch.analysis.configurer=bean:analysis
17-
quarkus.hibernate-search-orm.schema-management.strategy=drop-and-create-and-drop
1810
%test.quarkus.hibernate-search-orm.automatic-indexing.synchronization.strategy=sync
1911

2012
quarkus.hibernate-orm.log.sql=true

hibernate-search/hsearch-feature-examples/search/README.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,6 @@ This project uses Quarkus, the Supersonic Subatomic Java Framework.
44

55
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
66

7-
## Setting up the environment
8-
9-
Install docker and docker-compose, then run this from the root of the project:
10-
11-
```shell script
12-
docker-compose -f ../environment-stack.yml -p hsearch-feature-examples up
13-
```
14-
15-
You can later remove the created services and volumes with this command:
16-
17-
```shell script
18-
docker-compose -f ../environment-stack.yml -p hsearch-feature-examples down -v
19-
```
20-
217
## Running the application in dev mode
228

239
You can run your application in dev mode that enables live coding using:

0 commit comments

Comments
 (0)