Skip to content

Commit 2d1d62d

Browse files
committed
make it building
1 parent dce3198 commit 2d1d62d

6 files changed

Lines changed: 49 additions & 59 deletions

File tree

api/pom.xml

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<version>1.1.5-SNAPSHOT</version>
77
</parent>
88
<artifactId>api</artifactId>
9-
<name>Threema Messsge Gateway API</name>
9+
<name>Threema Messsage Gateway API</name>
1010
<licenses>
1111
<license>
1212
<name>MIT-License</name>
@@ -15,31 +15,6 @@
1515
</license>
1616
</licenses>
1717
<url>https://github.com/lordyavin/threema-msgapi-sdk-java</url>
18-
<properties>
19-
<source.encoding>UTF-8</source.encoding>
20-
<project.build.sourceEncoding>${source.encoding}</project.build.sourceEncoding>
21-
<project.reporting.outputEncoding>${source.encoding}</project.reporting.outputEncoding>
22-
</properties>
23-
<build>
24-
<plugins>
25-
<plugin>
26-
<groupId>org.apache.maven.plugins</groupId>
27-
<artifactId>maven-compiler-plugin</artifactId>
28-
<version>3.10.1</version>
29-
<configuration>
30-
<encoding>${source.encoding}</encoding>
31-
<source>17</source>
32-
<target>17</target>
33-
<annotationProcessorPaths>
34-
<path>
35-
<groupId>org.projectlombok</groupId>
36-
<artifactId>lombok</artifactId>
37-
</path>
38-
</annotationProcessorPaths>
39-
</configuration>
40-
</plugin>
41-
</plugins>
42-
</build>
4318
<dependencies>
4419
<dependency>
4520
<groupId>org.junit.jupiter</groupId>
@@ -66,7 +41,6 @@
6641
<dependency>
6742
<groupId>org.projectlombok</groupId>
6843
<artifactId>lombok</artifactId>
69-
<version>1.18.22</version>
7044
<scope>provided</scope>
7145
</dependency>
7246
</dependencies>

api/src/main/java/net/klesatschke/threema/api/CryptTool.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
public class CryptTool {
5454
private static final String HMAC_SHA256 = "HmacSHA256";
5555

56-
private CryptTool() {}
56+
private CryptTool() {}
5757

5858
/* HMAC-SHA256 keys for email/mobile phone hashing */
5959
private static final byte[] EMAIL_HMAC_KEY = {

cli/pom.xml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@
99
<version>1.1.5-SNAPSHOT</version>
1010
</parent>
1111
<artifactId>cli</artifactId>
12-
<name>Threema Messsge Gateway CLI</name>
13-
<properties>
14-
<source.encoding>UTF-8</source.encoding>
15-
<project.build.sourceEncoding>${source.encoding}</project.build.sourceEncoding>
16-
<project.reporting.outputEncoding>${source.encoding}</project.reporting.outputEncoding>
17-
</properties>
12+
<name>Threema Messsage Gateway CLI</name>
1813
<url>https://github.com/lordyavin/threema-msgapi-sdk-java</url>
1914
<licenses>
2015
<license>
@@ -23,19 +18,11 @@
2318
<distribution>repo</distribution>
2419
</license>
2520
</licenses>
26-
21+
<properties>
22+
<mainClass>net.klesatschke.threema.cli.ConsoleMain</mainClass>
23+
</properties>
2724
<build>
2825
<plugins>
29-
<plugin>
30-
<groupId>org.apache.maven.plugins</groupId>
31-
<artifactId>maven-compiler-plugin</artifactId>
32-
<version>3.10.1</version>
33-
<configuration>
34-
<encoding>${source.encoding}</encoding>
35-
<source>17</source>
36-
<target>17</target>
37-
</configuration>
38-
</plugin>
3926
<plugin>
4027
<!-- Build an executable JAR -->
4128
<groupId>org.apache.maven.plugins</groupId>
@@ -46,7 +33,7 @@
4633
<manifest>
4734
<addClasspath>true</addClasspath>
4835
<classpathPrefix>lib/</classpathPrefix>
49-
<mainClass>ch.threema.apitool.Console</mainClass>
36+
<mainClass>${mainClass}</mainClass>
5037
</manifest>
5138
</archive>
5239
</configuration>
@@ -58,7 +45,7 @@
5845
<configuration>
5946
<archive>
6047
<manifest>
61-
<mainClass>ch.threema.apitool.ConsoleMain</mainClass>
48+
<mainClass>${mainClass}</mainClass>
6249
</manifest>
6350
</archive>
6451
<descriptorRefs>
@@ -77,18 +64,18 @@
7764
</plugin>
7865
</plugins>
7966
</build>
80-
<distributionManagement>
81-
<repository>
82-
<id>github</id>
83-
<name>GitHub lordyavin Apache Maven Packages</name>
84-
<url>https://maven.pkg.github.com/lordyavin/threema-msgapi-sdk-java</url>
85-
</repository>
86-
</distributionManagement>
8767
<dependencies>
8868
<dependency>
8969
<groupId>net.klesatschke.threema</groupId>
9070
<artifactId>api</artifactId>
9171
<version>1.1.5-SNAPSHOT</version>
9272
</dependency>
9373
</dependencies>
74+
<distributionManagement>
75+
<repository>
76+
<id>github</id>
77+
<name>GitHub lordyavin Apache Maven Packages</name>
78+
<url>https://maven.pkg.github.com/lordyavin/threema-msgapi-sdk-java</url>
79+
</repository>
80+
</distributionManagement>
9481
</project>

cli/src/main/java/net/klesatschke/threema/cli/console/commands/CreditsCommand.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ protected void execute() throws Exception {
4949
System.out.println("Remaining credits: " + credits);
5050
} else {
5151
System.out.println("Error fetching credits");
52-
5352
}
5453
}
5554
}

cli/src/main/java/net/klesatschke/threema/cli/helpers/E2EHelper.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@
4646
import net.klesatschke.threema.api.messages.FileMessage;
4747
import net.klesatschke.threema.api.messages.ImageMessage;
4848
import net.klesatschke.threema.api.messages.ThreemaMessage;
49-
import net.klesatschke.threema.api.results.CapabilityResult;
50-
import net.klesatschke.threema.api.results.EncryptResult;
5149
import net.klesatschke.threema.api.results.UploadResult;
5250

5351
/** Helper to handle Threema end-to-end encryption. */
@@ -284,8 +282,7 @@ public ReceiveMessageResult receiveMessage(
284282
} else if (message instanceof FileMessage fileMessage) {
285283
var fileData = this.apiConnector.downloadFile(fileMessage.getBlobId());
286284

287-
var decryptedFileData =
288-
CryptTool.decryptFileData(fileData, fileMessage.getEncryptionKey());
285+
var decryptedFileData = CryptTool.decryptFileData(fileData, fileMessage.getEncryptionKey());
289286
var file =
290287
new File(outputFolder.toString() + "/" + messageId + "-" + fileMessage.getFileName());
291288
var fos = new FileOutputStream(file);

pom.xml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@
88
<version>1.1.5-SNAPSHOT</version>
99
<name>Threema Messaging SDK</name>
1010
<packaging>pom</packaging>
11+
<properties>
12+
<source.encoding>UTF-8</source.encoding>
13+
<project.build.sourceEncoding>${source.encoding}</project.build.sourceEncoding>
14+
<project.reporting.outputEncoding>${source.encoding}</project.reporting.outputEncoding>
15+
<lombok.version>1.18.22</lombok.version>
16+
</properties>
1117
<dependencyManagement>
1218
<dependencies>
1319
<dependency>
@@ -22,6 +28,11 @@
2228
<version>3.23.1</version>
2329
<scope>test</scope>
2430
</dependency>
31+
<dependency>
32+
<groupId>org.projectlombok</groupId>
33+
<artifactId>lombok</artifactId>
34+
<version>${lombok.version}</version>
35+
</dependency>
2536
<dependency>
2637
<groupId>commons-io</groupId>
2738
<artifactId>commons-io</artifactId>
@@ -39,6 +50,28 @@
3950
</dependency>
4051
</dependencies>
4152
</dependencyManagement>
53+
<build>
54+
<plugins>
55+
<plugin>
56+
<groupId>org.apache.maven.plugins</groupId>
57+
<artifactId>maven-compiler-plugin</artifactId>
58+
<version>3.10.1</version>
59+
<configuration>
60+
<encoding>${source.encoding}</encoding>
61+
<source>17</source>
62+
<target>17</target>
63+
<annotationProcessorPaths>
64+
<path>
65+
<groupId>org.projectlombok</groupId>
66+
<artifactId>lombok</artifactId>
67+
<version>${lombok.version}</version>
68+
</path>
69+
</annotationProcessorPaths>
70+
</configuration>
71+
</plugin>
72+
</plugins>
73+
</build>
74+
4275
<modules>
4376
<module>api</module>
4477
<module>cli</module>

0 commit comments

Comments
 (0)