JAVA-4583 Fix failing tests in the tutorials-default-jdk9-and-above job

This commit is contained in:
mikr 2021-04-13 15:45:01 +02:00
parent 440152b0ba
commit d788363e65
9 changed files with 55 additions and 5 deletions

View File

@ -17,7 +17,7 @@
<dependencies>
<dependency>
<groupId>com.baeldung.servicemodule</groupId>
<artifactId>servicemodule</artifactId>
<artifactId>servicemodule1</artifactId>
<version>${servicemodule.version}</version>
</dependency>
</dependencies>

View File

@ -6,9 +6,15 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung.decoupling-pattern1</groupId>
<artifactId>decoupling-pattern1</artifactId>
<version>1.0</version>
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>com.baeldung.core-java-modules</groupId>
<artifactId>core-java-jpms</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modules>
<module>servicemodule</module>
<module>consumermodule</module>

View File

@ -5,7 +5,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung.servicemodule</groupId>
<artifactId>servicemodule</artifactId>
<artifactId>servicemodule1</artifactId>
<packaging>jar</packaging>
<parent>

View File

@ -32,6 +32,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin.version}</version>
<configuration>
<source>${source.version}</source>
<target>${target.version}</target>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -9,6 +9,12 @@
<version>1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>com.baeldung.core-java-modules</groupId>
<artifactId>core-java-jpms</artifactId>
<version>0.0.1-SNAPSHOT</version>
</parent>
<modules>
<module>servicemodule</module>
<module>providermodule</module>

View File

@ -27,6 +27,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin.version}</version>
<configuration>
<source>${source.version}</source>
<target>${target.version}</target>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -5,7 +5,7 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung.servicemodule</groupId>
<artifactId>servicemodule</artifactId>
<artifactId>servicemodule2</artifactId>
<version>1.0</version>
<parent>
@ -19,6 +19,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin.version}</version>
<configuration>
<source>${source.version}</source>
<target>${target.version}</target>
</configuration>
</plugin>
</plugins>
</build>

View File

@ -20,4 +20,26 @@
<module>decoupling-pattern2</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin.version}</version>
<configuration>
<source>${source.version}</source>
<target>${target.version}</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<properties>
<compiler.plugin.version>3.8.0</compiler.plugin.version>
<source.version>11</source.version>
<target.version>11</target.version>
</properties>
</project>

View File

@ -101,7 +101,8 @@ class ProcessUnderstandingUnitTest {
.replace("/", File.separator));
BufferedReader output = new BufferedReader(new InputStreamReader(process.getInputStream()));
int value = Integer.parseInt(output.readLine());
String line = output.readLine();
int value = Integer.parseInt(line);
assertEquals(3, value);
}