Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/maven-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,19 @@ jobs:
steps:
- name: Checkout Source
uses: actions/checkout@v4

- name: Setup JDK ${{ matrix.Java }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
cache: maven

- name: Build with Maven
run: mvn --batch-mode --update-snapshots --file pom.xml -Drevision=0.0.1-SNAPSHOT clean install
run: mvn --batch-mode --update-snapshots --file pom.xml -Drevision=0.0.1-SNAPSHOT clean install

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: microsphere-projects/microsphere-java
75 changes: 67 additions & 8 deletions microsphere-java-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
<name>Microsphere :: Java :: Core</name>
<description>Microsphere Java Core</description>

<properties>
<surefire.argLine></surefire.argLine>
</properties>

<dependencies>

<!-- Java API Dependencies -->
Expand Down Expand Up @@ -97,11 +101,24 @@

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.argLine}</argLine>
</configuration>
</plugin>

</plugins>
</build>

<profiles>
<profile>
<id>jigsaw</id>
<id>javax-api</id>
<activation>
<jdk>[1.9,)</jdk>
<jdk>[9,)</jdk>
</activation>
<dependencies>
<!-- Java Common Annotations -->
Expand All @@ -110,21 +127,63 @@
<artifactId>javax.annotation-api</artifactId>
</dependency>
</dependencies>
</profile>

<profile>
<id>jdk9-15</id>
<activation>
<jdk>[9,15]</jdk>
</activation>
<properties>
<surefire.argLine>
--illegal-access=permit
--add-opens java.base/java.lang.invoke=ALL-UNNAMED
</surefire.argLine>
</properties>
</profile>

<profile>
<id>jdk16+</id>
<activation>
<jdk>[16,)</jdk>
</activation>
<properties>
<surefire.argLine>
--add-opens java.base/java.lang.invoke=ALL-UNNAMED
</surefire.argLine>
</properties>
</profile>

<profile>
<id>coverage</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<configuration>
<argLine>
--illegal-access=permit
--add-opens java.base/java.lang.invoke=ALL-UNNAMED
</argLine>
<dataFile>${project.build.directory}/jacoco.exec</dataFile>
</configuration>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

</profiles>

</project>
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.github.microsphere-projects</groupId>
<artifactId>microsphere-build</artifactId>
<version>0.0.21</version>
<version>0.0.22</version>
</parent>

<groupId>io.github.microsphere-projects</groupId>
Expand Down Expand Up @@ -51,7 +51,7 @@
</scm>

<properties>
<revision>0.0.9</revision>
<revision>0.0.10-SNAPSHOT</revision>
</properties>

<modules>
Expand Down
Loading