Projects
Mega:24.03:SP1:Everything
takari-lifecycle
_service:tar_scm:0002-Use-commons-codec-instead...
Sign Up
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File _service:tar_scm:0002-Use-commons-codec-instead-of-takari-hash-in-tests.patch of Package takari-lifecycle
From f8fe37de07b8e82163f08dfc8f826754d49ce9d6 Mon Sep 17 00:00:00 2001 Date: Mon, 18 Jul 2016 18:33:48 +0200 Subject: [PATCH 2/3] Use commons-codec instead of takari-hash in tests --- .../src/test/java/io/takari/maven/plugins/jar/JarTest.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/takari-lifecycle-plugin/src/test/java/io/takari/maven/plugins/jar/JarTest.java b/takari-lifecycle-plugin/src/test/java/io/takari/maven/plugins/jar/JarTest.java index b600561..5d69a0d 100644 --- a/takari-lifecycle-plugin/src/test/java/io/takari/maven/plugins/jar/JarTest.java +++ b/takari-lifecycle-plugin/src/test/java/io/takari/maven/plugins/jar/JarTest.java @@ -40,9 +40,10 @@ import org.junit.Test; import com.google.common.io.Files; -import io.takari.hash.FingerprintSha1Streaming; import io.takari.incrementalbuild.maven.testing.IncrementalBuildRule; import io.takari.maven.testing.TestResources; +import java.io.FileInputStream; +import org.apache.commons.codec.digest.DigestUtils; public class JarTest { @@ -69,7 +70,7 @@ public class JarTest { mojos.executeMojo(basedir, "jar"); File jar0 = new File(basedir, "target/test-1.0.jar"); assertTrue(jar0.exists()); - String fingerprint0 = new FingerprintSha1Streaming().fingerprint(jar0); + String fingerprint0 = DigestUtils.sha1Hex(new FileInputStream(jar0)); // // Generate the JAR a second time and ensure that the fingerprint is still the same when // the JAR content is the same. The outer SHA1 of a JAR built at two points in time will @@ -78,7 +79,7 @@ public class JarTest { mojos.executeMojo(basedir, "jar"); File jar1 = new File(basedir, "target/test-1.0.jar"); Assert.assertTrue(jar1.exists()); - String fingerprint1 = new FingerprintSha1Streaming().fingerprint(jar1); + String fingerprint1 = DigestUtils.sha1Hex(new FileInputStream(jar1)); assertEquals("We expect the JAR to have the same fingerprint after repeated builds.", fingerprint0, fingerprint1); // Make sure our maven properties file is written correctly -- 2.17.1
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2