5 ms·
There are some other things. What you have described would work if jar has no dependencies (or is used as a library). When you build a deployable application yo
by Sankozi 3y ago
There are some other things. What you have described would work if jar has no dependencies (or is used as a library). When you build a deployable application you need stuff like:
- building fat jar (jar with all dependencies, including transitive ones) or even whole docker image or just deploying the jar you created to the maven repository
- unit tests
- integration tests, with things like starting database
- code coverage
- dependency checks (version clashes of transitive dependencies, security issues)
- code quality checks
Additionally it is nice if you can do following through maven CLI:
- update major/minor/patch version
- deploy application to chosen environment
- create javadocs for the project
Above things are done through plugins, which release versions independently. Additionally plugins might have dependencies - for example maven-checkstyle-plugin depend on checkstyle checkstyle library - you might want to override checkstyle library version that is used by the plugin. Some plugins' default configuration might also not work nicely with each other - you need to update those.
On top of that maven is using XML and on top of that maven creators chosen to make it even more verbose by ditching XML attributes. That way you end with really big pom.xml files (~3 times bigger than gradle file in this project).
- sesm 3y agoCan we say that JS ecosystem did it right by splitting package management, bundling and testing into separate tools?
- syspec 3y agoNot if you go by the number of blog posts complaining about NPM and bundling in javascript
- Sankozi 3y agoBundling and testing in maven is already done by separate tools. It is just that maven have some defaults (dependent on the packaging selected) which tools may cover such tasks. I think NPM made one step too far - it removed whole build structure from the build tool. NPM is just package manager and simple run utility (both based on horrible package.json configuration, even maven's verbose XML pom.xml are better). There is no compilation step, verification step etc. - there are just cli commands you can preconfigure in package.json.