Skip to content

Commit c03ed0c

Browse files
authored
Make changes to remove relativepath from child modules like core java (#15535)
* Make changes to remove relativepath from child modules like core java * Change some version numbers to minimize changes * Fix tests * Make the test more generic so that we dont have to hard code strings as it will require change every new year
1 parent c606fc8 commit c03ed0c

10 files changed

Lines changed: 77 additions & 4 deletions

File tree

core-java-modules/core-java-15/pom.xml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<version>0.0.1-SNAPSHOT</version>
1414
</parent>
1515

16+
1617
<dependencies>
1718
<dependency>
1819
<groupId>org.apache.commons</groupId>
@@ -26,4 +27,25 @@
2627
</dependency>
2728
</dependencies>
2829

30+
<build>
31+
<plugins>
32+
<plugin>
33+
<groupId>org.apache.maven.plugins</groupId>
34+
<artifactId>maven-compiler-plugin</artifactId>
35+
<configuration>
36+
<release>${maven.compiler.release}</release>
37+
<source>${maven.compiler.source.version}</source>
38+
<target>${maven.compiler.target.version}</target>
39+
</configuration>
40+
</plugin>
41+
</plugins>
42+
</build>
43+
44+
<properties>
45+
<maven.compiler.source.version>17</maven.compiler.source.version>
46+
<maven.compiler.target.version>17</maven.compiler.target.version>
47+
<maven.compiler.release>17</maven.compiler.release>
48+
<surefire.plugin.version>3.0.0-M5</surefire.plugin.version>
49+
</properties>
50+
2951
</project>

core-java-modules/core-java-date-operations-3/src/test/java/com/baeldung/firstandlastdayofyear/FirstAndLastDayOfYearUnitTest.java

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,13 @@ public void givenCurrentDate_whenGettingFirstAndLastDayOfYear_thenCorrectDatesRe
2121
LocalDate firstDay = today.with(firstDayOfYear());
2222
LocalDate lastDay = today.with(lastDayOfYear());
2323

24-
assertEquals("2023-01-01", firstDay.toString());
25-
assertEquals("2023-12-31", lastDay.toString());
24+
assertEquals(today.getYear(), firstDay.getYear());
25+
assertEquals(1, firstDay.getMonthValue());
26+
assertEquals(1, firstDay.getDayOfMonth());
27+
28+
assertEquals(today.getYear(), lastDay.getYear());
29+
assertEquals(12, lastDay.getMonthValue());
30+
assertEquals(31, lastDay.getDayOfMonth());
2631
}
2732

2833
@Test

core-java-modules/java-spi/exchange-rate-api/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.baeldung</groupId>
67
<artifactId>exchange-rate-api</artifactId>
78
<name>exchange-rate-api</name>
89
<packaging>jar</packaging>

core-java-modules/java-spi/exchange-rate-impl/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>exchange-rate-impl</artifactId>
7+
<groupId>com.baeldung</groupId>
78
<name>exchange-rate-impl</name>
89
<packaging>jar</packaging>
910

core-java-modules/java-spi/pom.xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
55
<modelVersion>4.0.0</modelVersion>
6+
<groupId>com.baeldung</groupId>
67
<artifactId>java-spi</artifactId>
78
<name>java-spi</name>
9+
<version>1.0.0-SNAPSHOT</version>
810
<packaging>pom</packaging>
911

1012
<parent>

core-java-modules/pom.xml

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
<groupId>com.baeldung.core-java-modules</groupId>
77
<artifactId>core-java-modules</artifactId>
88
<name>core-java-modules</name>
9+
<version>0.0.1-SNAPSHOT</version>
910
<packaging>pom</packaging>
1011

1112
<parent>
1213
<groupId>com.baeldung</groupId>
1314
<artifactId>parent-modules</artifactId>
1415
<version>1.0.0-SNAPSHOT</version>
15-
<relativePath>..</relativePath>
1616
</parent>
1717

1818
<modules>
@@ -215,6 +215,29 @@
215215
<module>java-websocket</module>
216216
</modules>
217217

218+
<dependencies>
219+
<dependency>
220+
<groupId>com.google.guava</groupId>
221+
<artifactId>guava</artifactId>
222+
<version>${guava.version}</version>
223+
</dependency>
224+
<dependency>
225+
<groupId>org.openjdk.jmh</groupId>
226+
<artifactId>jmh-core</artifactId>
227+
<version>${jmh-core.version}</version>
228+
</dependency>
229+
<dependency>
230+
<groupId>commons-io</groupId>
231+
<artifactId>commons-io</artifactId>
232+
<version>${commons-io.version}</version>
233+
</dependency>
234+
</dependencies>
235+
236+
<properties>
237+
<maven.compiler.source>17</maven.compiler.source>
238+
<maven.compiler.target>17</maven.compiler.target>
239+
</properties>
240+
218241
<dependencyManagement>
219242
<dependencies>
220243
<dependency>

guava-modules/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>guava-modules</artifactId>
77
<name>guava-modules</name>
8+
<version>0.0.1-SNAPSHOT</version>
89
<packaging>pom</packaging>
910

1011
<parent>

jackson-modules/jackson-custom-conversions/src/test/java/com/baeldung/defaultserializercustomserializer/CallingDefaultSerializerUnitTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import java.util.List;
1212
import java.util.Map;
1313

14+
import com.fasterxml.jackson.core.exc.StreamConstraintsException;
1415
import org.junit.Before;
1516
import org.junit.Test;
1617

@@ -115,7 +116,7 @@ public void givenFolder_whenSerializedWithInternalObjectMapper_onlyNameAndFilesF
115116

116117
}
117118

118-
@Test(expected = StackOverflowError.class)
119+
@Test(expected = StreamConstraintsException.class)
119120
public void givenFolder_whenSerializedWithCallingOwnSerializer_exceptionOccured() throws IOException {
120121

121122
SimpleModule module = new SimpleModule();

jackson-modules/pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<artifactId>jackson-modules</artifactId>
77
<name>jackson-modules</name>
8+
<version>0.0.1-SNAPSHOT</version>
89
<packaging>pom</packaging>
910

1011
<parent>
@@ -31,6 +32,16 @@
3132
<artifactId>jackson-dataformat-xml</artifactId>
3233
<version>${jackson.version}</version>
3334
</dependency>
35+
<dependency>
36+
<groupId>com.google.guava</groupId>
37+
<artifactId>guava</artifactId>
38+
<version>${guava.version}</version>
39+
</dependency>
40+
<dependency>
41+
<groupId>commons-io</groupId>
42+
<artifactId>commons-io</artifactId>
43+
<version>${commons-io.version}</version>
44+
</dependency>
3445
</dependencies>
3546

3647
</project>

rxjava-modules/pom.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<groupId>com.baeldung.rxjava-modules</groupId>
77
<artifactId>rxjava-modules</artifactId>
88
<name>rxjava-modules</name>
9+
<version>0.0.1-SNAPSHOT</version>
910
<packaging>pom</packaging>
1011

1112
<parent>
@@ -48,6 +49,11 @@
4849
<artifactId>awaitility</artifactId>
4950
<version>${awaitility.version}</version>
5051
</dependency>
52+
<dependency>
53+
<groupId>com.google.guava</groupId>
54+
<artifactId>guava</artifactId>
55+
<version>${guava.version}</version>
56+
</dependency>
5157
</dependencies>
5258

5359
<properties>

0 commit comments

Comments
 (0)