Skip to content

Commit 1962227

Browse files
committed
updated test, maven plugins and protobuf version
1 parent 4aca347 commit 1962227

File tree

2 files changed

+86
-82
lines changed

2 files changed

+86
-82
lines changed

pom.xml

Lines changed: 71 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66

77
<groupId>com.wavesplatform</groupId>
88
<artifactId>waves-transactions</artifactId>
9-
<version>1.2.6-SNAPSHOT</version>
9+
<version>1.2.6</version>
10+
<packaging>jar</packaging>
1011

1112
<properties>
1213
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
@@ -43,73 +44,51 @@
4344
</developer>
4445
</developers>
4546

46-
<profiles>
47-
<!-- Deployment profile (required so these plugins are only used when deploying) -->
48-
<profile>
49-
<id>deploy</id>
50-
<build>
51-
<plugins>
52-
<plugin>
53-
<groupId>org.apache.maven.plugins</groupId>
54-
<artifactId>maven-javadoc-plugin</artifactId>
55-
<version>3.3.0</version>
56-
<configuration>
57-
<source>8</source>
58-
</configuration>
59-
<executions>
60-
<execution>
61-
<id>attach-javadocs</id>
62-
<goals>
63-
<goal>jar</goal>
64-
</goals>
65-
</execution>
66-
</executions>
67-
</plugin>
68-
<plugin>
69-
<groupId>org.apache.maven.plugins</groupId>
70-
<artifactId>maven-gpg-plugin</artifactId>
71-
<version>3.2.0</version>
72-
<executions>
73-
<execution>
74-
<id>sign-artifacts</id>
75-
<phase>verify</phase>
76-
<goals>
77-
<goal>sign</goal>
78-
</goals>
79-
</execution>
80-
</executions>
81-
</plugin>
82-
<plugin>
83-
<groupId>org.sonatype.plugins</groupId>
84-
<artifactId>nexus-staging-maven-plugin</artifactId>
85-
<version>1.6.8</version>
86-
<extensions>true</extensions>
87-
<configuration>
88-
<serverId>ossrh</serverId>
89-
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
90-
<autoReleaseAfterClose>true</autoReleaseAfterClose>
91-
</configuration>
92-
</plugin>
93-
</plugins>
94-
</build>
95-
</profile>
96-
</profiles>
97-
9847
<build>
9948
<plugins>
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-enforcer-plugin</artifactId>
52+
<version>3.6.2</version>
53+
<executions>
54+
<execution>
55+
<id>enforce-maven</id>
56+
<goals>
57+
<goal>enforce</goal>
58+
</goals>
59+
<configuration>
60+
<rules>
61+
<requireMavenVersion>
62+
<version>3.6.3</version>
63+
</requireMavenVersion>
64+
</rules>
65+
</configuration>
66+
</execution>
67+
</executions>
68+
</plugin>
69+
<plugin>
70+
<groupId>org.sonatype.central</groupId>
71+
<artifactId>central-publishing-maven-plugin</artifactId>
72+
<version>0.9.0</version>
73+
<extensions>true</extensions>
74+
<configuration>
75+
<autoPublish>true</autoPublish>
76+
<waitUntil>published</waitUntil>
77+
</configuration>
78+
</plugin>
10079
<plugin>
10180
<groupId>org.apache.maven.plugins</groupId>
10281
<artifactId>maven-compiler-plugin</artifactId>
103-
<version>3.8.1</version>
82+
<version>3.14.1</version>
10483
<configuration>
105-
<source>8</source>
106-
<target>8</target>
84+
<source>11</source>
85+
<target>11</target>
10786
</configuration>
10887
</plugin>
10988
<plugin>
11089
<groupId>org.apache.maven.plugins</groupId>
11190
<artifactId>maven-source-plugin</artifactId>
112-
<version>3.2.1</version>
91+
<version>3.3.1</version>
11392
<executions>
11493
<execution>
11594
<id>attach-sources</id>
@@ -119,15 +98,29 @@
11998
</execution>
12099
</executions>
121100
</plugin>
101+
<plugin>
102+
<groupId>org.apache.maven.plugins</groupId>
103+
<artifactId>maven-gpg-plugin</artifactId>
104+
<version>3.2.8</version>
105+
<executions>
106+
<execution>
107+
<id>sign-artifacts</id>
108+
<phase>verify</phase>
109+
<goals>
110+
<goal>sign</goal>
111+
</goals>
112+
</execution>
113+
</executions>
114+
</plugin>
122115
<plugin>
123116
<groupId>org.apache.maven.plugins</groupId>
124117
<artifactId>maven-surefire-plugin</artifactId>
125-
<version>2.22.2</version>
118+
<version>3.5.4</version>
126119
</plugin>
127120
<plugin>
128121
<groupId>org.apache.maven.plugins</groupId>
129122
<artifactId>maven-jar-plugin</artifactId>
130-
<version>3.2.0</version>
123+
<version>3.5.0</version>
131124
<configuration>
132125
<archive>
133126
<manifest>
@@ -145,8 +138,24 @@
145138
</plugin>
146139
<plugin>
147140
<groupId>org.apache.maven.plugins</groupId>
148-
<artifactId>maven-dependency-plugin</artifactId>
149-
<version>3.3.0</version>
141+
<artifactId>maven-javadoc-plugin</artifactId>
142+
<version>3.12.0</version>
143+
<executions>
144+
<execution>
145+
<id>attach-javadocs</id>
146+
<goals>
147+
<goal>jar</goal>
148+
</goals>
149+
<configuration>
150+
<source>11</source>
151+
<doclint>none</doclint>
152+
</configuration>
153+
</execution>
154+
</executions>
155+
<configuration>
156+
<source>11</source>
157+
<doclint>none</doclint>
158+
</configuration>
150159
</plugin>
151160
</plugins>
152161
</build>
@@ -172,7 +181,6 @@
172181
</distributionManagement>
173182

174183
<dependencies>
175-
<!-- waves -->
176184
<dependency>
177185
<groupId>com.wavesplatform</groupId>
178186
<artifactId>waves-crypto</artifactId>
@@ -181,17 +189,13 @@
181189
<dependency>
182190
<groupId>com.wavesplatform</groupId>
183191
<artifactId>protobuf-schemas</artifactId>
184-
<version>1.6.0-90-SNAPSHOT</version>
192+
<version>1.6.0</version>
185193
</dependency>
186-
187-
<!-- json -->
188194
<dependency>
189195
<groupId>com.fasterxml.jackson.core</groupId>
190196
<artifactId>jackson-databind</artifactId>
191197
<version>2.16.1</version>
192198
</dependency>
193-
194-
<!-- ethereum transaction -->
195199
<dependency>
196200
<groupId>org.web3j</groupId>
197201
<artifactId>crypto</artifactId>
@@ -203,8 +207,6 @@
203207
</exclusion>
204208
</exclusions>
205209
</dependency>
206-
207-
<!-- testing -->
208210
<dependency>
209211
<groupId>org.junit.jupiter</groupId>
210212
<artifactId>junit-jupiter</artifactId>

src/test/java/com/wavesplatform/transactions/CommitToGenerationTransactionTest.java

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
import com.wavesplatform.transactions.common.AssetId;
99
import com.wavesplatform.transactions.common.Id;
1010
import com.wavesplatform.transactions.common.Proof;
11+
import com.wavesplatform.transactions.serializers.json.JsonSerializer;
12+
import org.assertj.core.api.Assertions;
1113
import org.junit.jupiter.api.BeforeAll;
1214
import org.junit.jupiter.params.ParameterizedTest;
1315
import org.junit.jupiter.params.provider.Arguments;
@@ -28,22 +30,22 @@ static void beforeAll() {
2830
WavesConfig.chainId('D');
2931
}
3032

31-
private static final PublicKey sender = PublicKey.as("2JYMTjUK7tC8NQi6TD6oWgy41YbrnXuoLzZydrFKTKt6");
32-
private static final long timestamp = 1759169607086L;
33+
private static final PublicKey sender = PublicKey.as("Bn21Eg8HbwZWZQMHXnTFnb64MhVjgH2HygDekQDbjjMq");
34+
private static final long timestamp = 1766488084192L;
3335

3436
private static final long fee = CommitToGenerationTransaction.MIN_FEE;
3537

3638
static Stream<Arguments> transactionsProvider() {
3739

3840
return Stream.of(
39-
arguments(1, 80,
40-
"6TGkDGP9my3dLeU1LphyCsYDcxeqfiz6xbFdNPG38PdQwEuUZeBTDr8QTTiR3XvMKR",
41-
"26DBpJeCPNrvD1q6mhNDcaHHbXg86tcbzfqpswbydjDcPNGSHVmPZozfcPh4z7NpBsz5pvHd9g4p2YqyYFXKpUTZAAHh1cDZbbB25HAE7a57NymCQewnTTQEEC2SCEY4U6qX",
42-
Id.as("AFQu6csUmCpXT92RD2hBRMkbPSfi5CGWRwnKJ8ANxsiV"),
43-
Proof.list(Proof.as("4Ki4PUwpve4tXeDjuNQF7k6jPAfyG9bNBubFGUhfSYWvddCLavdhEGdMmtmrThSLKC2vQATQnQzmz3U1r7wc9Fke")),
44-
Base64.decode("CEQSIBNaAul/RLTjlhwfp7Jm/1/avwgBD8OJDzKZWlbCLRpLGgUQgK3iBCCu67e1mTMoAcIHlgEIUBIwlKcg89S+mY5xcj6NIOPPYtlCFxs3VmbFFYcGPf1+vm8sTOcvhqiE+xWeeffPOQ7kGmC3fzy2EOk2FVGxhAdLnZ9VZSbKouMemGgKu2E8IEXZM3y/RwqTH2JVKJSqTvf19uERvyO46uluB6TkpYdsq6K+bhzYp53YiioNLKLWRkTJXnw6ALpgiTf63QBQ3wQOcDo="),
45-
Base64.decode("Cs4BCEQSIBNaAul/RLTjlhwfp7Jm/1/avwgBD8OJDzKZWlbCLRpLGgUQgK3iBCCu67e1mTMoAcIHlgEIUBIwlKcg89S+mY5xcj6NIOPPYtlCFxs3VmbFFYcGPf1+vm8sTOcvhqiE+xWeeffPOQ7kGmC3fzy2EOk2FVGxhAdLnZ9VZSbKouMemGgKu2E8IEXZM3y/RwqTH2JVKJSqTvf19uERvyO46uluB6TkpYdsq6K+bhzYp53YiioNLKLWRkTJXnw6ALpgiTf63QBQ3wQOcDoSQKYvGWH9l4EKahy0uI0Ad7XZxeb9Z9om1DMem9gNEyi32KiTUYMvdOjwjkg3uxTFky02t/9RFp/33K0Q2K9dwgs="),
46-
"{\"senderPublicKey\":\"2JYMTjUK7tC8NQi6TD6oWgy41YbrnXuoLzZydrFKTKt6\",\"fee\":10000000,\"generationPeriodStart\":\"80\",\"type\":20,\"version\":1,\"sender\":\"3FSgXpgbT6m1speWgVx3cVxAZKmdr4barHU\",\"feeAssetId\":null,\"chainId\":68,\"proofs\":[\"4Ki4PUwpve4tXeDjuNQF7k6jPAfyG9bNBubFGUhfSYWvddCLavdhEGdMmtmrThSLKC2vQATQnQzmz3U1r7wc9Fke\"],\"commitmentSignature\":\"26DBpJeCPNrvD1q6mhNDcaHHbXg86tcbzfqpswbydjDcPNGSHVmPZozfcPh4z7NpBsz5pvHd9g4p2YqyYFXKpUTZAAHh1cDZbbB25HAE7a57NymCQewnTTQEEC2SCEY4U6qX\",\"endorserPublicKey\":\"6TGkDGP9my3dLeU1LphyCsYDcxeqfiz6xbFdNPG38PdQwEuUZeBTDr8QTTiR3XvMKR\",\"id\":\"AFQu6csUmCpXT92RD2hBRMkbPSfi5CGWRwnKJ8ANxsiV\",\"timestamp\":1759169607086}"
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id\":\"2r6kpnJbGqNTmLxi9cPuavgxqumGufnisnN8vhuSCpaX\",\"type\":19,\"version\":1,\"chainId\":68,\"senderPublicKey\":\"Bn21Eg8HbwZWZQMHXnTFnb64MhVjgH2HygDekQDbjjMq\",\"sender\":\"3FmjX4FAeDXE4ZdDj2JKxzE4QtbxaioXzxM\",\"generationPeriodStart\":2941,\"endorserPublicKey\":\"5t9zL1oqXW6kL3YUAuF8r4rKUaPwohPVrpMWR8Y1bAJtSMipP3TQJYZvpBFB7GWZwo\",\"commitmentSignature\":\"u9CTxLENQWyd5egnHrnbnnDKy7mvtrWJfR1AuCL4e4e7uuRTobzxVy1SQBz7ayoY5mRfiTG3PR8niJPT3fdVfsD97EkagBha8ehrLAzdutWSLbiQF2VDwPfi7uvTcp5csMC\",\"proofs\":[\"2H7TeCFEBSq6gb325Up2iZPr1jbZk99XugFijYTLbvgH2Ts8NQyCusG5p84FxKySEsVz7RUqsmQQJcCGU3xx75jt\"],\"fee\":10000000,\"feeAssetId\":null,\"timestamp\":1766488084192}"
4749
)
4850
);
4951
}
@@ -104,9 +106,9 @@ void commitToGenerationTransaction(int version, int generationPeriodStart, Strin
104106
.describedAs("Tx must be equal to deserialized tx")
105107
.isEqualTo(deserTx);
106108

107-
// Assertions.assertThat(JsonSerializer.JSON_MAPPER.readTree(Transaction.fromJson(expectedJson).toJson()))
108-
// .describedAs("Tx serialized to json must be equal to expected")
109-
// .isEqualTo(JsonSerializer.JSON_MAPPER.readTree(expectedJson));
109+
Assertions.assertThat(JsonSerializer.JSON_MAPPER.readTree(Transaction.fromJson(expectedJson).toJson()))
110+
.describedAs("Tx serialized to json must be equal to expected")
111+
.isEqualTo(JsonSerializer.JSON_MAPPER.readTree(expectedJson));
110112
}
111113

112114
}

0 commit comments

Comments
 (0)