Gradle vs Maven vs Ant
Since I've done a lot of stuff with Ant and worked in many projects where maven was the weapon of choice, project sizes have differed massively. As a result I've seen a lot of different configurations, varying from simple standalone applications to complex multi-module projects. Maven looks really suitable for simple projects, or projects where everything should fit into one jar/war file. The problems begin with multi-module Management. Cross-References are not resolved the right way, the build is slow during cyclic references and cache and index reloading causes trouble. If you are using your own repository manager (Nexus, for example), the index and caching problems become much more significant. There are also a few issues with a central settings.xml where version numbers can be stored. Values are not resolved and the behaviour is not reproducible. Scary! The poorly managed primary / third-party repositories are also problematic. They force you to use excludes and old library versions if you don't use a repository manager. The biggest problem with maven, however, is that it forces you to deal with the given project structure and the build life-cycle. There are a lot workarounds you can use (like running ant tasks in maven), but none of them feel right. Features like build automation and automatic deployment are supported but due the complexity of enterprise systems, you'll end up with a bundle of ant tasks in the XML structure of the pom.xml. A few people also complain about XML as being the wrong language to write the build file in, but since I've written a lot of spring-wiring bean files, xml feels wordy, but it's not a problem for me. So I tried to migrate the pom.xml of some of my projects to gradle. It worked fine, aside from the bad IDE support from Eclipse/STS. The resulting build file is about fifteen times smaller and looks pretty readable. WAR bundling and the Jetty task to run the application worked fine. The only problem I discovered: The dependency 'com.sun.xml.ws:jaxws-rt:jar:2.1.4' does not resolve its necessary dependencies. I fixed this issue by downloading the distribution and put them into my "lib" folder. Maybe I'll try to fix it and show my experiments.
Review of Gradle vs Maven
I solved the issues regarding the ‘com.sun.xml.ws:jaxws-rt:jar:2.1.4′ with a google search. I've found threads from people with the same problem, but they used maven. Maven only feels really good if you are building unspecific things like the well known "petshop".
- With Gradle you can escape from all the xml junk.
- Gradle also supports Apache Ivy.
- Tool support from Gradle gets better (eclipse toolset, ...).
- Moving from maven to gradle using maven integration, you'll not get rid of the problems maven causes (for example incorrectly defined pom.xml ressources in the maven repository).
- Using Gradle results in freedom because it solves major issues such as: The "central repository" way (your problem if you can't find your dependencies or licensing issues apply to a few jar files). You get rid of the "forced convention" and "forced workflow" style (writing your own scripts and plugins in maven is not recommended).
- Gradle is a step away from the monolithic way of building software (build results in a system) to a more heterogenous style (build results in a module / service).
- Gradle can split the project definition into different files (the include mechanism).
TagsACTA Adobe ADEP Adobe Digital Enterprise Platform Adobe LiveCycle ant Architektur async transaction management Bigtable Bitter JPA bookmarks Bosch pof 1400 BPMN breitband buche build build management C10K Problem censorship certification class-t amplifier Clojure Cloud Coffee criteria query cross-system Deutsch Divide and conquer editor Elektroden emacs Erfahrung Eventually consistent Friend Fräsen functional Geschäftsapplikationen getting things done Google File System gradle Graph Groovy hafen hamburg Harbour Heroku Heroku NoSQL Horn i-clean ibiza ide Identity transform impression java JAX-WS JBoss Seam JEE Jolly JPA 2.0 JSF JSF2 Kontaktlinsen leica m Leiningen links lisp LiveCycle ES DSC LiveCycle ES2.5 MAG MapReduce maven Menicon Z MergeJoin MIG mirkohorn Modellierung NoSQL pdb phono photos power supply PRINCE2 Queries router Sandbar Scala schutzgas schweißen Seam Security shipyard Software Engineering spring Standards Table TCO toolchain tube tube amp valve amplifier vim welding XProc XSLT XSLT2.0