diff --git a/Makefile b/Makefile deleted file mode 100644 index 9c8960d..0000000 --- a/Makefile +++ /dev/null @@ -1,25 +0,0 @@ -JAVA_BUILD_OPTS = -g -source 1.8 -target 1.8 -cp .:$(CP) -CP = `find lib -name "*.jar" -printf %p:` -CP_SPACE = `ls lib/*.jar` - -.PHONY: ipfs -ipfs: - rm -rf build - mkdir -p build - echo "Name: IPFS Java HTTP Client library" > def.manifest - javac $(JAVA_BUILD_OPTS) -d build `find src -name \*.java` - jar -cfm IPFS.jar def.manifest \ - -C build org - rm -f def.manifest - -.PHONY: tests -tests: - rm -rf build - mkdir -p build - echo "Name: IPFS Java HTTP Client library Tests" > def.manifest - echo "Class-Path: " $(CP_SPACE)>> def.manifest - javac $(JAVA_BUILD_OPTS) -d build -cp $(CP) `find src test -name \*.java` - jar -cfm Tests.jar def.manifest \ - -C build org - rm -f def.manifest - java -cp $(CP):Tests.jar org.junit.runner.JUnitCore org.ipfs.test.Test diff --git a/lib/hamcrest-core-1.3.jar b/lib/hamcrest-core-1.3.jar deleted file mode 100644 index 9d5fe16..0000000 Binary files a/lib/hamcrest-core-1.3.jar and /dev/null differ diff --git a/lib/junit-4.12.jar b/lib/junit-4.12.jar deleted file mode 100644 index 3a7fc26..0000000 Binary files a/lib/junit-4.12.jar and /dev/null differ diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..c0f48ad --- /dev/null +++ b/pom.xml @@ -0,0 +1,47 @@ + + 4.0.0 + + org.ipfs + api + 0.0.1-SNAPSHOT + jar + + java-ipfs-api + https://github.com/ipfs/java-ipfs-api + + + UTF-8 + UTF-8 + 4.12 + 1.3 + + + + + junit + junit + ${junit.version} + test + + + org.hamcrest + hamcrest-core + ${hamcrest.version} + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.1 + + 1.8 + 1.8 + + + + + diff --git a/src/org/ipfs/Base58.java b/src/main/java/org/ipfs/api/Base58.java similarity index 99% rename from src/org/ipfs/Base58.java rename to src/main/java/org/ipfs/api/Base58.java index 89a81bf..1f7ad39 100644 --- a/src/org/ipfs/Base58.java +++ b/src/main/java/org/ipfs/api/Base58.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; /** * Copyright 2011 Google Inc. diff --git a/src/org/ipfs/IPFS.java b/src/main/java/org/ipfs/api/IPFS.java similarity index 99% rename from src/org/ipfs/IPFS.java rename to src/main/java/org/ipfs/api/IPFS.java index 44b700d..cdf0039 100644 --- a/src/org/ipfs/IPFS.java +++ b/src/main/java/org/ipfs/api/IPFS.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; import java.io.*; import java.net.*; diff --git a/src/org/ipfs/JSONParser.java b/src/main/java/org/ipfs/api/JSONParser.java similarity index 99% rename from src/org/ipfs/JSONParser.java rename to src/main/java/org/ipfs/api/JSONParser.java index 283c095..581659a 100644 --- a/src/org/ipfs/JSONParser.java +++ b/src/main/java/org/ipfs/api/JSONParser.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; import java.util.*; diff --git a/src/org/ipfs/MerkleNode.java b/src/main/java/org/ipfs/api/MerkleNode.java similarity index 99% rename from src/org/ipfs/MerkleNode.java rename to src/main/java/org/ipfs/api/MerkleNode.java index 5c8d407..da8b98d 100644 --- a/src/org/ipfs/MerkleNode.java +++ b/src/main/java/org/ipfs/api/MerkleNode.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; import java.util.*; import java.util.stream.*; diff --git a/src/org/ipfs/MultiAddress.java b/src/main/java/org/ipfs/api/MultiAddress.java similarity index 99% rename from src/org/ipfs/MultiAddress.java rename to src/main/java/org/ipfs/api/MultiAddress.java index b2b460b..0c66aff 100644 --- a/src/org/ipfs/MultiAddress.java +++ b/src/main/java/org/ipfs/api/MultiAddress.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; import java.io.*; import java.util.*; diff --git a/src/org/ipfs/Multihash.java b/src/main/java/org/ipfs/api/Multihash.java similarity index 99% rename from src/org/ipfs/Multihash.java rename to src/main/java/org/ipfs/api/Multihash.java index 0fbf38d..b561222 100644 --- a/src/org/ipfs/Multihash.java +++ b/src/main/java/org/ipfs/api/Multihash.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; import java.io.*; import java.util.*; diff --git a/src/org/ipfs/Multipart.java b/src/main/java/org/ipfs/api/Multipart.java similarity index 99% rename from src/org/ipfs/Multipart.java rename to src/main/java/org/ipfs/api/Multipart.java index 2225cd7..6673da7 100644 --- a/src/org/ipfs/Multipart.java +++ b/src/main/java/org/ipfs/api/Multipart.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; import java.io.*; import java.net.*; diff --git a/src/org/ipfs/NamedStreamable.java b/src/main/java/org/ipfs/api/NamedStreamable.java similarity index 98% rename from src/org/ipfs/NamedStreamable.java rename to src/main/java/org/ipfs/api/NamedStreamable.java index 0bed1cb..66b79da 100644 --- a/src/org/ipfs/NamedStreamable.java +++ b/src/main/java/org/ipfs/api/NamedStreamable.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; import java.io.*; import java.util.*; diff --git a/src/org/ipfs/Protocol.java b/src/main/java/org/ipfs/api/Protocol.java similarity index 99% rename from src/org/ipfs/Protocol.java rename to src/main/java/org/ipfs/api/Protocol.java index 1dbc649..3cf2b93 100644 --- a/src/org/ipfs/Protocol.java +++ b/src/main/java/org/ipfs/api/Protocol.java @@ -1,4 +1,4 @@ -package org.ipfs; +package org.ipfs.api; import java.io.*; import java.net.*; diff --git a/test/org/ipfs/test/Test.java b/src/test/java/org/ipfs/api/Test.java similarity index 97% rename from test/org/ipfs/test/Test.java rename to src/test/java/org/ipfs/api/Test.java index 5f18562..bd9953b 100644 --- a/test/org/ipfs/test/Test.java +++ b/src/test/java/org/ipfs/api/Test.java @@ -1,9 +1,12 @@ -package org.ipfs.test; +package org.ipfs.api; -import org.ipfs.*; - -import java.io.*; -import java.util.*; +import java.io.File; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Random; public class Test {