File tree Expand file tree Collapse file tree 12 files changed +143
-0
lines changed Expand file tree Collapse file tree 12 files changed +143
-0
lines changed Original file line number Diff line number Diff line change
1
+ invoker.goals =clean test-compile -e -Dmaven.main.skip =true
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+
3
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
5
+ <modelVersion >4.0.0</modelVersion >
6
+
7
+ <groupId >it.scala-maven-plugin</groupId >
8
+ <artifactId >test_skip_test</artifactId >
9
+ <version >1.0-SNAPSHOT</version >
10
+ <name >Test for skipping compilation of test sources</name >
11
+ <description >Test for skipping compilation of test sources</description >
12
+ <packaging >pom</packaging >
13
+ <dependencies >
14
+ <dependency >
15
+ <groupId >org.scala-lang</groupId >
16
+ <artifactId >scala-library</artifactId >
17
+ <version >${scala.version.lastrelease} </version >
18
+ </dependency >
19
+ </dependencies >
20
+
21
+ <build >
22
+ <plugins >
23
+ <plugin >
24
+ <groupId >@project.groupId@</groupId >
25
+ <artifactId >@project.artifactId@</artifactId >
26
+ <version >@project.version@</version >
27
+ <executions >
28
+ <execution >
29
+ <id >scala-compile-first</id >
30
+ <goals >
31
+ <goal >compile</goal >
32
+ </goals >
33
+ </execution >
34
+ <execution >
35
+ <id >scala-test-compile</id >
36
+ <goals >
37
+ <goal >testCompile</goal >
38
+ </goals >
39
+ </execution >
40
+ </executions >
41
+ </plugin >
42
+ </plugins >
43
+ </build >
44
+
45
+ </project >
Original file line number Diff line number Diff line change
1
+ class Main
Original file line number Diff line number Diff line change
1
+ class Test
Original file line number Diff line number Diff line change
1
+ try {
2
+
3
+ def mainFile = new File (basedir, ' target/classes/Main.class' )
4
+ assert ! mainFile. exists()
5
+
6
+ def testFile = new File (basedir, ' target/test-classes/Test.class' )
7
+ assert testFile. exists()
8
+
9
+ return true
10
+
11
+ } catch (Throwable e) {
12
+ e. printStackTrace()
13
+ return false
14
+ }
Original file line number Diff line number Diff line change
1
+ invoker.goals =clean test-compile -e -Dmaven.test.skip =true
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+
3
+ <project xmlns =" http://maven.apache.org/POM/4.0.0" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" >
5
+ <modelVersion >4.0.0</modelVersion >
6
+
7
+ <groupId >it.scala-maven-plugin</groupId >
8
+ <artifactId >test_skip_test</artifactId >
9
+ <version >1.0-SNAPSHOT</version >
10
+ <name >Test for skipping compilation of test sources</name >
11
+ <description >Test for skipping compilation of test sources</description >
12
+ <packaging >pom</packaging >
13
+ <dependencies >
14
+ <dependency >
15
+ <groupId >org.scala-lang</groupId >
16
+ <artifactId >scala-library</artifactId >
17
+ <version >${scala.version.lastrelease} </version >
18
+ </dependency >
19
+ </dependencies >
20
+
21
+ <build >
22
+ <plugins >
23
+ <plugin >
24
+ <groupId >@project.groupId@</groupId >
25
+ <artifactId >@project.artifactId@</artifactId >
26
+ <version >@project.version@</version >
27
+ <executions >
28
+ <execution >
29
+ <id >scala-compile-first</id >
30
+ <goals >
31
+ <goal >compile</goal >
32
+ </goals >
33
+ </execution >
34
+ <execution >
35
+ <id >scala-test-compile</id >
36
+ <goals >
37
+ <goal >testCompile</goal >
38
+ </goals >
39
+ </execution >
40
+ </executions >
41
+ </plugin >
42
+ </plugins >
43
+ </build >
44
+
45
+ </project >
Original file line number Diff line number Diff line change
1
+ class Main
Original file line number Diff line number Diff line change
1
+ class Test
Original file line number Diff line number Diff line change
1
+ try {
2
+
3
+ def mainFile = new File (basedir, ' target/classes/Main.class' )
4
+ assert mainFile. exists()
5
+
6
+ def testFile = new File (basedir, ' target/test-classes/Test.class' )
7
+ assert ! testFile. exists()
8
+
9
+ return true
10
+
11
+ } catch (Throwable e) {
12
+ e. printStackTrace()
13
+ return false
14
+ }
You can’t perform that action at this time.
0 commit comments