Skip to content

Commit 5e6eaa2

Browse files
committed
update Java version
1 parent 04dc817 commit 5e6eaa2

File tree

2 files changed

+77
-23
lines changed

2 files changed

+77
-23
lines changed

pom.xml

Lines changed: 72 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,66 @@
44
<groupId>com.upokecenter</groupId>
55
<artifactId>cbor</artifactId>
66
<packaging>jar</packaging>
7-
<version>4.1.0-SNAPSHOT</version>
7+
<version>4.2.0-a0-SNAPSHOT</version>
88
<name>CBOR (Concise Binary Object Representation)</name>
9-
<description>A Java implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 7049. </description>
9+
<description>A Java implementation of Concise Binary Object Representation (CBOR), a general-purpose binary data format defined in RFC 7049.</description>
1010
<url>https://github.com/peteroupc/CBOR-Java</url>
11+
<profiles>
12+
<profile>
13+
<id>release</id>
14+
<build>
15+
<plugins>
16+
<plugin>
17+
<groupId>org.apache.maven.plugins</groupId>
18+
<artifactId>maven-gpg-plugin</artifactId>
19+
<version>1.5</version>
20+
<executions>
21+
<execution>
22+
<id>sign-artifacts</id>
23+
<phase>verify</phase>
24+
<goals>
25+
<goal>sign</goal>
26+
</goals>
27+
</execution>
28+
</executions>
29+
</plugin>
30+
<plugin>
31+
<groupId>org.apache.maven.plugins</groupId>
32+
<artifactId>maven-javadoc-plugin</artifactId>
33+
<version>3.0.1</version>
34+
<configuration>
35+
<bottom>CBOR for Java documentation, generated in {currentYear}.</bottom>
36+
<additionalJOptions>
37+
<additionalJOption>-html5</additionalJOption>
38+
</additionalJOptions>
39+
40+
</configuration>
41+
<executions>
42+
<execution>
43+
<id>attach-javadocs</id>
44+
<goals>
45+
<goal>jar</goal>
46+
</goals>
47+
</execution>
48+
</executions>
49+
</plugin>
50+
<plugin>
51+
<groupId>org.apache.maven.plugins</groupId>
52+
<artifactId>maven-source-plugin</artifactId>
53+
<version>2.2.1</version>
54+
<executions>
55+
<execution>
56+
<id>attach-sources</id>
57+
<goals>
58+
<goal>jar-no-fork</goal>
59+
</goals>
60+
</execution>
61+
</executions>
62+
</plugin>
63+
</plugins>
64+
</build>
65+
</profile>
66+
</profiles>
1167
<scm>
1268
<connection>scm:git:https://github.com/peteroupc/CBOR-Java</connection>
1369
<developerConnection>scm:git:https://github.com/peteroupc/CBOR-Java.git</developerConnection>
@@ -26,8 +82,8 @@
2682
</developers>
2783
<properties>
2884
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
29-
<maven.compiler.source>8</maven.compiler.source>
30-
<maven.compiler.target>1.8</maven.compiler.target>
85+
<maven.compiler.source>6</maven.compiler.source>
86+
<maven.compiler.target>1.6</maven.compiler.target>
3187
</properties>
3288
<licenses>
3389
<license>
@@ -44,15 +100,21 @@
44100
<version>3.7.0</version>
45101
<configuration>
46102
<compilerArgs>
47-
<arg>-Xlint:deprecation</arg>
103+
<arg>-Xlint:all</arg>
48104
</compilerArgs>
49105
</configuration>
50106
</plugin>
51-
<plugin>
52-
<groupId>edu.berkeley.cs.jqf</groupId>
53-
<artifactId>jqf-maven-plugin</artifactId>
54-
<version>1.4</version>
55-
</plugin>
107+
<plugin>
108+
<groupId>org.sonatype.plugins</groupId>
109+
<artifactId>nexus-staging-maven-plugin</artifactId>
110+
<extensions>true</extensions>
111+
<version>1.6.1</version>
112+
<configuration>
113+
<serverId>ossrh</serverId>
114+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
115+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
116+
</configuration>
117+
</plugin>
56118
</plugins>
57119
</build>
58120
<distributionManagement>
@@ -62,16 +124,6 @@
62124
</snapshotRepository>
63125
</distributionManagement>
64126
<dependencies>
65-
<dependency>
66-
<groupId>edu.berkeley.cs.jqf</groupId>
67-
<artifactId>jqf-fuzz</artifactId>
68-
<version>1.4</version>
69-
</dependency>
70-
<dependency>
71-
<groupId>com.alibaba</groupId>
72-
<artifactId>fastjson</artifactId>
73-
<version>1.2.68</version>
74-
</dependency>
75127
<dependency>
76128
<groupId>junit</groupId>
77129
<artifactId>junit</artifactId>

src/test/java/com/upokecenter/test/CBORTest.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,7 @@ public void TestCanFitIn() {
743743
}
744744
CBORObject cbor = CBORObject.DecodeFromBytes(new byte[] {
745745
(byte)0xfb,
746-
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
746+
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
747747
});
748748
TestCanFitInOne(cbor);
749749
}
@@ -2904,7 +2904,9 @@ public static boolean TestAsNumberMultiplyDivideOne(
29042904
"o1=" + TestCommon.ToByteArrayString(eb1) + "\n" +
29052905
"o2=" + TestCommon.ToByteArrayString(eb2) + "\n");
29062906
}
2907-
VerifyEqual(on2a, on2, o1, o2);
2907+
if (!on1.IsZero() && !on2.IsZero()) {
2908+
VerifyEqual(on2a, on2, o1, o2);
2909+
}
29082910
CBORNumber on1a = onSum.Divide(on2);
29092911
// NOTE: Ignore if divisor is zero
29102912
if (!on2.IsZero() && !on1a.IsFinite()) {
@@ -2926,7 +2928,7 @@ public static boolean TestAsNumberMultiplyDivideOne(
29262928
public void TestAsNumberMultiplyDivide() {
29272929
byte[] bo1 = new byte[] {
29282930
0x1b, 0x75, (byte)0xdd, (byte)0xb0,
2929-
(byte)0xcc, 0x50, (byte)0x9b, (byte)0xd0, 0x2b
2931+
(byte)0xcc, 0x50, (byte)0x9b, (byte)0xd0, 0x2b,
29302932
};
29312933
byte[] bo2 = new byte[] { (byte)0xc5, (byte)0x82, 0x23, 0x00 };
29322934
CBORObject cbor1 = CBORObject.DecodeFromBytes(bo1);

0 commit comments

Comments
 (0)