Skip to content

Commit 87d6de3

Browse files
committed
Upgrade to Java 11 and parent version 2.0
1 parent f91952f commit 87d6de3

File tree

4 files changed

+30
-76
lines changed

4 files changed

+30
-76
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
runs-on: ubuntu-latest
2727
strategy:
2828
matrix:
29-
java: [8, 11, 17, 21]
29+
java: [11, 17, 21]
3030
fail-fast: false
3131
steps:
3232
- uses: actions/checkout@v5
@@ -39,7 +39,7 @@ jobs:
3939
- name: Build with Maven
4040
run: mvn package --file pom.xml -B --no-transfer-progress
4141

42-
native-module:
42+
site:
4343
runs-on: ubuntu-latest
4444
steps:
4545
- uses: actions/checkout@v5
@@ -50,17 +50,4 @@ jobs:
5050
distribution: 'temurin'
5151
cache: 'maven'
5252
- name: Build with Maven
53-
run: mvn package --file pom.xml -B --no-transfer-progress -Pnative-module
54-
55-
site:
56-
runs-on: ubuntu-latest
57-
steps:
58-
- uses: actions/checkout@v5
59-
- name: Set up JDK 8
60-
uses: actions/setup-java@v5
61-
with:
62-
java-version: '8'
63-
distribution: 'temurin'
64-
cache: 'maven'
65-
- name: Build with Maven
66-
run: mvn site --file pom.xml -B --no-transfer-progress
53+
run: mvn package site --file pom.xml -B --no-transfer-progress -DskipTests

.github/workflows/release-site.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ jobs:
2626
runs-on: ubuntu-latest
2727
steps:
2828
- uses: actions/checkout@v5
29-
- name: Set up JDK 8
29+
- name: Set up JDK 11
3030
uses: actions/setup-java@v5
3131
with:
32-
java-version: '8'
32+
java-version: '11'
3333
distribution: 'temurin'
3434
cache: 'maven'
3535
- name: Build site
3636
run: |
37-
mvn site --file pom.xml -B --no-transfer-progress
37+
mvn package site --file pom.xml -B --no-transfer-progress -DskipTests
3838
for i in `grep '<module>.*</module>' pom.xml`; do
3939
module=`echo $i | sed 's~<module>\(.*\)</module>~\1~g'`
4040
echo "Moving site for module $module to target/site"

pom.xml

Lines changed: 21 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,12 @@
2222
<parent>
2323
<groupId>com.github.robtimus</groupId>
2424
<artifactId>robtimus-parent</artifactId>
25-
<version>1.18</version>
25+
<version>2.0</version>
2626
<relativePath />
2727
</parent>
2828

2929
<artifactId>try-parse</artifactId>
30-
<version>1.2-SNAPSHOT</version>
30+
<version>2.0-SNAPSHOT</version>
3131
<packaging>jar</packaging>
3232

3333
<name>try-parse</name>
@@ -61,6 +61,10 @@
6161
<url>https://github.com/robtimus/try-parse/issues</url>
6262
</issueManagement>
6363

64+
<properties>
65+
<version.java>11</version.java>
66+
</properties>
67+
6468
<dependencies>
6569
<dependency>
6670
<groupId>org.junit.jupiter</groupId>
@@ -91,6 +95,13 @@
9195
<plugin>
9296
<groupId>org.apache.maven.plugins</groupId>
9397
<artifactId>maven-dependency-plugin</artifactId>
98+
<executions>
99+
<execution>
100+
<goals>
101+
<goal>properties</goal>
102+
</goals>
103+
</execution>
104+
</executions>
94105
</plugin>
95106

96107
<plugin>
@@ -118,11 +129,6 @@
118129
<artifactId>maven-javadoc-plugin</artifactId>
119130
</plugin>
120131

121-
<plugin>
122-
<groupId>org.moditect</groupId>
123-
<artifactId>moditect-maven-plugin</artifactId>
124-
</plugin>
125-
126132
<plugin>
127133
<groupId>com.github.robtimus</groupId>
128134
<artifactId>build-helper-maven-plugin</artifactId>
@@ -147,6 +153,14 @@
147153
<plugin>
148154
<groupId>org.apache.maven.plugins</groupId>
149155
<artifactId>maven-surefire-plugin</artifactId>
156+
<configuration>
157+
<argLine>
158+
@{argLine}
159+
-javaagent:${org.mockito:mockito-core:jar}
160+
<!-- Allow JUnit to fully access the test classes -->
161+
--add-opens com.github.robtimus.tryparse/com.github.robtimus.tryparse=ALL-UNNAMED
162+
</argLine>
163+
</configuration>
150164
</plugin>
151165

152166
<plugin>
@@ -185,54 +199,4 @@
185199
</plugin>
186200
</plugins>
187201
</build>
188-
189-
<profiles>
190-
<profile>
191-
<id>native-module</id>
192-
<properties>
193-
<version.java>11</version.java>
194-
</properties>
195-
<build>
196-
<plugins>
197-
<plugin>
198-
<groupId>org.apache.maven.plugins</groupId>
199-
<artifactId>maven-surefire-plugin</artifactId>
200-
<configuration>
201-
<!-- Allow JUnit to fully access the test classes -->
202-
<argLine>
203-
@{argLine}
204-
--add-opens com.github.robtimus.tryparse/com.github.robtimus.tryparse=ALL-UNNAMED
205-
</argLine>
206-
</configuration>
207-
</plugin>
208-
209-
<plugin>
210-
<groupId>org.moditect</groupId>
211-
<artifactId>moditect-maven-plugin</artifactId>
212-
<configuration>
213-
<skip>true</skip>
214-
</configuration>
215-
</plugin>
216-
217-
<plugin>
218-
<groupId>org.codehaus.mojo</groupId>
219-
<artifactId>build-helper-maven-plugin</artifactId>
220-
<executions>
221-
<execution>
222-
<phase>generate-sources</phase>
223-
<goals>
224-
<goal>add-source</goal>
225-
</goals>
226-
<configuration>
227-
<sources>
228-
<source>${project.basedir}/src/moditect</source>
229-
</sources>
230-
</configuration>
231-
</execution>
232-
</executions>
233-
</plugin>
234-
</plugins>
235-
</build>
236-
</profile>
237-
</profiles>
238202
</project>

src/moditect/module-info.java renamed to src/main/java/module-info.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
* limitations under the License.
1616
*/
1717

18+
/**
19+
* Provides functionality to parse to Optional and its primitive versions.
20+
*/
1821
module com.github.robtimus.tryparse {
1922
exports com.github.robtimus.tryparse;
2023
}

0 commit comments

Comments
 (0)