Without special configuration, Maven will not include any dependencies in your jar at all. Just the compiled classes from your source code (and generated classes) are included. If you want to include dependencies, you have to tell maven using the maven-assembly-plugin
, as described in How can I create an executable JAR with dependencies using Maven?. When you use a different packaging, the dependencies can be included automatically, depending on the packaging type. E. g. when using war
, all compile
dependencies are added to WEB-INF/lib
.
When you include dependencies, always the complete dependency-jar is added to your jar. There will be no checking, if everything is needed. So, your resulting jar will contain all 181M of dependencies as well as the source code of the new project.