Skip to content

Commit 7411bf9

Browse files
author
Maksim Kostromin
committed
Update Maven wrapper up to 3.9.4 version. Add quarkus-jpastreamer project.
1 parent d655d0b commit 7411bf9

File tree

11 files changed

+527
-1
lines changed

11 files changed

+527
-1
lines changed

.github/workflows/ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,35 @@ name: CI
22
on: [push]
33
env:
44
JDK_11_VERSION: 11
5+
JDK_17_VERSION: 17
56
jobs:
7+
quarkus-jpastreamer:
8+
runs-on: ubuntu-latest
9+
name: quarkus-jpastreamer maven jvm 17
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/cache@v3
13+
id: java-cache
14+
with:
15+
path: |
16+
./.n
17+
./.m2
18+
./.docker
19+
~/.m2/repository
20+
!~/.m2/repository/daggerok
21+
!~/.m2/repository/com/github/daggerok
22+
key: ${{ runner.os }}-${{ hashFiles('**/pom.xml', '**/gradle.*', '**/*.gradle') }}
23+
- uses: actions/setup-java@v3
24+
with:
25+
distribution: 'temurin'
26+
java-version: ${{ env.JDK_17_VERSION }}
27+
- run: docker run -d --rm --platform=linux/amd64 --name restsql-mysql-sakila -p 3306:3306 restsql/mysql-sakila
28+
- run: sleep 30 ; docker ps
29+
- run: ./mvnw -f quarkus-jpastreamer clean package
30+
#- run: sudo apt-get install --fix-missing httpie
31+
#- run: cd $GITHUB_WORKSPACE/reactive-qute && ./mvnw docker:build docker:start
32+
#- run: http get :8080
33+
#- run: cd $GITHUB_WORKSPACE/reactive-qute && ./mvnw docker:stop docker:remove
634
reactive-qute-maven-linux-jvm-build:
735
runs-on: ubuntu-latest
836
name: reactive-qute maven jvm 11

.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,43 @@ out/
88
*.ipr
99
*.iws
1010
*.log*
11+
12+
#Maven
13+
pom.xml.tag
14+
pom.xml.releaseBackup
15+
pom.xml.versionsBackup
16+
release.properties
17+
.flattened-pom.xml
18+
19+
# Eclipse
20+
.project
21+
.classpath
22+
.settings/
23+
bin/
24+
25+
# IntelliJ
26+
.idea
27+
*.ipr
28+
*.iml
29+
*.iws
30+
31+
# NetBeans
32+
nb-configuration.xml
33+
34+
# Visual Studio Code
35+
.vscode
36+
.factorypath
37+
38+
# Vim
39+
*.swp
40+
*.swo
41+
42+
# patch
43+
*.orig
44+
*.rej
45+
46+
# Local environment
47+
.env
48+
49+
# Plugin directory
50+
.quarkus/cli/plugins/

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.4/apache-maven-3.9.4-bin.zip
1818
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

quarkus-jpastreamer/.dockerignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
*
2+
!target/*-runner
3+
!target/*-runner.jar
4+
!target/lib/*
5+
!target/quarkus-app/*

quarkus-jpastreamer/README.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# quarkus-jpastreamer
2+
3+
```bash
4+
docker run -it --rm --platform=linux/amd64 --name restsql-mysql-sakila -p 3306:3306 restsql/mysql-sakila
5+
6+
```
7+
8+
<!--
9+
10+
This project uses Quarkus, the Supersonic Subatomic Java Framework.
11+
12+
If you want to learn more about Quarkus, please visit its website: https://quarkus.io/ .
13+
14+
## Running the application in dev mode
15+
16+
You can run your application in dev mode that enables live coding using:
17+
```shell script
18+
./mvnw compile quarkus:dev
19+
```
20+
21+
> **_NOTE:_** Quarkus now ships with a Dev UI, which is available in dev mode only at http://localhost:8080/q/dev/.
22+
23+
## Packaging and running the application
24+
25+
The application can be packaged using:
26+
```shell script
27+
./mvnw package
28+
```
29+
It produces the `quarkus-run.jar` file in the `target/quarkus-app/` directory.
30+
Be aware that it’s not an _über-jar_ as the dependencies are copied into the `target/quarkus-app/lib/` directory.
31+
32+
The application is now runnable using `java -jar target/quarkus-app/quarkus-run.jar`.
33+
34+
If you want to build an _über-jar_, execute the following command:
35+
```shell script
36+
./mvnw package -Dquarkus.package.type=uber-jar
37+
```
38+
39+
The application, packaged as an _über-jar_, is now runnable using `java -jar target/*-runner.jar`.
40+
41+
## Creating a native executable
42+
43+
You can create a native executable using:
44+
```shell script
45+
./mvnw package -Dnative
46+
```
47+
48+
Or, if you don't have GraalVM installed, you can run the native executable build in a container using:
49+
```shell script
50+
./mvnw package -Dnative -Dquarkus.native.container-build=true
51+
```
52+
53+
You can then execute your native executable with: `./target/quarkus-jpastreamer-1.0.0-SNAPSHOT-runner`
54+
55+
If you want to learn more about building native executables, please consult https://quarkus.io/guides/maven-tooling.
56+
57+
## Related Guides
58+
59+
- JPAStreamer ([guide](https://quarkiverse.github.io/quarkiverse-docs/quarkus-jpastreamer/dev/)): Express your Hibernate queries as standard Java Streams
60+
- SmallRye OpenAPI ([guide](https://quarkus.io/guides/openapi-swaggerui)): Document your REST APIs with OpenAPI - comes with Swagger UI
61+
- Hibernate ORM with Panache ([guide](https://quarkus.io/guides/hibernate-orm-panache)): Simplify your persistence code for Hibernate ORM via the active record or the repository pattern
62+
- JDBC Driver - MySQL ([guide](https://quarkus.io/guides/datasource)): Connect to the MySQL database via JDBC
63+
64+
-->

quarkus-jpastreamer/pom.xml

Lines changed: 133 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
<?xml version="1.0"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>io.github.daggerok</groupId>
6+
<artifactId>quarkus-jpastreamer</artifactId>
7+
<version>1.0.0-SNAPSHOT</version>
8+
<properties>
9+
<compiler-plugin.version>3.11.0</compiler-plugin.version>
10+
<maven.compiler.release>17</maven.compiler.release>
11+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
12+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
13+
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
14+
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
15+
<quarkus.platform.version>3.5.0</quarkus.platform.version>
16+
<skipITs>true</skipITs>
17+
<surefire-plugin.version>3.1.2</surefire-plugin.version>
18+
</properties>
19+
<dependencyManagement>
20+
<dependencies>
21+
<dependency>
22+
<groupId>${quarkus.platform.group-id}</groupId>
23+
<artifactId>${quarkus.platform.artifact-id}</artifactId>
24+
<version>${quarkus.platform.version}</version>
25+
<type>pom</type>
26+
<scope>import</scope>
27+
</dependency>
28+
</dependencies>
29+
</dependencyManagement>
30+
<dependencies>
31+
<dependency>
32+
<groupId>io.quarkus</groupId>
33+
<artifactId>quarkus-resteasy-reactive-jackson</artifactId>
34+
</dependency>
35+
<dependency>
36+
<groupId>io.quarkiverse.jpastreamer</groupId>
37+
<artifactId>quarkus-jpastreamer</artifactId>
38+
<version>3.0.3.Final</version>
39+
</dependency>
40+
<dependency>
41+
<groupId>io.quarkus</groupId>
42+
<artifactId>quarkus-smallrye-openapi</artifactId>
43+
</dependency>
44+
<dependency>
45+
<groupId>io.quarkus</groupId>
46+
<artifactId>quarkus-hibernate-orm-panache</artifactId>
47+
</dependency>
48+
<dependency>
49+
<groupId>io.quarkus</groupId>
50+
<artifactId>quarkus-jdbc-mysql</artifactId>
51+
</dependency>
52+
<dependency>
53+
<groupId>io.quarkus</groupId>
54+
<artifactId>quarkus-arc</artifactId>
55+
</dependency>
56+
<dependency>
57+
<groupId>io.quarkus</groupId>
58+
<artifactId>quarkus-junit5</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
</dependencies>
62+
<build>
63+
<plugins>
64+
<plugin>
65+
<groupId>${quarkus.platform.group-id}</groupId>
66+
<artifactId>quarkus-maven-plugin</artifactId>
67+
<version>${quarkus.platform.version}</version>
68+
<extensions>true</extensions>
69+
<executions>
70+
<execution>
71+
<goals>
72+
<goal>build</goal>
73+
<goal>generate-code</goal>
74+
<goal>generate-code-tests</goal>
75+
</goals>
76+
</execution>
77+
</executions>
78+
</plugin>
79+
<plugin>
80+
<artifactId>maven-compiler-plugin</artifactId>
81+
<version>${compiler-plugin.version}</version>
82+
<configuration>
83+
<compilerArgs>
84+
<arg>-parameters</arg>
85+
</compilerArgs>
86+
</configuration>
87+
</plugin>
88+
<plugin>
89+
<artifactId>maven-surefire-plugin</artifactId>
90+
<version>${surefire-plugin.version}</version>
91+
<configuration>
92+
<systemPropertyVariables>
93+
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
94+
<maven.home>${maven.home}</maven.home>
95+
</systemPropertyVariables>
96+
</configuration>
97+
</plugin>
98+
<plugin>
99+
<artifactId>maven-failsafe-plugin</artifactId>
100+
<version>${surefire-plugin.version}</version>
101+
<executions>
102+
<execution>
103+
<goals>
104+
<goal>integration-test</goal>
105+
<goal>verify</goal>
106+
</goals>
107+
<configuration>
108+
<systemPropertyVariables>
109+
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
110+
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
111+
<maven.home>${maven.home}</maven.home>
112+
</systemPropertyVariables>
113+
</configuration>
114+
</execution>
115+
</executions>
116+
</plugin>
117+
</plugins>
118+
</build>
119+
<profiles>
120+
<profile>
121+
<id>native</id>
122+
<activation>
123+
<property>
124+
<name>native</name>
125+
</property>
126+
</activation>
127+
<properties>
128+
<skipITs>false</skipITs>
129+
<quarkus.package.type>native</quarkus.package.type>
130+
</properties>
131+
</profile>
132+
</profiles>
133+
</project>
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
####
2+
# This Dockerfile is used in order to build a container that runs the Quarkus application in JVM mode
3+
#
4+
# Before building the container image run:
5+
#
6+
# ./mvnw package
7+
#
8+
# Then, build the image with:
9+
#
10+
# docker build -f src/main/docker/Dockerfile.jvm -t quarkus/quarkus-jpastreamer-jvm .
11+
#
12+
# Then run the container using:
13+
#
14+
# docker run -i --rm -p 8080:8080 quarkus/quarkus-jpastreamer-jvm
15+
#
16+
# If you want to include the debug port into your docker image
17+
# you will have to expose the debug port (default 5005 being the default) like this : EXPOSE 8080 5005.
18+
# Additionally you will have to set -e JAVA_DEBUG=true and -e JAVA_DEBUG_PORT=*:5005
19+
# when running the container
20+
#
21+
# Then run the container using :
22+
#
23+
# docker run -i --rm -p 8080:8080 quarkus/quarkus-jpastreamer-jvm
24+
#
25+
# This image uses the `run-java.sh` script to run the application.
26+
# This scripts computes the command line to execute your Java application, and
27+
# includes memory/GC tuning.
28+
# You can configure the behavior using the following environment properties:
29+
# - JAVA_OPTS: JVM options passed to the `java` command (example: "-verbose:class")
30+
# - JAVA_OPTS_APPEND: User specified Java options to be appended to generated options
31+
# in JAVA_OPTS (example: "-Dsome.property=foo")
32+
# - JAVA_MAX_MEM_RATIO: Is used when no `-Xmx` option is given in JAVA_OPTS. This is
33+
# used to calculate a default maximal heap memory based on a containers restriction.
34+
# If used in a container without any memory constraints for the container then this
35+
# option has no effect. If there is a memory constraint then `-Xmx` is set to a ratio
36+
# of the container available memory as set here. The default is `50` which means 50%
37+
# of the available memory is used as an upper boundary. You can skip this mechanism by
38+
# setting this value to `0` in which case no `-Xmx` option is added.
39+
# - JAVA_INITIAL_MEM_RATIO: Is used when no `-Xms` option is given in JAVA_OPTS. This
40+
# is used to calculate a default initial heap memory based on the maximum heap memory.
41+
# If used in a container without any memory constraints for the container then this
42+
# option has no effect. If there is a memory constraint then `-Xms` is set to a ratio
43+
# of the `-Xmx` memory as set here. The default is `25` which means 25% of the `-Xmx`
44+
# is used as the initial heap size. You can skip this mechanism by setting this value
45+
# to `0` in which case no `-Xms` option is added (example: "25")
46+
# - JAVA_MAX_INITIAL_MEM: Is used when no `-Xms` option is given in JAVA_OPTS.
47+
# This is used to calculate the maximum value of the initial heap memory. If used in
48+
# a container without any memory constraints for the container then this option has
49+
# no effect. If there is a memory constraint then `-Xms` is limited to the value set
50+
# here. The default is 4096MB which means the calculated value of `-Xms` never will
51+
# be greater than 4096MB. The value of this variable is expressed in MB (example: "4096")
52+
# - JAVA_DIAGNOSTICS: Set this to get some diagnostics information to standard output
53+
# when things are happening. This option, if set to true, will set
54+
# `-XX:+UnlockDiagnosticVMOptions`. Disabled by default (example: "true").
55+
# - JAVA_DEBUG: If set remote debugging will be switched on. Disabled by default (example:
56+
# true").
57+
# - JAVA_DEBUG_PORT: Port used for remote debugging. Defaults to 5005 (example: "8787").
58+
# - CONTAINER_CORE_LIMIT: A calculated core limit as described in
59+
# https://www.kernel.org/doc/Documentation/scheduler/sched-bwc.txt. (example: "2")
60+
# - CONTAINER_MAX_MEMORY: Memory limit given to the container (example: "1024").
61+
# - GC_MIN_HEAP_FREE_RATIO: Minimum percentage of heap free after GC to avoid expansion.
62+
# (example: "20")
63+
# - GC_MAX_HEAP_FREE_RATIO: Maximum percentage of heap free after GC to avoid shrinking.
64+
# (example: "40")
65+
# - GC_TIME_RATIO: Specifies the ratio of the time spent outside the garbage collection.
66+
# (example: "4")
67+
# - GC_ADAPTIVE_SIZE_POLICY_WEIGHT: The weighting given to the current GC time versus
68+
# previous GC times. (example: "90")
69+
# - GC_METASPACE_SIZE: The initial metaspace size. (example: "20")
70+
# - GC_MAX_METASPACE_SIZE: The maximum metaspace size. (example: "100")
71+
# - GC_CONTAINER_OPTIONS: Specify Java GC to use. The value of this variable should
72+
# contain the necessary JRE command-line options to specify the required GC, which
73+
# will override the default of `-XX:+UseParallelGC` (example: -XX:+UseG1GC).
74+
# - HTTPS_PROXY: The location of the https proxy. (example: "myuser@127.0.0.1:8080")
75+
# - HTTP_PROXY: The location of the http proxy. (example: "myuser@127.0.0.1:8080")
76+
# - NO_PROXY: A comma separated lists of hosts, IP addresses or domains that can be
77+
# accessed directly. (example: "foo.example.com,bar.example.com")
78+
#
79+
###
80+
FROM registry.access.redhat.com/ubi8/openjdk-17:1.17
81+
82+
ENV LANGUAGE='en_US:en'
83+
84+
85+
# We make four distinct layers so if there are application changes the library layers can be re-used
86+
COPY --chown=185 target/quarkus-app/lib/ /deployments/lib/
87+
COPY --chown=185 target/quarkus-app/*.jar /deployments/
88+
COPY --chown=185 target/quarkus-app/app/ /deployments/app/
89+
COPY --chown=185 target/quarkus-app/quarkus/ /deployments/quarkus/
90+
91+
EXPOSE 8080
92+
USER 185
93+
ENV JAVA_OPTS_APPEND="-Dquarkus.http.host=0.0.0.0 -Djava.util.logging.manager=org.jboss.logmanager.LogManager"
94+
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
95+
96+
ENTRYPOINT [ "/opt/jboss/container/java/run/run-java.sh" ]
97+

0 commit comments

Comments
 (0)