Skip to content

Commit

Permalink
Add jlink integration test (#75)
Browse files Browse the repository at this point in the history
* add jlink integration test

* end file with newline

* end file with proper newline
  • Loading branch information
mtf90 authored Feb 25, 2024
1 parent 484d3bf commit ab89037
Show file tree
Hide file tree
Showing 21 changed files with 203 additions and 18 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
$GITHUB_WORKSPACE/.github/install-ltsmin.sh
echo "$HOME/ltsmin/${{ env.LTSMIN_VERSION }}/bin" >> $GITHUB_PATH
- name: Run Maven
run: mvn -B install site -Pcode-analysis,bundles
run: mvn -B install site -Pcode-analysis,bundles,jlink
platform-integration:
name: "Platform Integration (JDK: ${{ matrix.jdk }}, OS: ${{ matrix.os }})"
needs: [ tests-and-analysis ]
Expand All @@ -64,7 +64,7 @@ jobs:
key: cache-platform-integration-${{ matrix.jdk }}-${{ hashFiles('**/pom.xml') }}
restore-keys: cache-platform-integration-${{ matrix.jdk }}-
- name: Run Maven
run: mvn -B install
run: mvn -B install -Pjlink
coverage:
name: "Coverage"
needs: [ platform-integration ]
Expand Down
5 changes: 3 additions & 2 deletions adapters/brics/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,11 @@
*/
open module net.automatalib.brics {

requires automaton;
requires net.automatalib.api;
requires org.checkerframework.checker.qual;

requires static automaton;
// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.brics;
}
3 changes: 2 additions & 1 deletion api/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@

requires net.automatalib.common.smartcollection;
requires net.automatalib.common.util;
requires org.checkerframework.checker.qual;
requires org.slf4j;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;
requires static org.kohsuke.metainf_services;

exports net.automatalib;
Expand Down
4 changes: 3 additions & 1 deletion commons/smartcollections/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
open module net.automatalib.common.smartcollection {

requires net.automatalib.common.util;
requires org.checkerframework.checker.qual;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.common.smartcollection;
}
4 changes: 3 additions & 1 deletion commons/util/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@
*/
open module net.automatalib.common.util {

requires org.checkerframework.checker.qual;
requires org.slf4j;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.common.util;
exports net.automatalib.common.util.array;
exports net.automatalib.common.util.collection;
Expand Down
4 changes: 3 additions & 1 deletion core/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
requires net.automatalib.api;
requires net.automatalib.common.smartcollection;
requires net.automatalib.common.util;
requires org.checkerframework.checker.qual;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.alphabet.impl;
exports net.automatalib.automaton.base;
Expand Down
24 changes: 24 additions & 0 deletions distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,30 @@ limitations under the License.
</dependencies>

<profiles>
<profile>
<id>jlink</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<configuration>
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
<settingsFile>${project.basedir}/src/it/settings.xml</settingsFile>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>code-coverage</id>
<build>
Expand Down
76 changes: 76 additions & 0 deletions distribution/src/it/jlink/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="utf-8" ?>
<!--
Copyright (C) 2013-2024 TU Dortmund University
This file is part of AutomataLib, http://www.automatalib.net/.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>net.automatalib</groupId>
<artifactId>automata-parent</artifactId>
<version>@project.version@</version>
<relativePath>../../../../pom.xml</relativePath>
</parent>

<groupId>net.automatalib.it</groupId>
<artifactId>automata-jlink</artifactId>

<dependencies>
<dependency>
<groupId>net.automatalib.distribution</groupId>
<artifactId>automata-distribution</artifactId>
<type>pom</type>
<!-- skip non-modular dependencies -->
<exclusions>
<exclusion>
<groupId>net.automatalib</groupId>
<artifactId>automata-brics</artifactId>
</exclusion>
<exclusion>
<groupId>net.automatalib</groupId>
<artifactId>automata-modelchecking-m3c</artifactId>
</exclusion>
<exclusion>
<groupId>net.automatalib</groupId>
<artifactId>automata-jung-visualizer</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jlink-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<classifier>distribution</classifier>
<noHeaderFiles>true</noHeaderFiles>
<noManPages>true</noManPages>
<stripDebug>true</stripDebug>
</configuration>
<executions>
<execution>
<goals>
<goal>jlink</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
51 changes: 51 additions & 0 deletions distribution/src/it/settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<?xml version="1.0"?>
<!--
Copyright (C) 2013-2024 TU Dortmund University
This file is part of AutomataLib, http://www.automatalib.net/.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<settings>
<profiles>
<profile>
<id>it-repo</id>
<repositories>
<repository>
<id>local.central</id>
<url>@localRepositoryUrl@</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>local.central</id>
<url>@localRepositoryUrl@</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<activeProfile>it-repo</activeProfile>
</activeProfiles>
</settings>
2 changes: 2 additions & 0 deletions examples/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@
requires org.slf4j;

requires static automaton;
// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;
}
4 changes: 3 additions & 1 deletion incremental/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@
requires net.automatalib.api;
requires net.automatalib.common.util;
requires net.automatalib.util;
requires org.checkerframework.checker.qual;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.incremental;
exports net.automatalib.incremental.dfa;
Expand Down
3 changes: 2 additions & 1 deletion modelchecking/ltsmin/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,11 @@
requires net.automatalib.serialization.fsm;
requires net.automatalib.serialization.etf;
requires net.automatalib.util;
requires org.checkerframework.checker.qual;
requires org.slf4j;

requires static de.learnlib.tooling.annotation;
// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.modelchecker.ltsmin;
exports net.automatalib.modelchecker.ltsmin.ltl;
Expand Down
4 changes: 3 additions & 1 deletion modelchecking/m3c/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@
requires net.automatalib.api;
requires net.automatalib.common.util;
requires net.automatalib.core;
requires org.checkerframework.checker.qual;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.modelchecker.m3c.formula;
exports net.automatalib.modelchecker.m3c.formula.ctl;
Expand Down
8 changes: 8 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,7 @@ limitations under the License.
<gpg-plugin.version>3.1.0</gpg-plugin.version>
<info-reports-plugin.version>3.4.5</info-reports-plugin.version>
<install-plugin.version>3.1.1</install-plugin.version>
<invoker-plugin.version>3.6.0</invoker-plugin.version>
<jacoco-plugin.version>0.8.8</jacoco-plugin.version>
<jar-plugin.version>3.3.0</jar-plugin.version>
<javacc-plugin.version>3.0.1</javacc-plugin.version>
Expand Down Expand Up @@ -468,6 +469,8 @@ limitations under the License.
<groupId>org.checkerframework</groupId>
<artifactId>checker-qual</artifactId>
<version>${checkerframework.version}</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>

<!-- JUNG dependencies -->
Expand Down Expand Up @@ -838,6 +841,11 @@ limitations under the License.
<artifactId>maven-install-plugin</artifactId>
<version>${install-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-invoker-plugin</artifactId>
<version>${invoker-plugin.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tidy-maven-plugin</artifactId>
Expand Down
4 changes: 3 additions & 1 deletion serialization/dot/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
requires net.automatalib.api;
requires net.automatalib.common.util;
requires net.automatalib.core;
requires org.checkerframework.checker.qual;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.serialization.dot;
}
4 changes: 3 additions & 1 deletion serialization/fsm/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
requires net.automatalib.api;
requires net.automatalib.common.util;
requires net.automatalib.core;
requires org.checkerframework.checker.qual;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.serialization.fsm.parser;
}
4 changes: 3 additions & 1 deletion serialization/saf/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
requires net.automatalib.api;
requires net.automatalib.common.util;
requires net.automatalib.core;
requires org.checkerframework.checker.qual;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.serialization.saf;
}
4 changes: 3 additions & 1 deletion serialization/taf/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@
requires net.automatalib.api;
requires net.automatalib.common.util;
requires net.automatalib.core;
requires org.checkerframework.checker.qual;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.serialization.taf;
exports net.automatalib.serialization.taf.parser;
Expand Down
3 changes: 2 additions & 1 deletion util/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
requires net.automatalib.common.util;
requires net.automatalib.common.smartcollection;
requires net.automatalib.core;
requires org.checkerframework.checker.qual;

requires static de.learnlib.tooling.annotation;
// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;

exports net.automatalib.util.automaton;
exports net.automatalib.util.automaton.ads;
Expand Down
3 changes: 2 additions & 1 deletion visualization/dot-visualizer/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,10 @@
requires net.automatalib.api;
requires net.automatalib.common.util;
requires net.automatalib.serialization.dot;
requires org.checkerframework.checker.qual;
requires org.slf4j;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;
requires static org.kohsuke.metainf_services;

exports net.automatalib.visualization.dot;
Expand Down
3 changes: 2 additions & 1 deletion visualization/jung-visualizer/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@
requires jung.visualization;
requires net.automatalib.api;
requires net.automatalib.common.util;
requires org.checkerframework.checker.qual;
requires org.slf4j;

// make non-static once https://github.com/typetools/checker-framework/issues/4559 is implemented
requires static org.checkerframework.checker.qual;
requires static org.kohsuke.metainf_services;

exports net.automatalib.visualization.jung;
Expand Down

0 comments on commit ab89037

Please sign in to comment.