After struggling mightily and painfully with Maven, GMaven, IDEA and even calling on my colleague Tim O’Brien (who wrote the book on Maven), I found a simpler, better way to get my useful Groovy code into a deployable package that even an IT Operations group could love. Or at least invoke.
The resolution for me was to:
- Use maven jar:jar to build the jar
- Use dependency:copy-dependencies to get the jars in one place
- Clean out the multiple versions of the jars to avoid conflicts (yes…)
- Invoke on the command line using ‘java -cp lib/*: my.class.name’
This worked, and it’s easy to update just the code jar. I can’t believe it’s so painful to try and create a jar with dependencies that worked using maven assembly:assembly. Maybe I missed a better solution, but this one worked.
Related posts: