Maven not adding all dependencies to jar

I've a simple program build in IntelliJ and using maven that uses the dependency io.netty. I've added to my POM file:


In order to compile and get a jar file I usually do:

  • Clean
  • Compile
  • Package

However I noticed that the dependency is not added to the jar, neither existing in the target folder (Or in any of it's sub folders) or added to the resources folder like usually happens.

In order to have the io.netty library to be added to the jar I have tried:

  • Setting the scope to provided and to compile.
  • Re-importing the pom file.
  • Deleting io.netty folder in the .m2/repository/ folder.

I have several other libraries linked including:

  • mysql-connector-java
  • slf4j-simple
  • trove4j

Thanks for reading.


For some odd reason I had changed my maven configuration a while ago. While I had not added any new libraries, the old ones still had their classes laying around therefor still being added to the jar.

I solved this issue by changing the build in my pom to:


Used as reference:

Maven doesn't package all dependencies into a jar by default. You can use the assembly plugin to build a "jar with dependencies, as seen here: How can I create an executable JAR with dependencies using Maven?

Need Your Help

Can you use a for loop to implement a sentinel controlled loop in Python?


I'm not too sure if there might have been another duplicate, but question as per topic.

Copying Stream from XmlTextWriter to a FileStream

.net stream

I have an HTTP Handler that is binding an XmlTextWriter instance to Response.Output like so...