sensepost/mallet

Broken pom.xml: dependency jackson-dataformat-msgpack missing.

Tokarak opened this issue · 0 comments

Description

A build from clean source code fails:

/Users/tok/mallet/src/main/java/com/sensepost/mallet/handlers/messagepack/MessagePackDecoder.java:[6,38] package org.msgpack.jackson.dataformat does not exist
[ERROR] /Users/tok/mallet/src/main/java/com/sensepost/mallet/handlers/messagepack/MessagePackEncoder.java:[3,38] package org.msgpack.jackson.dataformat does not exist
[ERROR] /Users/tok/mallet/src/main/java/com/sensepost/mallet/handlers/messagepack/MessagePackDecoder.java:[17,62] cannot find symbol
  symbol:   class MessagePackFactory
  location: class com.sensepost.mallet.handlers.messagepack.MessagePackDecoder
[ERROR] /Users/tok/mallet/src/main/java/com/sensepost/mallet/handlers/messagepack/MessagePackEncoder.java:[13,62] cannot find symbol
  symbol:   class MessagePackFactory
  location: class com.sensepost.mallet.handlers.messagepack.MessagePackEncoder
[truncated]

Environment information

  • macOS Montery on an M1 arm64 macbook
$ Java --version
java 18.0.1.1 2022-04-22
Java(TM) SE Runtime Environment (build 18.0.1.1+2-6)
Java HotSpot(TM) 64-Bit Server VM (build 18.0.1.1+2-6, mixed mode, sharing)
  • mvn 3.8.6

Solution

Here is my pom.xml diff which had a successful build:

diff --git a/pom.xml b/pom.xml
index 3fed87a..2a7ae64 100644
--- a/pom.xml
+++ b/pom.xml
@@ -60,7 +60,7 @@
                <dependency>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
-                   <version>1.4.199</version>
+                   <version>2.1.210</version>
                </dependency>
         <dependency>
             <groupId>commons-cli</groupId>
@@ -115,6 +115,11 @@
             <artifactId>ognl</artifactId>
             <version>3.2.10</version>
         </dependency>
+        <dependency>
+           <groupId>org.msgpack</groupId>
+            <artifactId>jackson-dataformat-msgpack</artifactId>
+            <version>0.9.1</version>
+        </dependency>
     </dependencies>
     <build>
     <plugins>
@@ -181,8 +186,8 @@
     <artifactId>maven-compiler-plugin</artifactId>
     <version>3.8.0</version>
     <configuration>
-               <source>1.8</source>
-               <target>1.8</target>
+               <source>18</source>
+               <target>18</target>
     </configuration>
   </plugin>
   </plugins>

(Notice the h1 version bump is not necessary and should be added by Dependabot.)
The reason I did not submit a pr is because I am not familiar with Java, Maven, or the codebase. I am uncertain wether my solution is correct and full; plus I haven't tested the functionality of my build. What I find suspicious is that nobody reported this earlier, indicating that this may be specific to my environment. Nevertheless, if someone could integrate my quick-fix in the diff properly, that would be great.