The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Tim Holloway wrote:I'm not sure what you're attempting.
If you're looking to product a "super jar" (Jar of Jars) that can be included into a WAR or EAR, that won't work. The enhanced classloader can scan inside the jars in /WEB-INF/lib, but unless you provide a classloader of your own inside the webapp then jars inside the /WEB-INF/lib jars will not themselves be scanned.
In Maven you can define a base jar that pulls in a lot of secondary jars as dependencies, but they'll all go into the flat library directory in the product being produced. Although not all people are comfortable with having a bunch of dependencies being fetched indirectly like that.
German Gonzalez-Morris wrote:I reckon, never I'd liked to use fat jars. Although it can be easier to deploy (and manage), it hides the current libraries you are using, and that's solved with <dependencies> in Maven.
It is not complex Maven, maybe you need to think more functional than Ant (for instance).
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Jesper de Jong wrote:Different people have different preferences.
I like being able to build a single JAR with the Maven Shade plugin that contains all dependencies, because it makes deployment much easier. Instead of having to install a directory full of JAR files and carefully setting up the classpath, etc. I only need to copy one JAR file and starting the program is very easy with: java -jar myprogram.jar
Claude Moore wrote:
Jesper de Jong wrote:Different people have different preferences.
I like being able to build a single JAR with the Maven Shade plugin that contains all dependencies, because it makes deployment much easier. Instead of having to install a directory full of JAR files and carefully setting up the classpath, etc. I only need to copy one JAR file and starting the program is very easy with: java -jar myprogram.jar
Does it work even in a Java EE context ?
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Jesper de Jong wrote:Different people have different preferences.
I like being able to build a single JAR with the Maven Shade plugin that contains all dependencies, because it makes deployment much easier. Instead of having to install a directory full of JAR files and carefully setting up the classpath, etc. I only need to copy one JAR file and starting the program is very easy with: java -jar myprogram.jar
Consider Paul's rocket mass heater. |