Does replit's package manager not work with .pom libraries

While using replit to learn some Java programming, I encountered an issue with the package manager while trying to install apache’s log4j 2.20 library. When I try to run the code, the compilation doesn’t recognize the presence of log4j and returns errors because of that. Interestingly enough though, when trying to import the Gson library, that works just fine.

After investigating the dependency files (Packager Files: target/dependency), it appears that
upm installed the .pom file that has info on where to download apache’s log4j (among other things), but not the actual jar file(s). I could probably just download the library separately and manually put it in, but this seems like the sort of issue that’s either me missing something important or a bug, and in either case I thought it important to create a thread about.

A minimal reproduction of this issue can be found https://replit.com/@LordGiacomoS/pomIssue

The packager has not been maintained in a really long time and is full of bugs. Use the shell to install the respective packages for your application.

1 Like

Right, thanks to ReplitIronclad for clarifying this, and for anyone else having this issue, I found manually forcing maven to do stuff worked out.

1 Like

To clarify, these are the steps I took:

  • add dependency tags for desired library to pom.xml
  • run mvn dependency:copy-dependencies in shell

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.