Skip to content

Commit 988b799

Browse files
committed
Scope the tests.
This way, the JUnit dependencies do not leak into the main codebase.
1 parent e1fff60 commit 988b799

File tree

5 files changed

+19
-4
lines changed

5 files changed

+19
-4
lines changed

com.ibm.wala.cast.python.jython.test/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<groupId>${project.groupId}</groupId>
2323
<artifactId>com.ibm.wala.cast.python.test</artifactId>
2424
<version>${project.version}</version>
25+
<type>test-jar</type>
26+
<scope>test</scope>
2527
</dependency>
2628
<dependency>
2729
<groupId>com.ibm.wala</groupId>
@@ -60,7 +62,6 @@
6062
<artifactId>maven-surefire-plugin</artifactId>
6163
</plugin>
6264
</plugins>
63-
<sourceDirectory>test-source</sourceDirectory>
6465
<testSourceDirectory>test-source</testSourceDirectory>
6566
</build>
6667
</project>

com.ibm.wala.cast.python.jython3.test/pom.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
<groupId>${project.groupId}</groupId>
2323
<artifactId>com.ibm.wala.cast.python.test</artifactId>
2424
<version>${project.version}</version>
25+
<type>test-jar</type>
26+
<scope>test</scope>
2527
</dependency>
2628
<dependency>
2729
<groupId>com.ibm.wala</groupId>
@@ -68,7 +70,6 @@
6870
<artifactId>maven-surefire-plugin</artifactId>
6971
</plugin>
7072
</plugins>
71-
<sourceDirectory>test-source</sourceDirectory>
7273
<testSourceDirectory>test-source</testSourceDirectory>
7374
</build>
7475
</project>

com.ibm.wala.cast.python.ml.test/pom.xml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,14 @@
1212
<groupId>${project.groupId}</groupId>
1313
<artifactId>com.ibm.wala.cast.python.jython3.test</artifactId>
1414
<version>0.40.0-SNAPSHOT</version>
15+
<scope>test</scope>
1516
</dependency>
1617
<dependency>
1718
<groupId>${project.groupId}</groupId>
1819
<artifactId>com.ibm.wala.cast.python.test</artifactId>
1920
<version>${project.version}</version>
21+
<type>test-jar</type>
22+
<scope>test</scope>
2023
</dependency>
2124
<dependency>
2225
<groupId>${project.groupId}</groupId>
@@ -60,7 +63,6 @@
6063
<artifactId>maven-surefire-plugin</artifactId>
6164
</plugin>
6265
</plugins>
63-
<sourceDirectory>source</sourceDirectory>
6466
<testSourceDirectory>source</testSourceDirectory>
6567
</build>
6668
</project>

com.ibm.wala.cast.python.test/pom.xml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,18 @@
7676
<groupId>org.apache.maven.plugins</groupId>
7777
<artifactId>maven-surefire-plugin</artifactId>
7878
</plugin>
79+
<plugin>
80+
<groupId>org.apache.maven.plugins</groupId>
81+
<artifactId>maven-jar-plugin</artifactId>
82+
<executions>
83+
<execution>
84+
<goals>
85+
<goal>test-jar</goal>
86+
</goals>
87+
</execution>
88+
</executions>
89+
</plugin>
7990
</plugins>
80-
<sourceDirectory>source</sourceDirectory>
8191
<testSourceDirectory>source</testSourceDirectory>
8292
</build>
8393
</project>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@
8383
<groupId>junit</groupId>
8484
<artifactId>junit</artifactId>
8585
<version>${junit.4.version}</version>
86+
<scope>test</scope>
8687
</dependency>
8788
<dependency>
8889
<groupId>org.python</groupId>

0 commit comments

Comments
 (0)