Skip to content

Commit 686c2fd

Browse files
committed
set JitPack dependencies; rename classes as discussed in #1
1 parent 67d48e6 commit 686c2fd

File tree

6 files changed

+27
-20
lines changed

6 files changed

+27
-20
lines changed

build.xml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<target name="compile" depends="init" description="compile the source">
2121
<javac includeantruntime="false" srcdir="${src}" destdir="${build}" debug="true" debuglevel="lines,vars,source">
2222
<classpath>
23-
<fileset dir="lib">
23+
<fileset dir="lib">
2424
<include name="**/*.jar" />
2525
</fileset>
2626
</classpath>
@@ -35,32 +35,31 @@
3535
<manifestclasspath property="manifest_cp" jarfile="myjar.jar">
3636
<classpath refid="dep.runtime" />
3737
</manifestclasspath>
38-
<jar jarfile="${dist}/IPFS.jar" basedir="${build}">
38+
<jar jarfile="${dist}/ipfs.jar" basedir="${build}">
3939
<manifest>
40-
<attribute name="Class-Path" value="${manifest_cp}"/>
40+
<attribute name="Class-Path" value="${manifest_cp}"/>
41+
<attribute name="Implementation-Vendor" value="io.ipfs"/>
42+
<attribute name="Implementation-Title" value="multiaddr"/>
43+
<attribute name="Implementation-Version" value="1.0.0"/>
4144
</manifest>
4245
</jar>
43-
<copy todir=".">
44-
<fileset file="${dist}/IPFS.jar"/>
45-
</copy>
4646
</target>
4747

48-
4948
<target name="test" depends="compile,dist">
5049
<junit printsummary="yes" fork="true" haltonfailure="yes">
5150
<jvmarg value="-Xmx1g"/>
5251
<classpath>
5352
<pathelement location="lib/junit-4.11.jar" />
5453
<pathelement location="lib/hamcrest-core-1.3.jar" />
55-
<pathelement location="lib/Multihash.jar" />
56-
<pathelement location="lib/Multiaddr.jar" />
57-
<pathelement location="IPFS.jar" />
54+
<pathelement location="lib/multihash.jar" />
55+
<pathelement location="lib/multiaddr.jar" />
56+
<pathelement location="dist/ipfs.jar" />
5857
</classpath>
59-
<test name="org.ipfs.api.APITests" haltonfailure="yes">
58+
<test name="org.ipfs.api.APITest" haltonfailure="yes">
6059
<formatter type="plain"/>
6160
<formatter type="xml"/>
6261
</test>
63-
</junit>
62+
</junit>
6463
</target>
6564

6665
<target name="clean" description="clean up">

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@
5757
<scope>test</scope>
5858
</dependency>
5959
<dependency>
60-
<groupId>io.ipfs.multiformats</groupId>
61-
<artifactId>multiaddr</artifactId>
60+
<groupId>com.github.multiformats</groupId>
61+
<artifactId>java-multiaddr</artifactId>
6262
<version>v1.0.0</version>
6363
</dependency>
6464
<dependency>
65-
<groupId>io.ipfs.multiformats</groupId>
66-
<artifactId>multihash</artifactId>
65+
<groupId>com.github.multiformats</groupId>
66+
<artifactId>java-multihash</artifactId>
6767
<version>v1.0.0</version>
6868
</dependency>
6969
</dependencies>

src/main/java/org/ipfs/api/IPFS.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package org.ipfs.api;
22

3+
import io.ipfs.multiaddr.Multihash;
4+
import io.ipfs.multiaddr.MultiAddress;
5+
36
import java.io.*;
47
import java.net.*;
58
import java.util.*;

src/main/java/org/ipfs/api/JSONParser.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package org.ipfs.api;
1+
package io.ipfs.api;
22

33
import java.util.*;
44

@@ -451,4 +451,4 @@ public static Object getValue(Object json, String path)
451451

452452
return json;
453453
}
454-
}
454+
}

src/main/java/org/ipfs/api/MerkleNode.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
package org.ipfs.api;
22

3+
import io.ipfs.multihash.Multihash;
4+
35
import java.util.*;
46
import java.util.stream.*;
57

src/test/java/org/ipfs/api/APITests.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
package org.ipfs.api;
1+
package io.ipfs.api;
2+
3+
import io.ipfs.multihash.Multihash;
4+
import io.ipfs.multiaddr.MultiAddress;
25

36
import java.io.*;
47
import java.nio.file.*;
58
import java.util.*;
69

710
import static org.junit.Assert.assertTrue;
811

9-
public class APITests {
12+
public class APITest {
1013

1114
private final IPFS ipfs = new IPFS(new MultiAddress("/ip4/127.0.0.1/tcp/5001"));
1215

0 commit comments

Comments
 (0)