(Sorry for the long text, I just want to document this for people who might have the same problem, also, I'm a beginner in the way of the Maven, so have patience :sob:)
I'm making a simple SQLite CLI app. All I wanted was to bundle the whole SQLite app into a fat jar using Maven, so this should be simple, right? Right?
Since I wanted to use Maven, I avoided manually downloading the jars, as instructed by the README, and tried to add the Maven plugin for sqlite-jdbc, of course, as well as the other Maven configurations described (the hint for maven-shade-plugin). There's nothing special in the following pom.xml, it's just the default Maven archetype with the necessary adjustments I wanted.
Trying to run it after creating the fat jar with mvn clean package:
[victor@victor-82mf sqlite]$ java -jar target/sqlite-1.0-SNAPSHOT.jar
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Connection to SQLite has been established.
Well, this seems to work OK, since the point of the app is simply to test the connection. But I sure as heck don't want that unwanted warnings in my CLI app output, sorry. So let's try something else: the logical next step is adding the sl4j-api dependency to my pom.xml. I hope it works... and yes, I read the issue where it's described the version of slf4j is an older version, so I made the following adjustment with that in mind:
[victor@victor-82mf sqlite]$ java -jar target/sqlite-1.0-SNAPSHOT.jar
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Connection to SQLite has been established.
Some digging on StackOverflow instructed adding the slf4j-nop plugin to my pom. Let's be careful and add the same version as the slf4j-api plugin. Well, here we go:
Description, Reproducing, Expected behavior, Logs, following:
(Sorry for the long text, I just want to document this for people who might have the same problem, also, I'm a beginner in the way of the Maven, so have patience :sob:)
I'm making a simple SQLite CLI app. All I wanted was to bundle the whole SQLite app into a fat jar using Maven, so this should be simple, right? Right?
Since I wanted to use Maven, I avoided manually downloading the jars, as instructed by the README, and tried to add the Maven plugin for sqlite-jdbc, of course, as well as the other Maven configurations described (the hint for maven-shade-plugin). There's nothing special in the following
pom.xml
, it's just the default Maven archetype with the necessary adjustments I wanted.mvn clean package
:sl4j-api
dependency to my pom.xml. I hope it works... and yes, I read the issue where it's described the version of slf4j is an older version, so I made the following adjustment with that in mind:Same errors.
What to do? Thank you for any help, by the way.
Environment (please complete the following information):