You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by rf...@apache.org on 2020/11/28 14:14:27 UTC
[maven] branch MNG-5728 updated: No need for jakarta.xml.bind-api
if only 1 method is used
This is an automated email from the ASF dual-hosted git repository.
rfscholte pushed a commit to branch MNG-5728
in repository https://gitbox.apache.org/repos/asf/maven.git
The following commit(s) were added to refs/heads/MNG-5728 by this push:
new f0c7b2c No need for jakarta.xml.bind-api if only 1 method is used
f0c7b2c is described below
commit f0c7b2cd1bf0320b471c3c0323fada0b2d2b4a93
Author: rfscholte <rf...@apache.org>
AuthorDate: Sat Nov 28 15:14:14 2020 +0100
No need for jakarta.xml.bind-api if only 1 method is used
---
maven-compat/pom.xml | 6 ------
.../maven/artifact/AbstractArtifactComponentTestCase.java | 15 ++++++++++++++-
2 files changed, 14 insertions(+), 7 deletions(-)
diff --git a/maven-compat/pom.xml b/maven-compat/pom.xml
index b70e080..73d1a24 100644
--- a/maven-compat/pom.xml
+++ b/maven-compat/pom.xml
@@ -119,12 +119,6 @@ under the License.
<artifactId>maven-resolver-transport-wagon</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>jakarta.xml.bind</groupId>
- <artifactId>jakarta.xml.bind-api</artifactId>
- <version>2.3.2</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java b/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
index c790a93..0e2bbed 100644
--- a/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
+++ b/maven-compat/src/test/java/org/apache/maven/artifact/AbstractArtifactComponentTestCase.java
@@ -311,7 +311,7 @@ public abstract class AbstractArtifactComponentTestCase
File md5artifactFile = new File( repository.getBasedir(), md5path );
try ( Writer writer = new OutputStreamWriter( new FileOutputStream( md5artifactFile ), StandardCharsets.ISO_8859_1) )
{
- writer.append( DatatypeConverter.printHexBinary( digest ) );
+ writer.append( printHexBinary( digest ) );
}
}
@@ -385,5 +385,18 @@ public abstract class AbstractArtifactComponentTestCase
return session;
}
+
+ private static final char[] hexCode = "0123456789ABCDEF".toCharArray();
+
+ private static final String printHexBinary( byte[] data )
+ {
+ StringBuilder r = new StringBuilder( data.length * 2 );
+ for ( byte b : data )
+ {
+ r.append( hexCode[( b >> 4 ) & 0xF] );
+ r.append( hexCode[( b & 0xF )] );
+ }
+ return r.toString();
+ }
}