-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpom.xml
67 lines (54 loc) · 2.43 KB
/
pom.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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>
<groupId>ebtks</groupId>
<artifactId>mocking_explorations</artifactId>
<version>1.0-SNAPSHOT</version>
<!-- taken from:
https://maven.apache.org/plugins/maven-compiler-plugin/examples/set-compiler-source-and-target.html
https://www.mkyong.com/maven/how-to-tell-maven-to-use-java-8/
run:
mvn compile -X
and grep for "source = " and "target = "
However, this config is not enough for IntelliJ. Even with the properties
below, there are warnings like:
Warning:java: {source,target} value 1.5 is obsolete and will be removed in a future release
IntelliJ is placated by the alternative of configuring the maven-compiler-plugin
directly. I do not like that idea because it forces me to decide which version
of the compiler plugin I want - a requirement I did not have.
Hence, I placate IntelliJ by setting the project code target manually on the IntelliJ module -->
<properties>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<powermock.version>1.7.3</powermock.version>
</properties>
<dependencies>
<!-- PowerMock with Mockito -->
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito2</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-module-junit4</artifactId>
<version>${powermock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.38</version> <!-- 1.38 1.22 1.23 1.26 1.27 -->
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>