Skip to content

Commit d9b470e

Browse files
authored
Merge pull request #44 from TOPdesk/jdk9
Support for Jigsaw (JDK9 and up)
2 parents 95ae9f6 + ffb19bd commit d9b470e

12 files changed

+98
-47
lines changed

.travis.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
language: java
22
jdk:
33
- oraclejdk8
4-
- openjdk7
4+
- oraclejdk11
55
- openjdk8
6+
- openjdk11
67

78
stages:
89
- test
@@ -14,6 +15,10 @@ stages:
1415
before_install:
1516
- if [ ! -z "$GPG_SECRET_KEYS" ]; then echo $GPG_SECRET_KEYS | base64 --decode | $GPG_EXECUTABLE --import; fi
1617
- if [ ! -z "$GPG_OWNERTRUST" ]; then echo $GPG_OWNERTRUST | base64 --decode | $GPG_EXECUTABLE --import-ownertrust; fi
18+
- wget https://www-eu.apache.org/dist/maven/maven-3/3.6.0/binaries/apache-maven-3.6.0-bin.zip
19+
- unzip -qq apache-maven-3.6.0-bin.zip
20+
- export M2_HOME=$PWD/apache-maven-3.6.0
21+
- export PATH=$M2_HOME/bin:$PATH
1722

1823
install:
1924
- mvn --settings .travis/settings.xml install -Dgpg.skip -Dmaven.javadoc.skip=true -B -V

pom.xml

+64-18
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>org.robotframework</groupId>
88
<artifactId>robotframework-maven-plugin</artifactId>
99
<packaging>maven-plugin</packaging>
10-
<version>1.4.10-SNAPSHOT</version>
10+
<version>1.5.0-SNAPSHOT</version>
1111
<name>Robot Framework Maven Plugin</name>
1212
<description>
1313
Maven plugin for the Robot Framework.
@@ -63,14 +63,14 @@
6363
<url>https://travis-ci.org/robotframework/MavenPlugin</url>
6464
</ciManagement>
6565
<profiles>
66-
<!-- 2 first profiles needed for tests to have tools.jar in classpath -->
6766
<profile>
6867
<id>default</id>
6968
<activation>
7069
<property>
7170
<name>java.vendor</name>
7271
<value>!Apple Inc.</value>
7372
</property>
73+
<jdk>[,1.9)</jdk>
7474
</activation>
7575
<dependencies>
7676
<dependency>
@@ -90,6 +90,7 @@
9090
<name>java.vendor</name>
9191
<value>Apple Inc.</value>
9292
</property>
93+
<jdk>[,1.9)</jdk>
9394
</activation>
9495
<dependencies>
9596
<dependency>
@@ -195,7 +196,7 @@
195196
<dependency>
196197
<groupId>org.apache.maven</groupId>
197198
<artifactId>maven-plugin-api</artifactId>
198-
<version>2.2.1</version>
199+
<version>3.5.3</version>
199200
</dependency>
200201

201202
<dependency>
@@ -212,8 +213,8 @@
212213

213214
<dependency>
214215
<groupId>junit</groupId>
215-
<artifactId>junit-dep</artifactId>
216-
<version>4.10</version>
216+
<artifactId>junit</artifactId>
217+
<version>4.11</version>
217218
<scope>test</scope>
218219
<exclusions>
219220
<exclusion>
@@ -233,14 +234,14 @@
233234
<dependency>
234235
<groupId>org.hsqldb</groupId>
235236
<artifactId>hsqldb</artifactId>
236-
<version>2.3.2</version>
237+
<version>2.4.1</version>
237238
<scope>test</scope>
238239
</dependency>
239240

240241
<dependency>
241242
<groupId>org.mockito</groupId>
242243
<artifactId>mockito-core</artifactId>
243-
<version>1.10.8</version>
244+
<version>2.19.0</version>
244245
<scope>test</scope>
245246
<exclusions>
246247
<exclusion>
@@ -252,23 +253,58 @@
252253
<dependency>
253254
<groupId>org.powermock</groupId>
254255
<artifactId>powermock-module-junit4</artifactId>
255-
<version>1.5.6</version>
256+
<version>2.0.0-beta.5</version>
256257
<scope>test</scope>
257258
</dependency>
258259
<dependency>
259260
<groupId>org.powermock</groupId>
260-
<artifactId>powermock-api-mockito</artifactId>
261-
<version>1.5.6</version>
261+
<artifactId>powermock-api-mockito2</artifactId>
262+
<version>2.0.0-beta.5</version>
262263
<scope>test</scope>
263264
</dependency>
264265

265266
<dependency>
266267
<groupId>org.apache.maven.plugin-testing</groupId>
267268
<artifactId>maven-plugin-testing-harness</artifactId>
268-
<version>1.3</version>
269+
<version>3.3.0</version>
270+
<scope>test</scope>
271+
</dependency>
272+
273+
<dependency>
274+
<groupId>org.apache.maven</groupId>
275+
<artifactId>maven-compat</artifactId>
276+
<version>3.5.3</version>
277+
<scope>test</scope>
278+
</dependency>
279+
280+
<dependency>
281+
<groupId>org.apache.maven</groupId>
282+
<artifactId>maven-core</artifactId>
283+
<version>3.5.3</version>
284+
<scope>test</scope>
285+
</dependency>
286+
287+
<dependency>
288+
<groupId>org.apache.maven</groupId>
289+
<artifactId>maven-model</artifactId>
290+
<version>3.5.3</version>
269291
<scope>test</scope>
270292
</dependency>
271293

294+
<dependency>
295+
<groupId>org.apache.maven</groupId>
296+
<artifactId>maven-aether-provider</artifactId>
297+
<version>3.3.9</version>
298+
<scope>test</scope>
299+
</dependency>
300+
301+
<dependency>
302+
<groupId>org.apache.maven.plugin-tools</groupId>
303+
<artifactId>maven-plugin-annotations</artifactId>
304+
<version>3.5.2</version>
305+
<scope>provided</scope>
306+
</dependency>
307+
272308
<dependency>
273309
<groupId>org.apache.maven.shared</groupId>
274310
<artifactId>maven-verifier</artifactId>
@@ -284,25 +320,30 @@
284320
</properties>
285321
<build>
286322
<plugins>
323+
<plugin>
324+
<groupId>org.apache.maven.plugins</groupId>
325+
<artifactId>maven-resources-plugin</artifactId>
326+
<version>3.1.0</version>
327+
</plugin>
287328
<plugin>
288329
<inherited>true</inherited>
289330
<groupId>org.apache.maven.plugins</groupId>
290331
<artifactId>maven-compiler-plugin</artifactId>
291-
<version>3.2</version>
332+
<version>3.7.0</version>
292333
<configuration>
293-
<source>1.5</source>
294-
<target>1.5</target>
334+
<source>1.8</source>
335+
<target>1.8</target>
295336
</configuration>
296337
</plugin>
297338
<plugin>
298-
<!-- integration tests can be skipped using -DskipITs, or -Darguments="-DskipITs"
339+
<!-- integration tests can be skipped using -DskipITs, or -Darguments="-DskipITs"
299340
in a release build, note that you need -D twice in the latter case -->
300341
<groupId>org.apache.maven.plugins</groupId>
301342
<artifactId>maven-failsafe-plugin</artifactId>
302-
<version>2.17</version>
343+
<version>2.21.0</version>
303344
<configuration>
304345
<environmentVariables>
305-
<MavenLibrary.version>${project.version}</MavenLibrary.version>
346+
<MAVEN_LIBRARY_VERSION>${project.version}</MAVEN_LIBRARY_VERSION>
306347
</environmentVariables>
307348
</configuration>
308349
<executions>
@@ -363,14 +404,19 @@
363404
</execution>
364405
</executions>
365406
</plugin>
407+
<plugin>
408+
<groupId>org.apache.maven.plugins</groupId>
409+
<artifactId>maven-plugin-plugin</artifactId>
410+
<version>3.5.2</version>
411+
</plugin>
366412
</plugins>
367413
</build>
368414
<reporting>
369415
<plugins>
370416
<plugin>
371417
<groupId>org.apache.maven.plugins</groupId>
372418
<artifactId>maven-plugin-plugin</artifactId>
373-
<version>3.3</version>
419+
<version>3.5.2</version>
374420
</plugin>
375421
</plugins>
376422
</reporting>

src/main/java/org/robotframework/mavenplugin/AbstractMojoWithLoadedClasspath.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ public abstract class AbstractMojoWithLoadedClasspath
3434
private static String ROBOT_ARTIFACT = join(File.separator, "org", "robotframework", "robotframework");
3535

3636
/**
37-
* @parameter expression="${project.testClasspathElements}"
37+
* @parameter property="project.testClasspathElements"
3838
* @required
3939
* @readonly
4040
*/
4141
private List<String> classpathElements;
4242

4343
/**
44-
* @parameter expression="${settings.localRepository}"
44+
* @parameter property="settings.localRepository"
4545
* @required
4646
* @readonly
4747
*/

src/main/java/org/robotframework/mavenplugin/AcceptanceTestMojo.java

+15-15
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,8 @@ private void writeXunitFileWithError(String message) {
178178
Transformer transformer = TransformerFactory.newInstance()
179179
.newTransformer();
180180
Source xmlSource = new DOMSource(document);
181-
final File output;
182-
output = makeAbsolute(outputDirectory, xunitFile);
181+
final File output = makeAbsolute(outputDirectory, xunitFile);
182+
outputDirectory.mkdirs();
183183
Result outputTarget = new StreamResult(output);
184184
transformer.transform(xmlSource, outputTarget);
185185

@@ -302,7 +302,7 @@ private String[] generateRunArguments() {
302302
/**
303303
* The directory where the test cases are located.
304304
*
305-
* @parameter default-value="${project.basedir}/src/test/robotframework/acceptance" expression="${testCasesDirectory}"
305+
* @parameter default-value="${project.basedir}/src/test/robotframework/acceptance" property="testCasesDirectory"
306306
*/
307307
private File testCasesDirectory;
308308

@@ -371,7 +371,7 @@ private String[] generateRunArguments() {
371371
* </pre>
372372
* (This setting is needed to support overriding the configuration value from command prompt on maven 2.)
373373
* </p>
374-
* @parameter expression="${tests}"
374+
* @parameter property="tests"
375375
*/
376376
private String tests_cli;
377377

@@ -384,7 +384,7 @@ private String[] generateRunArguments() {
384384
* </pre>
385385
* (This setting is needed to support overriding the configuration value from command prompt on maven 2.)
386386
* </p>
387-
* @parameter expression="${suites}"
387+
* @parameter property="suites"
388388
*/
389389
private String suites_cli;
390390

@@ -397,7 +397,7 @@ private String[] generateRunArguments() {
397397
* </pre>
398398
* (This setting is needed to support overriding the configuration value from command prompt on maven 2.)
399399
* </p>
400-
* @parameter expression="${includes}"
400+
* @parameter property="includes"
401401
*/
402402
private String includes_cli;
403403

@@ -410,7 +410,7 @@ private String[] generateRunArguments() {
410410
* </pre>
411411
* (This setting is needed to support overriding the configuration value from command prompt on maven 2.)
412412
* </p>
413-
* @parameter expression="${excludes}"
413+
* @parameter property="excludes"
414414
*/
415415
private String excludes_cli;
416416

@@ -482,7 +482,7 @@ private String[] generateRunArguments() {
482482
*
483483
* (This setting is needed to support overriding the configuration value from command prompt on maven 2.)
484484
*
485-
* @parameter expression="${variables}"
485+
* @parameter property="variables"
486486
*/
487487
private String variables_cli;
488488

@@ -641,7 +641,7 @@ private String[] generateRunArguments() {
641641
* Sets a single listener for monitoring tests execution, can also be set via commandline using
642642
* -Dlistener=MyListener.
643643
*
644-
* @parameter expression="${listener}"
644+
* @parameter property="listener"
645645
*/
646646
private String listener;
647647

@@ -694,38 +694,38 @@ private String[] generateRunArguments() {
694694
/**
695695
* A text file to read more arguments from.
696696
*
697-
* @parameter expression="${argumentFile}"
697+
* @parameter property="argumentFile"
698698
*/
699699
private File argumentFile;
700700

701701
/**
702702
* Skip tests. Bound to -DskipTests. This allows to skip acceptance tests together with all
703703
* other tests.
704704
*
705-
* @parameter expression="${skipTests}"
705+
* @parameter property="skipTests"
706706
*/
707707
private boolean skipTests;
708708

709709
/**
710710
* Skip acceptance tests executed by this plugin. Bound to -DskipATs. This allows to run tests
711711
* and integration tests, but no acceptance tests.
712712
*
713-
* @parameter expression="${skipATs}"
713+
* @parameter property="skipATs"
714714
*/
715715
private boolean skipATs;
716716

717717
/**
718718
* Skip acceptance tests executed by this plugin together with other integration tests, e.g.
719719
* tests run by the maven-failsafe-plugin. Bound to -DskipITs
720720
*
721-
* @parameter expression="${skipITs}"
721+
* @parameter property="skipITs"
722722
*/
723723
private boolean skipITs;
724724

725725
/**
726726
* Skip tests, bound to -Dmaven.test.skip, which suppresses test compilation as well.
727727
*
728-
* @parameter default-value="false" expression="${maven.test.skip}"
728+
* @parameter default-value="false" property="maven.test.skip"
729729
*/
730730
private boolean skip;
731731

@@ -741,7 +741,7 @@ private String[] generateRunArguments() {
741741
* Re-run failed tests, based on output.xml file. This can also be set via
742742
* commandline using -DrunFailed=path/to/output.xml.
743743
*
744-
* @parameter expression="${runFailed}"
744+
* @parameter property="runFailed"
745745
*/
746746
private File runFailed;
747747

src/main/java/org/robotframework/mavenplugin/VerifyMojo.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -77,30 +77,30 @@ public class VerifyMojo
7777
* Skip verification of tests. Bound to -DskipTests. This allows to skip acceptance tests together with all
7878
* other tests.
7979
*
80-
* @parameter expression="${skipTests}"
80+
* @parameter property="skipTests"
8181
*/
8282
private boolean skipTests;
8383

8484
/**
8585
* Skip verification of acceptance tests executed by this plugin. Bound to -DskipATs. This allows to run tests
8686
* and integration tests, but no acceptance tests.
8787
*
88-
* @parameter expression="${skipATs}"
88+
* @parameter property="skipATs"
8989
*/
9090
private boolean skipATs;
9191

9292
/**
9393
* Skip verification of acceptance tests executed by this plugin together with other integration tests, e.g.
9494
* tests run by the maven-failsafe-plugin. Bound to -DskipITs
9595
*
96-
* @parameter expression="${skipITs}"
96+
* @parameter property="skipITs"
9797
*/
9898
private boolean skipITs;
9999

100100
/**
101101
* Skip verification of tests, bound to -Dmaven.test.skip, which suppresses test compilation as well.
102102
*
103-
* @parameter default-value="false" expression="${maven.test.skip}"
103+
* @parameter default-value="false" property="maven.test.skip"
104104
*/
105105
private boolean skip;
106106

0 commit comments

Comments
 (0)