diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml
new file mode 100644
index 00000000..5b8d5402
--- /dev/null
+++ b/.github/FUNDING.yml
@@ -0,0 +1 @@
+github: [khmarbaise]
\ No newline at end of file
diff --git a/.sdkmanrc b/.sdkmanrc
new file mode 100644
index 00000000..4fc377de
--- /dev/null
+++ b/.sdkmanrc
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# Enable auto-env through the sdkman_auto_env config
+# Add key=value pairs of SDKs to use below
+java=8.0.252.hs-adpt
diff --git a/ReleaseNotes.md b/ReleaseNotes.md
index e69a8019..71176ed3 100644
--- a/ReleaseNotes.md
+++ b/ReleaseNotes.md
@@ -2,6 +2,15 @@
## Release 0.4.0 (NOT RELEASED YET)
+ * [Fixed Issue 465][issue-465]
+
+ * Remove asciidoctor site parts
+ * AS preparation for user guide.
+
+ * [Fixed Issue 464][issue-464]
+
+ * Replaced xml-apis with xerces-xmlParserAPI.
+
* [Fixed Issue 309][issue-309]
* Added possibility to get mode detailed data from Maven Modules from Jobs/Builds
@@ -1156,6 +1165,7 @@ TestReport testReport = mavenJob.getLastSuccessfulBuild().getTestReport();
[issue-401]: https://github.com/jenkinsci/java-client-api/issues/401
[issue-402]: https://github.com/jenkinsci/java-client-api/issues/402
[issue-405]: https://github.com/jenkinsci/java-client-api/issues/405
+[issue-464]: https://github.com/jenkinsci/java-client-api/issues/464
[pull-123]: https://github.com/jenkinsci/java-client-api/pull/123
[pull-149]: https://github.com/jenkinsci/java-client-api/pull/149
[pull-158]: https://github.com/jenkinsci/java-client-api/pull/158
diff --git a/jenkins-client/pom.xml b/jenkins-client/pom.xml
index ea595a4d..2cbc3df9 100644
--- a/jenkins-client/pom.xml
+++ b/jenkins-client/pom.xml
@@ -34,7 +34,7 @@
- dom4j
+ org.dom4j
dom4j
@@ -109,10 +109,9 @@
assertj-core
test
-
- xml-apis
- xml-apis
+ xerces
+ xmlParserAPIs
diff --git a/jenkins-client/src/site/asciidoc/index.adoc b/jenkins-client/src/site/asciidoc/index.adoc
deleted file mode 100644
index 942df55c..00000000
--- a/jenkins-client/src/site/asciidoc/index.adoc
+++ /dev/null
@@ -1,7 +0,0 @@
-:revnumber: ${project-version}
-
-== Overview ==
-
-Here you can see the first page.
-This is the first.
-
diff --git a/jenkins-client/src/site/asciidoc/sub/sub.adoc b/jenkins-client/src/site/asciidoc/sub/sub.adoc
deleted file mode 100644
index 345e6aef..00000000
--- a/jenkins-client/src/site/asciidoc/sub/sub.adoc
+++ /dev/null
@@ -1 +0,0 @@
-Test
diff --git a/jenkins-client/src/test/java/com/offbytwo/jenkins/client/JenkinsHttpClientTest.java b/jenkins-client/src/test/java/com/offbytwo/jenkins/client/JenkinsHttpClientTest.java
index 80f3ba38..2e3bce09 100644
--- a/jenkins-client/src/test/java/com/offbytwo/jenkins/client/JenkinsHttpClientTest.java
+++ b/jenkins-client/src/test/java/com/offbytwo/jenkins/client/JenkinsHttpClientTest.java
@@ -5,6 +5,12 @@
*/
package com.offbytwo.jenkins.client;
+import static org.junit.Assert.assertEquals;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.eq;
+import static org.mockito.BDDMockito.given;
+import static org.mockito.Mockito.mock;
+
import java.io.ByteArrayInputStream;
import java.net.URI;
import org.apache.http.Header;
@@ -15,12 +21,7 @@
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.protocol.HttpContext;
-import static org.junit.Assert.assertEquals;
import org.junit.Test;
-import static org.mockito.BDDMockito.given;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.mock;
@@ -30,7 +31,7 @@
*/
public class JenkinsHttpClientTest {
private static final String URI = "http://localhost/jenkins";
-
+
@Test
@@ -40,8 +41,8 @@ public void testGet_String() throws Exception {
final Header versionHeader = mock(Header.class);
final StatusLine statusLine = mock(StatusLine.class);
final HttpEntity entity = mock(HttpEntity.class);
- given(client.execute(any(HttpUriRequest.class), any(HttpContext.class))).willReturn(response);
- given(response.getHeaders(anyString())).willReturn(new Header[]{versionHeader});
+ given(client.execute(any(HttpUriRequest.class), eq((HttpContext)null))).willReturn(response);
+ given(response.getHeaders("X-Jenkins")).willReturn(new Header[]{versionHeader});
given(response.getStatusLine()).willReturn(statusLine);
given(versionHeader.getValue()).willReturn("1.234");
given(statusLine.getStatusCode()).willReturn(HttpStatus.SC_OK);
@@ -51,15 +52,15 @@ public void testGet_String() throws Exception {
final String s = jclient.get("job/someJob");
assertEquals("someJson", s);
}
-
-
-
+
+
+
@Test(expected=IllegalStateException.class)
public void testClose() throws Exception {
final JenkinsHttpConnection jclient = new JenkinsHttpClient(new URI(URI));
jclient.close();
jclient.close(); //check multiple calls yield no errors
- jclient.get("job/someJob");
+ jclient.get("job/someJob");
}
diff --git a/pom.xml b/pom.xml
index 8015cefa..f88539d9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -48,21 +48,20 @@
true
true
- 1.5.3
+ 2.0.0
1.644
4.12
- 1.9.5
+ 3.0.0
2.4
1.4.7-jenkins-1
- 1.6.1
- 3.8.1
+ 3.9
2.4
4.5.8
4.4.11
4.5.8
- 2.9.8
+ 2.10.3
@@ -105,9 +104,9 @@
- dom4j
+ org.dom4j
dom4j
- ${dom4j.version}
+ 2.1.3
@@ -165,34 +164,36 @@
org.testng
testng
- 6.14.2
- test
+ 7.0.0
+
+
+ org.junit
+ junit-bom
+ 5.5.2
+ import
+ pom
junit
junit
${junit.version}
- test
org.mockito
mockito-core
${mockito-core.version}
- test
org.jenkins-ci.main
jenkins-test-harness
${jenkins-version}
- test
org.assertj
assertj-core
3.12.2
- test
@@ -202,18 +203,15 @@
org.apache.logging.log4j
- log4j-core
- 2.11.1
+ log4j-bom
+ 2.12.1
+ import
+ pom
- org.apache.logging.log4j
- log4j-slf4j-impl
- 2.11.1
-
-
- xml-apis
- xml-apis
- 1.4.01
+ xerces
+ xmlParserAPIs
+ 2.6.1
@@ -224,7 +222,7 @@
org.apache.maven.plugins
maven-help-plugin
- 3.1.1
+ 3.2.0
org.apache.maven.plugins
@@ -239,7 +237,7 @@
org.apache.maven.plugins
maven-source-plugin
- 3.0.1
+ 3.1.0
-
- font
- coderay
- style
- 2
- ${project.version}
- true
- true
-
-
-
@@ -479,7 +458,7 @@
repo.jenkins-ci.org
- http://repo.jenkins-ci.org/public/
+ https://repo.jenkins-ci.org/public/