diff --git a/_bin/createRelease.bat b/_bin/createRelease.bat deleted file mode 100644 index 66a1f58..0000000 --- a/_bin/createRelease.bat +++ /dev/null @@ -1,5 +0,0 @@ -@ECHO OFF -setlocal -set BASEPATH=%~dp0% -cd %BASEPATH%\.. -mvn release:clean release:prepare -Dmaven.test.skip=true -Darguments="-Dmaven.test.skip=true -DskipTests" \ No newline at end of file diff --git a/configuration/pom.xml b/configuration/pom.xml index 9468dc4..63353b2 100644 --- a/configuration/pom.xml +++ b/configuration/pom.xml @@ -1,4 +1,3 @@ - - - 4.0.0 + + 4.0.0 - de.muehlencord.shared - shared-configuration - jar - - - shared - de.muehlencord - 2.0.0-SNAPSHOT - + de.muehlencord.shared + shared-configuration + jar - shared-configuration - http://maven.apache.org - - UTF-8 - + + shared + de.muehlencord + 2.0.1-SNAPSHOT + - - - org.junit.jupiter - junit-jupiter-engine - test - - - - org.slf4j - slf4j-api - provided - - + shared-configuration + http://maven.apache.org + + UTF-8 + + + + + org.junit.jupiter + junit-jupiter-api + test + + + + org.slf4j + slf4j-api + provided + + diff --git a/db/pom.xml b/db/pom.xml index cb19bea..c4d7d18 100644 --- a/db/pom.xml +++ b/db/pom.xml @@ -26,7 +26,7 @@ limitations under the License. shared de.muehlencord - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT shared-db @@ -61,7 +61,7 @@ limitations under the License. org.junit.jupiter - junit-jupiter-engine + junit-jupiter-api test diff --git a/jeeutil/pom.xml b/jeeutil/pom.xml index d25d78b..2a568fa 100644 --- a/jeeutil/pom.xml +++ b/jeeutil/pom.xml @@ -15,13 +15,12 @@ See the License for the specific language governing permissions and limitations under the License. --> - + 4.0.0 shared de.muehlencord - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT de.muehlencord.shared diff --git a/network/nb-configuration.xml b/network/nb-configuration.xml deleted file mode 100644 index d1a1178..0000000 --- a/network/nb-configuration.xml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - all - - diff --git a/network/pom.xml b/network/pom.xml index d82a5d6..a9dde27 100644 --- a/network/pom.xml +++ b/network/pom.xml @@ -16,29 +16,35 @@ limitations under the License. shared-network - - ${project.artifactId} - + de.muehlencord.shared + 4.0.0 + shared-network + + jar + + + shared + de.muehlencord + 2.0.1-SNAPSHOT + + + + UTF-8 + + + http://maven.apache.org + - - junit-jupiter-engine - org.junit.jupiter - test - + slf4j-api org.slf4j provided - - slf4j-jdk14 - org.slf4j - test - + shared-util de.muehlencord.shared - jar @@ -56,29 +62,17 @@ limitations under the License. compile + - jaxws-api - javax.xml.ws + org.junit.jupiter + junit-jupiter-api + test + + + slf4j-jdk14 + org.slf4j test - 2.3.1 - de.muehlencord.shared - 4.0.0 - shared-network - jar - - - shared - de.muehlencord - 2.0.0-SNAPSHOT - - - UTF-8 - - - http://maven.apache.org - - 2.0.0-SNAPSHOT diff --git a/network/src/test/java/de/muehlencord/shared/network/http/HttpLayerTest.java b/network/src/test/java/de/muehlencord/shared/network/http/HttpLayerTest.java index edf3bec..996bab4 100644 --- a/network/src/test/java/de/muehlencord/shared/network/http/HttpLayerTest.java +++ b/network/src/test/java/de/muehlencord/shared/network/http/HttpLayerTest.java @@ -1,4 +1,4 @@ -/* +/* * Copyright 2019 Joern Muehlencord (joern@muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -22,77 +22,76 @@ import java.util.List; import java.util.Map; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.Test;k /** - * * @author Joern Muehlencord (joern@muehlencord.de) */ -public class HttpLayerTest extends BaseTest { +class HttpLayerTest extends BaseTest { - @Test - @Disabled - public void testPostByMap() throws Exception { - System.out.println("testPostByMap"); - Map map = new HashMap<>(); - String[] value = {"Hello World!", "Hello World again"}; - map.put("message", value); + @Test + @Disabled + void testPostByMap() throws Exception { + System.out.println("testPostByMap"); + Map map = new HashMap<>(); + String[] value = { "Hello World!", "Hello World again" }; + map.put("message", value); - HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener"); - httpLayer.post(map); - } + HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener"); + httpLayer.post(map); + } - @Test - @Disabled - public void testPostByMapList() throws Exception { - System.out.println("testPostByMapList"); - List> list = new LinkedList<>(); - Map map = new HashMap<>(); - String[] value = {"Hello World!", "Hello World again"}; - map.put("message", value); - list.add(map); - map = new HashMap<>(); - String[] urlValue = {"http://localhost:8080/testurl"}; - map.put("url", urlValue); - list.add(map); + @Test + @Disabled + void testPostByMapList() throws Exception { + System.out.println("testPostByMapList"); + List> list = new LinkedList<>(); + Map map = new HashMap<>(); + String[] value = { "Hello World!", "Hello World again" }; + map.put("message", value); + list.add(map); + map = new HashMap<>(); + String[] urlValue = { "http://localhost:8080/testurl" }; + map.put("url", urlValue); + list.add(map); - HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener"); - httpLayer.post(list); - } + HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener"); + httpLayer.post(list); + } - @Test - @Disabled - public void testByValue() throws Exception { - System.out.println("testByValue"); - HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener"); - httpLayer.post("message", "Hello World by single parameter"); - } + @Test + @Disabled + void testByValue() throws Exception { + System.out.println("testByValue"); + HttpLayer httpLayer = new HttpLayer("http://localhost:8080/HttpPostListener/HttpPostListener"); + httpLayer.post("message", "Hello World by single parameter"); + } - @Test - public void testWithUnknownURL() throws MessageNotSendException { - System.out.println("testWithUnknownURL"); - HttpLayer httpLayer = new HttpLayer("http://localhost/thisURLDoesNotExist"); - Assertions.assertThrows(MessageNotSendException.class, () -> { - httpLayer.post("message", "Hello World by single parameter"); - }); + @Test + void testWithUnknownURL() throws MessageNotSendException { + System.out.println("testWithUnknownURL"); + HttpLayer httpLayer = new HttpLayer("http://localhost/thisURLDoesNotExist"); + Assertions.assertThrows(MessageNotSendException.class, () -> { + httpLayer.post("message", "Hello World by single parameter"); + }); - } + } - @Test - public void testInvalidURL() throws MessageNotSendException { - System.out.println("testInvalidURL"); - HttpLayer httpLayer = new HttpLayer("joern@muehlencord.de"); - Assertions.assertThrows(MessageNotSendException.class, () -> { - httpLayer.post("message", "Hello World by single parameter"); - }); - } + @Test + void testInvalidURL() throws MessageNotSendException { + System.out.println("testInvalidURL"); + HttpLayer httpLayer = new HttpLayer("joern@muehlencord.de"); + Assertions.assertThrows(MessageNotSendException.class, () -> { + httpLayer.post("message", "Hello World by single parameter"); + }); + } - @Test - public void testUnsupportedURL() throws MessageNotSendException { - System.out.println("testUnsupportedURL"); - HttpLayer httpLayer = new HttpLayer("ftp://localhost"); - Assertions.assertThrows(MessageNotSendException.class, () -> { - httpLayer.post("message", "Hello World by single parameter"); - }); - } + @Test + void testUnsupportedURL() throws MessageNotSendException { + System.out.println("testUnsupportedURL"); + HttpLayer httpLayer = new HttpLayer("ftp://localhost"); + Assertions.assertThrows(MessageNotSendException.class, () -> { + httpLayer.post("message", "Hello World by single parameter"); + }); + } } diff --git a/poi-util/pom.xml b/poi-util/pom.xml index 24a4b92..cdd83f3 100644 --- a/poi-util/pom.xml +++ b/poi-util/pom.xml @@ -47,9 +47,9 @@ limitations under the License. shared de.muehlencord - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT diff --git a/pom.xml b/pom.xml index a12875a..6669609 100644 --- a/pom.xml +++ b/pom.xml @@ -18,8 +18,9 @@ limitations under the License. 4.0.0 + de.muehlencord shared - 2.0.0-SNAPSHOT + 2.0.1-SNAPSHOT shared pom @@ -54,17 +55,24 @@ limitations under the License. https://jomu.timelord.de/git/jomu/shared/ + + + gitea + https://jomu.timelord.de/git/api/packages/jomu/maven + + + - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + jomu-gitea + https://jomu.timelord.de/git/api/packages/jomu/maven - ossrh - https://oss.sonatype.org/content/repositories/snapshots + jomu-gitea + https://jomu.timelord.de/git/api/packages/jomu/maven - de.muehlencord + Gitea diff --git a/util/pom.xml b/util/pom.xml index b4b4f75..eb91721 100644 --- a/util/pom.xml +++ b/util/pom.xml @@ -1,4 +1,3 @@ - - - 4.0.0 + + 4.0.0 - de.muehlencord.shared - shared-util - jar - - shared-util - - - shared - de.muehlencord - 2.0.0-SNAPSHOT - - - - http://maven.apache.org - - UTF-8 - + de.muehlencord.shared + shared-util + jar - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.slf4j - slf4j-api - provided - - - org.bouncycastle - bcprov-jdk15on - - + shared-util + + + shared + de.muehlencord + 2.0.1-SNAPSHOT + + + + http://maven.apache.org + + UTF-8 + + + + + org.junit.jupiter + junit-jupiter-api + test + + + org.slf4j + slf4j-api + provided + + + org.bouncycastle + bcprov-jdk15on + + diff --git a/util/src/test/java/de/muehlencord/shared/util/PasswordUtilTest.java b/util/src/test/java/de/muehlencord/shared/util/PasswordUtilTest.java index e2d33bc..fda3c05 100644 --- a/util/src/test/java/de/muehlencord/shared/util/PasswordUtilTest.java +++ b/util/src/test/java/de/muehlencord/shared/util/PasswordUtilTest.java @@ -1,4 +1,4 @@ -/* +/* * Copyright 2019 Joern Muehlencord (joern@muehlencord.de). * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -15,45 +15,46 @@ */ package de.muehlencord.shared.util; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + import java.security.SecureRandom; import org.bouncycastle.util.encoders.Base64; -import static org.junit.jupiter.api.Assertions.assertFalse; -import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; /** - * * @author Joern Muehlencord (joern@muehlencord.de) */ -public class PasswordUtilTest { - - private static SecureRandom secureRandom; - private static String systemSalt64Coded; - private static byte[] systemSaltBytes; - - @BeforeAll - public static void init() { - secureRandom = new SecureRandom(); - - systemSaltBytes = new byte[32]; - secureRandom.nextBytes (systemSaltBytes); - systemSalt64Coded = new String(Base64.encode (systemSaltBytes)); - } - +class PasswordUtilTest { - @Test - public void testGetHash() { - PasswordUtil pwUtil = new PasswordUtil(systemSalt64Coded); - - String password1 = pwUtil.getHash("password"); - String password2 = pwUtil.getHash("password"); - - assertFalse (password1.equals(password2)); - assertTrue (pwUtil.matches ("password", password1)); - assertFalse (pwUtil.matches ("wrongpassword", password1)); - + private static SecureRandom secureRandom; + private static String systemSalt64Coded; + private static byte[] systemSaltBytes; + + @BeforeAll + public static void init() { + secureRandom = new SecureRandom(); + + systemSaltBytes = new byte[32]; + secureRandom.nextBytes(systemSaltBytes); + systemSalt64Coded = new String(Base64.encode(systemSaltBytes)); + } + + + @Test + void testGetHash() { + PasswordUtil pwUtil = new PasswordUtil(systemSalt64Coded); + + String password1 = pwUtil.getHash("password"); + String password2 = pwUtil.getHash("password"); + + assertNotEquals(password1, password2); + assertTrue(pwUtil.matches("password", password1)); + assertFalse(pwUtil.matches("wrongpassword", password1)); + + + } - } - }