Skip to content

Commit

Permalink
maven: Update to use groovy.xml.XmlSlurper for Groovy 3
Browse files Browse the repository at this point in the history
The maven-invoker-plugin 3.3.0 update moves to Groovy 3 so we need to
import the proper XmlSlurper class.

We also need to avoid a missing method.

Signed-off-by: BJ Hargrave <bj@hargrave.dev>
  • Loading branch information
bjhargrave committed Jun 2, 2022
1 parent c1cac7f commit 0dc0b47
Show file tree
Hide file tree
Showing 13 changed files with 26 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
import java.nio.file.*;
import aQute.lib.io.IO


Path source = Paths.get("${projectsDirectory}/local-repo/org/objenesis");
Path target = Paths.get("${localRepositoryPath}/org/objenesis");

target.deleteDir();

IO.delete(target)

source.toFile().eachFileRecurse({ f ->
Path s = Paths.get(f.toURI());
Expand All @@ -29,4 +30,4 @@ Path remote = target.resolve("objenesis/2.2/_remote.repositories");

assert remote.toFile().text.normalize() == expected.normalize()

return;
return;
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import java.util.jar.*;
import groovy.xml.XmlSlurper


def bsn = 'jar-test-api-bundle'
def version = '0.0.1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import java.util.jar.*;
import groovy.xml.XmlSlurper


def bsn = 'jar-test-bnd-process-tests-goal-fragment'
def version = '0.0.1-SNAPSHOT'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import java.util.jar.*;
import groovy.xml.XmlSlurper


def bsn = 'jar-test-bnd-process-tests-goal'
def version = '0.0.1-SNAPSHOT'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import java.util.jar.*;
import groovy.xml.XmlSlurper


def bsn = 'jar-test-bnd-process-tests-skipIfEmpty'
def version = '0.0.1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import java.time.*;
import java.time.format.*;
import java.util.jar.*;
import groovy.xml.XmlSlurper


def bsn = 'jar-test-impl-bundle'
def version = '0.0.1-SNAPSHOT'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import java.util.jar.*;
import groovy.xml.XmlSlurper


def bsn = 'jar-test-inheriting-api-bundle'
def version = '0.0.1'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import java.util.jar.*;
import groovy.xml.XmlSlurper


def bsn = 'jar-test-war-bundle'
def version = '0.0.1-SNAPSHOT'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import java.time.*;
import java.time.format.*;
import java.util.jar.*;
import groovy.xml.XmlSlurper


def bsn = 'test.wrapper.bundle'
def moduleDir = 'jar-test-wrapper-bundle'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import groovy.xml.XmlSlurper

File testsuite_xml = new File(basedir, "/target/test-reports/test/TEST-test-no-resolve-0.0.1.xml")
assert testsuite_xml.isFile();
def testsuite = new XmlSlurper().parse(testsuite_xml)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import groovy.xml.XmlSlurper

File testsuite_xml = new File(basedir, "target/test-reports/test/TEST-test.xml")
assert testsuite_xml.isFile();
testsuite = new XmlSlurper().parse(testsuite_xml)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import aQute.bnd.build.model.*;
import aQute.bnd.osgi.*;
import aQute.bnd.properties.*;
import aQute.lib.io.*;
import groovy.xml.XmlSlurper

// Check the bndrun file exist!
File bndrunFile = new File(basedir, "test.bndrun")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import aQute.bnd.build.model.*;
import aQute.bnd.osgi.*;
import aQute.bnd.properties.*;
import aQute.lib.io.*;
import groovy.xml.XmlSlurper

// Check the bndrun file exist!
File bndrunFile = new File(basedir,"test.bndrun")
Expand Down

0 comments on commit 0dc0b47

Please sign in to comment.