Skip to content

Commit b6d56c4

Browse files
feat: Spring boot extension native support (#87)
1 parent 9ebea55 commit b6d56c4

File tree

13 files changed

+1207
-4
lines changed

13 files changed

+1207
-4
lines changed

.github/workflows/ci.yml

+65-4
Original file line numberDiff line numberDiff line change
@@ -27,20 +27,81 @@ jobs:
2727
distribution: "temurin"
2828
java-version: ${{ matrix.java-version }}
2929
cache: maven
30-
- name: Build with Maven
30+
- name: Maven tests
3131
run: mvn verify
3232

3333
quarkus-extension:
34+
needs: [ test ]
3435
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
java-version: [ 11, 17 ]
3539
steps:
3640
- uses: actions/checkout@v3
3741
- name: Set up JDK 11
3842
uses: actions/setup-java@v3
3943
with:
40-
java-version: 11
44+
java-version: ${{ matrix.java-version }}
4145
distribution: temurin
4246
cache: maven
43-
- name: Build with Maven
47+
- name: Maven tests
4448
run: mvn -Pnative install
45-
- name: Build with Maven
49+
- name: Maven IT tests
4650
run: mvn -Pnative-image install -f quarkus-extension/integration-tests/
51+
52+
quarkus-supported-v:
53+
needs: [ quarkus-extension ]
54+
runs-on: ubuntu-latest
55+
strategy:
56+
matrix:
57+
quarkus-version: [ 2.14.3.Final, 2.12.3.Final ]
58+
steps:
59+
- uses: actions/checkout@v3
60+
- name: Set up JDK 11
61+
uses: actions/setup-java@v3
62+
with:
63+
java-version: 11
64+
distribution: temurin
65+
cache: maven
66+
- name: Maven tests
67+
run: mvn -Pnative install
68+
- name: Maven IT tests
69+
run: mvn -Pnative-image install -f quarkus-extension/integration-tests/ -Dquarkus.version=${{ matrix.quarkus-version }}
70+
71+
springboot-extension:
72+
needs: [ test ]
73+
runs-on: ubuntu-latest
74+
strategy:
75+
matrix:
76+
java-version: [ 11, 17 ]
77+
steps:
78+
- uses: actions/checkout@v3
79+
- name: Set up JDK 11
80+
uses: actions/setup-java@v3
81+
with:
82+
java-version: ${{ matrix.java-version }}
83+
distribution: temurin
84+
cache: maven
85+
- name: Maven tests
86+
run: mvn install -DskipTests
87+
- name: Maven IT tests
88+
run: mvn install -f spring-boot-extension/integration-tests/
89+
90+
springboot-supported-v:
91+
needs: [ springboot-extension ]
92+
runs-on: ubuntu-latest
93+
strategy:
94+
matrix:
95+
springboot-version: [ 2.7.5, 2.7.0 ]
96+
steps:
97+
- uses: actions/checkout@v3
98+
- name: Set up JDK 11
99+
uses: actions/setup-java@v3
100+
with:
101+
java-version: 11
102+
distribution: temurin
103+
cache: maven
104+
- name: Maven tests
105+
run: mvn install -DskipTests
106+
- name: Maven IT tests
107+
run: mvn install -f spring-boot-extension/integration-tests/ -Dspringboot.version=${{ matrix.springboot-version }}

pom.xml

+2
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
<lombok.version>1.18.26</lombok.version>
4848
<quarkus.version>2.16.3.Final</quarkus.version>
4949
<camel.version>3.20.2</camel.version>
50+
<springboot.version>2.7.9</springboot.version>
5051
</properties>
5152

5253
<url>https://project-openubl.github.io/</url>
@@ -91,6 +92,7 @@
9192
<modules>
9293
<module>core</module>
9394
<module>quarkus-extension</module>
95+
<module>spring-boot-extension</module>
9496
</modules>
9597

9698
<build>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
4+
Copyright 2019 Project OpenUBL, Inc. and/or its affiliates
5+
and other contributors as indicated by the @author tags.
6+
7+
Licensed under the Apache License - 2.0 (the "License");
8+
you may not use this file except in compliance with the License.
9+
You may obtain a copy of the License at
10+
11+
https://www.apache.org/licenses/LICENSE-2.0
12+
13+
Unless required by applicable law or agreed to in writing, software
14+
distributed under the License is distributed on an "AS IS" BASIS,
15+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
See the License for the specific language governing permissions and
17+
limitations under the License.
18+
19+
-->
20+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"
21+
xmlns="http://maven.apache.org/POM/4.0.0"
22+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
23+
<modelVersion>4.0.0</modelVersion>
24+
<parent>
25+
<groupId>io.github.project-openubl</groupId>
26+
<artifactId>spring-boot-xsender-parent</artifactId>
27+
<version>4.1.3-SNAPSHOT</version>
28+
</parent>
29+
<artifactId>spring-boot-xsender-integration-tests</artifactId>
30+
<name>Spring Boot XSender - Integration Tests</name>
31+
<properties>
32+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
33+
<surefire.plugin.version>3.0.0-M4</surefire.plugin.version>
34+
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
35+
</properties>
36+
37+
<dependencies>
38+
<dependency>
39+
<groupId>io.github.project-openubl</groupId>
40+
<artifactId>spring-boot-xsender</artifactId>
41+
<version>${project.version}</version>
42+
</dependency>
43+
44+
<!-- Spring minimum libraries -->
45+
<dependency>
46+
<groupId>org.springframework.boot</groupId>
47+
<artifactId>spring-boot-starter-web</artifactId>
48+
</dependency>
49+
50+
<!-- Test dependencies -->
51+
<dependency>
52+
<groupId>org.springframework.boot</groupId>
53+
<artifactId>spring-boot-starter-test</artifactId>
54+
<scope>test</scope>
55+
</dependency>
56+
<dependency>
57+
<groupId>org.apache.camel</groupId>
58+
<artifactId>camel-test-spring-junit5</artifactId>
59+
<scope>test</scope>
60+
</dependency>
61+
62+
<dependency>
63+
<groupId>io.rest-assured</groupId>
64+
<artifactId>rest-assured</artifactId>
65+
<scope>test</scope>
66+
</dependency>
67+
</dependencies>
68+
<build>
69+
<plugins>
70+
<plugin>
71+
<groupId>org.springframework.boot</groupId>
72+
<artifactId>spring-boot-maven-plugin</artifactId>
73+
<version>${springboot.version}</version>
74+
<executions>
75+
<execution>
76+
<goals>
77+
<goal>repackage</goal>
78+
</goals>
79+
</execution>
80+
</executions>
81+
</plugin>
82+
<plugin>
83+
<groupId>org.apache.maven.plugins</groupId>
84+
<artifactId>maven-surefire-plugin</artifactId>
85+
<version>${surefire.plugin.version}</version>
86+
</plugin>
87+
<plugin>
88+
<groupId>org.apache.maven.plugins</groupId>
89+
<artifactId>maven-compiler-plugin</artifactId>
90+
<version>3.10.1</version>
91+
<configuration>
92+
<release>11</release>
93+
<source>11</source>
94+
<target>11</target>
95+
</configuration>
96+
</plugin>
97+
</plugins>
98+
</build>
99+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright 2019 Project OpenUBL, Inc. and/or its affiliates
3+
* and other contributors as indicated by the @author tags.
4+
*
5+
* Licensed under the Apache License - 2.0 (the "License");
6+
* you may not use this file except in compliance with the License.
7+
* You may obtain a copy of the License at
8+
*
9+
* https://www.apache.org/licenses/LICENSE-2.0
10+
*
11+
* Unless required by applicable law or agreed to in writing, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
package io.github.project.openubl.springboot.xsender.it;
18+
19+
import org.springframework.boot.SpringApplication;
20+
import org.springframework.boot.autoconfigure.SpringBootApplication;
21+
import org.springframework.context.annotation.ComponentScan;
22+
23+
@ComponentScan
24+
@ComponentScan("io.github.project.openubl.spring.xsender.runtime")
25+
@SpringBootApplication
26+
public class Application {
27+
28+
public static void main(String[] args) {
29+
SpringApplication.run(Application.class, args);
30+
}
31+
32+
}

0 commit comments

Comments
 (0)