Merge pull request #10654 from Maiklins/JAVA-4583-Fix_failing_tests_in_the_tutorials-default-jdk9-and-above_job

Java 4583 fix failing tests in the tutorials default jdk9 and above job
This commit is contained in:
Loredana Crusoveanu 2021-04-14 13:52:34 +03:00 committed by GitHub
commit 70f1967c28
9 changed files with 55 additions and 5 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -27,6 +27,11 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin.version}</version>
<configuration>
<source>${source.version}</source>
<target>${target.version}</target>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </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"> 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> <modelVersion>4.0.0</modelVersion>
<groupId>com.baeldung.servicemodule</groupId> <groupId>com.baeldung.servicemodule</groupId>
<artifactId>servicemodule</artifactId> <artifactId>servicemodule2</artifactId>
<version>1.0</version> <version>1.0</version>
<parent> <parent>
@ -19,6 +19,11 @@
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId> <artifactId>maven-compiler-plugin</artifactId>
<version>${compiler.plugin.version}</version>
<configuration>
<source>${source.version}</source>
<target>${target.version}</target>
</configuration>
</plugin> </plugin>
</plugins> </plugins>
</build> </build>

View File

@ -20,4 +20,26 @@
<module>decoupling-pattern2</module> <module>decoupling-pattern2</module>
</modules> </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> </project>

View File

@ -101,7 +101,8 @@ class ProcessUnderstandingUnitTest {
.replace("/", File.separator)); .replace("/", File.separator));
BufferedReader output = new BufferedReader(new InputStreamReader(process.getInputStream())); 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); assertEquals(3, value);
} }