diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000..c59c447bf --- /dev/null +++ b/.editorconfig @@ -0,0 +1,12 @@ +root = true + +[*] +indent_style = tab +indent_size = 4 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a786d212a..48b34a9c9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,10 +15,11 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 with: - java-version: 1.8 + distribution: 'temurin' + java-version: 17 - name: Build with Maven run: mvn -B package --file pom.xml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea630d0af..31c83c109 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -9,12 +9,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out Git repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Install Java and Maven - uses: actions/setup-java@v1 + uses: actions/setup-java@v4 with: - java-version: 1.8 + distribution: 'temurin' + java-version: 17 - name: Setup GPG env: diff --git a/mockrunner-all/pom.xml b/mockrunner-all/pom.xml index 4b7793a67..69dd78b36 100644 --- a/mockrunner-all/pom.xml +++ b/mockrunner-all/pom.xml @@ -5,8 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT - .. + 2.0.8-SNAPSHOT mockrunner-all @@ -17,75 +16,75 @@ com.mockrunner mockrunner-core - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT com.mockrunner mockrunner-jms - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT com.mockrunner mockrunner-jms - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT tests test com.mockrunner mockrunner-ejb - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT com.mockrunner mockrunner-ejb - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT tests test com.mockrunner mockrunner-jdbc - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT com.mockrunner mockrunner-jdbc - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT tests test com.mockrunner mockrunner-jca - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT com.mockrunner mockrunner-servlet - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT com.mockrunner mockrunner-servlet - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT tests test com.mockrunner mockrunner-tag - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT com.mockrunner mockrunner-struts - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT com.mockrunner mockrunner-struts - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT tests test @@ -105,6 +104,10 @@ jboss jboss-j2ee + + org.jboss.spec.javax.rmi + jboss-rmi-api_1.0_spec + @@ -154,7 +157,7 @@ - + release-module-exclusives diff --git a/mockrunner-all/src/main/java/com/mockrunner/base/HTMLOutputTestCase.java b/mockrunner-all/src/main/java/com/mockrunner/base/HTMLOutputTestCase.java index 87d61d692..a5987cdad 100644 --- a/mockrunner-all/src/main/java/com/mockrunner/base/HTMLOutputTestCase.java +++ b/mockrunner-all/src/main/java/com/mockrunner/base/HTMLOutputTestCase.java @@ -56,7 +56,7 @@ protected org.w3c.dom.Document getOutputAsW3CDocument() /** * Delegates to {@link HTMLOutputModule#getOutputAsJDOMDocument} */ - protected org.jdom.Document getOutputAsJDOMDocument() + protected org.jdom2.Document getOutputAsJDOMDocument() { return getHTMLOutputModule().getOutputAsJDOMDocument(); } diff --git a/mockrunner-all/src/main/java/com/mockrunner/example/ejb/LogAction.java b/mockrunner-all/src/main/java/com/mockrunner/example/ejb/LogAction.java index 64a25011a..836cfb886 100644 --- a/mockrunner-all/src/main/java/com/mockrunner/example/ejb/LogAction.java +++ b/mockrunner-all/src/main/java/com/mockrunner/example/ejb/LogAction.java @@ -32,7 +32,7 @@ public ActionForward execute(ActionMapping mapping, { InitialContext initialContext = new InitialContext(); Object home = initialContext.lookup("com/mockrunner/example/LogSession"); - LogSessionHome logHome = (LogSessionHome)PortableRemoteObject.narrow(home, LogSessionHome.class); + LogSessionHome logHome = (LogSessionHome) PortableRemoteObject.narrow(home, LogSessionHome.class); LogSession log = logHome.create(); log.logMessage(message); log.remove(); diff --git a/mockrunner-all/src/test/java/com/mockrunner/test/web/HTMLOutputModuleTest.java b/mockrunner-all/src/test/java/com/mockrunner/test/web/HTMLOutputModuleTest.java index 2ae4fdd49..38bfdb578 100644 --- a/mockrunner-all/src/test/java/com/mockrunner/test/web/HTMLOutputModuleTest.java +++ b/mockrunner-all/src/test/java/com/mockrunner/test/web/HTMLOutputModuleTest.java @@ -17,7 +17,7 @@ import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.Before; import org.junit.Test; diff --git a/mockrunner-core/pom.xml b/mockrunner-core/pom.xml index 7e7d581b9..b28165348 100644 --- a/mockrunner-core/pom.xml +++ b/mockrunner-core/pom.xml @@ -5,8 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT - .. + 2.0.8-SNAPSHOT mockrunner-core @@ -31,8 +30,8 @@ - jdom - jdom + org.jdom + jdom2 diff --git a/mockrunner-core/src/main/java/com/mockrunner/test/util/XmlUtilTest.java b/mockrunner-core/src/main/java/com/mockrunner/test/util/XmlUtilTest.java index 5983a0b3f..282198e41 100644 --- a/mockrunner-core/src/main/java/com/mockrunner/test/util/XmlUtilTest.java +++ b/mockrunner-core/src/main/java/com/mockrunner/test/util/XmlUtilTest.java @@ -5,8 +5,8 @@ import junit.framework.TestCase; -import org.jdom.Document; -import org.jdom.Element; +import org.jdom2.Document; +import org.jdom2.Element; import com.mockrunner.util.web.XmlUtil; diff --git a/mockrunner-core/src/main/java/com/mockrunner/util/web/XmlUtil.java b/mockrunner-core/src/main/java/com/mockrunner/util/web/XmlUtil.java index aab42bceb..8ae749abf 100644 --- a/mockrunner-core/src/main/java/com/mockrunner/util/web/XmlUtil.java +++ b/mockrunner-core/src/main/java/com/mockrunner/util/web/XmlUtil.java @@ -5,9 +5,9 @@ import org.apache.xerces.parsers.DOMParser; import org.cyberneko.html.HTMLConfiguration; -import org.jdom.Element; -import org.jdom.input.DOMBuilder; -import org.jdom.output.XMLOutputter; +import org.jdom2.Element; +import org.jdom2.input.DOMBuilder; +import org.jdom2.output.XMLOutputter; import org.xml.sax.InputSource; import com.mockrunner.base.NestedApplicationException; @@ -34,10 +34,10 @@ public class XmlUtil * * * the method returns the h1 tag as Element. - * @param document the org.jdom.Document + * @param document the org.jdom2.Document * @return the body Element */ - public static Element getBodyFragmentFromJDOMDocument(org.jdom.Document document) + public static Element getBodyFragmentFromJDOMDocument(org.jdom2.Document document) { Element element = document.getRootElement().getChild("BODY"); if(null == element) @@ -57,17 +57,17 @@ public static Element getBodyFragmentFromJDOMDocument(org.jdom.Document document * @return the body element * @deprecated use {@link #getBodyFragmentFromJDOMDocument} */ - public static Element getBodyFragmentJDOMDocument(org.jdom.Document document) + public static Element getBodyFragmentJDOMDocument(org.jdom2.Document document) { return getBodyFragmentFromJDOMDocument(document); } /** * Returns the documents XML content as a string. - * @param document the org.jdom.Document + * @param document the org.jdom2.Document * @return the output as string */ - public static String createStringFromJDOMDocument(org.jdom.Document document) + public static String createStringFromJDOMDocument(org.jdom2.Document document) { try { @@ -83,9 +83,9 @@ public static String createStringFromJDOMDocument(org.jdom.Document document) * Creates a JDOM Document from a specified * W3C Document. * @param document the org.w3c.dom.Document - * @return the org.jdom.Document + * @return the org.jdom2.Document */ - public static org.jdom.Document createJDOMDocument(org.w3c.dom.Document document) + public static org.jdom2.Document createJDOMDocument(org.w3c.dom.Document document) { return new DOMBuilder().build(document); } diff --git a/mockrunner-ejb/pom.xml b/mockrunner-ejb/pom.xml index 20f0dc1a5..eaca48f9d 100644 --- a/mockrunner-ejb/pom.xml +++ b/mockrunner-ejb/pom.xml @@ -5,8 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT - .. + 2.0.8-SNAPSHOT mockrunner-ejb @@ -30,12 +29,33 @@ org.mockejb mockejb + + + cglib + cglib-full + + + + + cglib + cglib-nodep + 3.3.0 + + + org.jacorb + jacorb + 3.9 jboss jboss-j2ee true + + org.jboss.spec.javax.rmi + jboss-rmi-api_1.0_spec + test + @@ -76,9 +96,16 @@ -Xdoclint:none + + org.apache.maven.plugins + maven-surefire-plugin + + --add-opens java.base/java.lang=ALL-UNNAMED + + - + release-module-exclusives diff --git a/mockrunner-jca/pom.xml b/mockrunner-jca/pom.xml index 094db9730..c531475a1 100644 --- a/mockrunner-jca/pom.xml +++ b/mockrunner-jca/pom.xml @@ -5,8 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT - .. + 2.0.8-SNAPSHOT mockrunner-jca diff --git a/mockrunner-jdbc/pom.xml b/mockrunner-jdbc/pom.xml index 44cf19bae..a595cf37f 100644 --- a/mockrunner-jdbc/pom.xml +++ b/mockrunner-jdbc/pom.xml @@ -5,8 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT - .. + 2.0.8-SNAPSHOT mockrunner-jdbc diff --git a/mockrunner-jdbc/src/main/java/com/mockrunner/jdbc/XMLResultSetFactory.java b/mockrunner-jdbc/src/main/java/com/mockrunner/jdbc/XMLResultSetFactory.java index 24d7c4617..c8faf67d8 100644 --- a/mockrunner-jdbc/src/main/java/com/mockrunner/jdbc/XMLResultSetFactory.java +++ b/mockrunner-jdbc/src/main/java/com/mockrunner/jdbc/XMLResultSetFactory.java @@ -7,9 +7,9 @@ import java.util.List; import java.util.Map; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.input.SAXBuilder; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.input.SAXBuilder; import com.mockrunner.base.NestedApplicationException; import com.mockrunner.mock.jdbc.MockResultSet; diff --git a/mockrunner-jdbc/src/main/java/com/mockrunner/jdbc/XMLResultSetFactorySQLDeveloperSupport.java b/mockrunner-jdbc/src/main/java/com/mockrunner/jdbc/XMLResultSetFactorySQLDeveloperSupport.java index 837ac29d3..b9d3fb098 100644 --- a/mockrunner-jdbc/src/main/java/com/mockrunner/jdbc/XMLResultSetFactorySQLDeveloperSupport.java +++ b/mockrunner-jdbc/src/main/java/com/mockrunner/jdbc/XMLResultSetFactorySQLDeveloperSupport.java @@ -4,9 +4,9 @@ import java.util.Iterator; import java.util.List; -import org.jdom.Document; -import org.jdom.Element; -import org.jdom.input.SAXBuilder; +import org.jdom2.Document; +import org.jdom2.Element; +import org.jdom2.input.SAXBuilder; import com.mockrunner.base.NestedApplicationException; import com.mockrunner.mock.jdbc.MockResultSet; diff --git a/mockrunner-jdbc/src/main/java/com/mockrunner/mock/jdbc/MockSQLXML.java b/mockrunner-jdbc/src/main/java/com/mockrunner/mock/jdbc/MockSQLXML.java index c6ef37f25..fab2a8cf6 100644 --- a/mockrunner-jdbc/src/main/java/com/mockrunner/mock/jdbc/MockSQLXML.java +++ b/mockrunner-jdbc/src/main/java/com/mockrunner/mock/jdbc/MockSQLXML.java @@ -32,13 +32,13 @@ import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; -import org.jdom.Document; -import org.jdom.input.DOMBuilder; -import org.jdom.input.SAXBuilder; -import org.jdom.input.SAXHandler; -import org.jdom.output.DOMOutputter; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.input.DOMBuilder; +import org.jdom2.input.SAXBuilder; +import org.jdom2.input.sax.SAXHandler; +import org.jdom2.output.DOMOutputter; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.w3c.dom.Node; import org.xml.sax.InputSource; @@ -146,6 +146,7 @@ protected XMLInputFactory createXMLInputFactory() protected SAXBuilder createJDOMSAXBuilder() { + SAXBuilder builder = new SAXBuilder(); builder.setValidation(false); return builder; diff --git a/mockrunner-jdbc/src/test/java/com/mockrunner/test/jdbc/MockSQLXMLTest.java b/mockrunner-jdbc/src/test/java/com/mockrunner/test/jdbc/MockSQLXMLTest.java index 074832ebc..47059016a 100644 --- a/mockrunner-jdbc/src/test/java/com/mockrunner/test/jdbc/MockSQLXMLTest.java +++ b/mockrunner-jdbc/src/test/java/com/mockrunner/test/jdbc/MockSQLXMLTest.java @@ -24,11 +24,11 @@ import junit.framework.TestCase; -import org.jdom.Document; -import org.jdom.input.DOMBuilder; -import org.jdom.input.SAXBuilder; -import org.jdom.output.Format; -import org.jdom.output.XMLOutputter; +import org.jdom2.Document; +import org.jdom2.input.DOMBuilder; +import org.jdom2.input.SAXBuilder; +import org.jdom2.output.Format; +import org.jdom2.output.XMLOutputter; import org.xml.sax.ContentHandler; import org.xml.sax.helpers.AttributesImpl; diff --git a/mockrunner-jms-spring/pom.xml b/mockrunner-jms-spring/pom.xml index 3cb9a0c18..f93b38332 100644 --- a/mockrunner-jms-spring/pom.xml +++ b/mockrunner-jms-spring/pom.xml @@ -6,7 +6,6 @@ com.mockrunner mockrunner 2.0.0-SNAPSHOT - .. mockrunner-jms-spring diff --git a/mockrunner-jms/pom.xml b/mockrunner-jms/pom.xml index c594db51b..d87583470 100644 --- a/mockrunner-jms/pom.xml +++ b/mockrunner-jms/pom.xml @@ -5,8 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT - .. + 2.0.8-SNAPSHOT mockrunner-jms diff --git a/mockrunner-servlet/pom.xml b/mockrunner-servlet/pom.xml index 5163d2cc8..07d76db82 100644 --- a/mockrunner-servlet/pom.xml +++ b/mockrunner-servlet/pom.xml @@ -5,8 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT - .. + 2.0.8-SNAPSHOT mockrunner-servlet diff --git a/mockrunner-servlet/src/main/java/com/mockrunner/base/BasicHTMLOutputTestCase.java b/mockrunner-servlet/src/main/java/com/mockrunner/base/BasicHTMLOutputTestCase.java index 16fd09b43..7859ffc09 100644 --- a/mockrunner-servlet/src/main/java/com/mockrunner/base/BasicHTMLOutputTestCase.java +++ b/mockrunner-servlet/src/main/java/com/mockrunner/base/BasicHTMLOutputTestCase.java @@ -56,7 +56,7 @@ protected org.w3c.dom.Document getOutputAsW3CDocument() /** * Delegates to {@link HTMLOutputModule#getOutputAsJDOMDocument} */ - protected org.jdom.Document getOutputAsJDOMDocument() + protected org.jdom2.Document getOutputAsJDOMDocument() { return getHTMLOutputModule().getOutputAsJDOMDocument(); } diff --git a/mockrunner-servlet/src/main/java/com/mockrunner/base/HTMLOutputModule.java b/mockrunner-servlet/src/main/java/com/mockrunner/base/HTMLOutputModule.java index f6d0777da..269590782 100644 --- a/mockrunner-servlet/src/main/java/com/mockrunner/base/HTMLOutputModule.java +++ b/mockrunner-servlet/src/main/java/com/mockrunner/base/HTMLOutputModule.java @@ -66,10 +66,10 @@ public org.w3c.dom.Document getOutputAsW3CDocument() * to parse the string output yourself. Please note that * HTML parsing is not very fast and may slow down * your test suite. - * @return the output as org.jdom.Document + * @return the output as org.jdom2.Document * @throws RuntimeException if a parsing error occurs */ - public org.jdom.Document getOutputAsJDOMDocument() + public org.jdom2.Document getOutputAsJDOMDocument() { return XmlUtil.createJDOMDocument(getOutputAsW3CDocument()); } diff --git a/mockrunner-servlet/src/main/java/com/mockrunner/example/servlet/RedirectServletTest.java b/mockrunner-servlet/src/main/java/com/mockrunner/example/servlet/RedirectServletTest.java index 2589ee6dd..1d5f69ecb 100644 --- a/mockrunner-servlet/src/main/java/com/mockrunner/example/servlet/RedirectServletTest.java +++ b/mockrunner-servlet/src/main/java/com/mockrunner/example/servlet/RedirectServletTest.java @@ -4,7 +4,7 @@ import java.io.BufferedReader; -import org.jdom.Element; +import org.jdom2.Element; import org.junit.Before; import org.junit.Test; diff --git a/mockrunner-struts/pom.xml b/mockrunner-struts/pom.xml index f867618be..92ceb4019 100644 --- a/mockrunner-struts/pom.xml +++ b/mockrunner-struts/pom.xml @@ -5,7 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT .. diff --git a/mockrunner-tag/pom.xml b/mockrunner-tag/pom.xml index 3eed1af44..949e26509 100644 --- a/mockrunner-tag/pom.xml +++ b/mockrunner-tag/pom.xml @@ -5,8 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT - .. + 2.0.8-SNAPSHOT mockrunner-tag diff --git a/pom.xml b/pom.xml index a97d38b6a..5996f6cc1 100644 --- a/pom.xml +++ b/pom.xml @@ -5,7 +5,7 @@ com.mockrunner mockrunner - 2.0.7-SNAPSHOT + 2.0.8-SNAPSHOT pom MockRunner http://mockrunner.github.io @@ -32,7 +32,7 @@ Europe/Berlin - + Steinar Bang @@ -141,15 +141,20 @@ jboss-j2ee 4.2.2.GA + + org.jboss.spec.javax.rmi + jboss-rmi-api_1.0_spec + 1.0.6.Final + oro oro 2.0.8 - jdom - jdom - 1.0 + org.jdom + jdom2 + 2.0.6.1 junit @@ -316,7 +321,7 @@ org.apache.karaf.tooling karaf-maven-plugin - 4.1.7 + 4.4.6 true 80 @@ -337,26 +342,23 @@ org.apache.maven.plugins maven-source-plugin - 3.0.1 org.apache.maven.plugins maven-jar-plugin - 3.0.2 org.apache.maven.plugins maven-surefire-plugin - 2.17 false + -Xmx384m org.apache.maven.plugins maven-release-plugin - 2.5.3 true release @@ -366,7 +368,6 @@ org.apache.maven.plugins maven-deploy-plugin - 2.8.2 org.apache.maven.plugins maven-gpg-plugin - 1.6 com.github.github site-maven-plugin - 0.12 Creating site for ${project.artifactId}, ${project.version} @@ -416,11 +415,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.7.0 - 1.8 - 1.8 - 1.8 + 17 + 17 + 17 -Xlint:all true true @@ -429,7 +427,7 @@ - + @@ -493,7 +491,7 @@ - /usr/bin/javadoc + ${env.JAVA_HOME}/bin/javadoc @@ -505,7 +503,7 @@ - /usr/bin/javadoc + ${env.JAVA_HOME}/bin/javadoc @@ -572,7 +570,7 @@ mockrunner-core -