Skip to content

Commit bc93a5c

Browse files
authored
SCALA-185: Rename the test folder and add the scope to dependencies a… (#1280)
* SCALA-185: Rename the test folder and add the scope to dependencies at the module level. * SCALA-185: Improve the poms to reduce repetition * SCALA-185: Improve the poms to reduce repetition
1 parent 9427d04 commit bc93a5c

File tree

4 files changed

+48
-39
lines changed

4 files changed

+48
-39
lines changed

scala-with-maven/hello-rest/pom.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@
1919
<groupId>org.scala-lang</groupId>
2020
<artifactId>scala3-library_3</artifactId>
2121
</dependency>
22-
<dependency>
23-
<groupId>org.scalatest</groupId>
24-
<artifactId>scalatest_3</artifactId>
25-
</dependency>
2622
<dependency>
2723
<groupId>org.typelevel</groupId>
2824
<artifactId>cats-effect_3</artifactId>
29-
<version>3.5.4</version> <!-- Use the latest version -->
25+
<version>3.5.4</version>
3026
</dependency>
3127
<dependency>
3228
<groupId>org.http4s</groupId>

scala-with-maven/hello-world/pom.xml

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
<artifactId>hello-world</artifactId>
1515

16-
1716
<dependencies>
1817
<dependency>
1918
<groupId>org.scala-lang</groupId>
@@ -29,42 +28,12 @@
2928
</dependencies>
3029

3130
<build>
32-
<sourceDirectory>src/main/scala</sourceDirectory>
33-
<testSourceDirectory>src/tests/scala</testSourceDirectory>
3431
<plugins>
35-
<plugin>
36-
<groupId>net.alchim31.maven</groupId>
37-
<artifactId>scala-maven-plugin</artifactId>
38-
<version>4.8.1</version>
39-
<configuration>
40-
<recompileMode>incremental</recompileMode>
41-
<scalaVersion>${scala.version}</scalaVersion>
42-
<javacArgs>
43-
<javacArg>-Xlint:unchecked</javacArg>
44-
<javacArg>-Xlint:deprecation</javacArg>
45-
</javacArgs>
46-
</configuration>
47-
<executions>
48-
<execution>
49-
<goals>
50-
<goal>compile</goal>
51-
<goal>testCompile</goal>
52-
</goals>
53-
</execution>
54-
</executions>
55-
</plugin>
5632
<plugin>
5733
<groupId>org.scalatest</groupId>
5834
<artifactId>scalatest-maven-plugin</artifactId>
59-
<version>2.2.0</version>
60-
<executions>
61-
<execution>
62-
<goals>
63-
<goal>test</goal>
64-
</goals>
65-
</execution>
66-
</executions>
67-
</plugin>
35+
</plugin>
6836
</plugins>
6937
</build>
38+
7039
</project>

scala-with-maven/pom.xml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
<groupId>org.scalatest</groupId>
2626
<artifactId>scalatest_3</artifactId>
2727
<version>3.2.18</version>
28-
<scope>test</scope>
2928
</dependency>
3029
</dependencies>
3130
</dependencyManagement>
@@ -34,4 +33,49 @@
3433
<module>hello-world</module>
3534
<module>hello-rest</module>
3635
</modules>
36+
37+
<build>
38+
<sourceDirectory>src/main/scala</sourceDirectory>
39+
<testSourceDirectory>src/test/scala</testSourceDirectory>
40+
<pluginManagement>
41+
<plugins>
42+
<plugin>
43+
<groupId>org.scalatest</groupId>
44+
<artifactId>scalatest-maven-plugin</artifactId>
45+
<version>2.2.0</version>
46+
<executions>
47+
<execution>
48+
<goals>
49+
<goal>test</goal>
50+
</goals>
51+
</execution>
52+
</executions>
53+
</plugin>
54+
</plugins>
55+
</pluginManagement>
56+
<plugins>
57+
<plugin>
58+
<groupId>net.alchim31.maven</groupId>
59+
<artifactId>scala-maven-plugin</artifactId>
60+
<version>4.8.1</version>
61+
<configuration>
62+
<recompileMode>incremental</recompileMode>
63+
<scalaVersion>${scala.version}</scalaVersion>
64+
<javacArgs>
65+
<javacArg>-Xlint:unchecked</javacArg>
66+
<javacArg>-Xlint:deprecation</javacArg>
67+
</javacArgs>
68+
</configuration>
69+
<executions>
70+
<execution>
71+
<goals>
72+
<goal>compile</goal>
73+
<goal>testCompile</goal>
74+
</goals>
75+
</execution>
76+
</executions>
77+
</plugin>
78+
</plugins>
79+
</build>
80+
3781
</project>

0 commit comments

Comments
 (0)