Doing Builds with Gradle, Buildr and Maven

Discussions

News: Doing Builds with Gradle, Buildr and Maven

  1. Doing Builds with Gradle, Buildr and Maven (9 messages)

    Looking for some helpful insight in doing builds? This quick tip article takes a look at how you'd create identical builds for three separate build tools: gradle, maven, and buildr. There are no differences between the project file structures, only the build directive files were different.

    Read the full article:

    Doing Builds with Gradle, Buildr and Maven

    Threaded Messages (9)

  2. source 1.6, target 1.6[ Go to top ]

    So in gradle and buildr you don't need to state in which JDK source and target version you want to compile? It reads your mind and takes the correct version? :)

    Such comparisons are intresting, if done fairly...

  3. Not an article[ Go to top ]

    This is not an article, not even a blogpost. 

     

    I have experience with Maven 2 for (too) many years and with Gradle for almost a year. But I didn't find any good or bad point about Maven/Gradle in that article even though there are tons. Just having a shorter script for a very basic example is not the best way for choosing a build tool.

  4. Not an article[ Go to top ]

    It wasn't meant to say "I recommend using this tool over that tool." It's just showing equivalent builds. Any personal opinions generated from looking at the builds is up to you.

  5. RE: Not an article[ Go to top ]

    It wasn't meant to say "I recommend using this tool over that tool." It's just showing equivalent builds. Any personal opinions generated from looking at the builds is up to you.

    "Equivalent builds", really?

    The maven config specifies:

    • artifact group ID
    • artifact ID
    • artifact version
    • dependency information
    • java compilation settings

    Gradle has just:

    • project type (java)
    • repository to use (maven central)
    • dependency information
    • artifact version

    Buildr has:

    • repository to use (maven central)
    • artifact version
    • artifact type
    • test dependency information
    • java compilation settings

    While most of the stuff can be attributed to default plugin configuration, it would make sense for each project to include at least the following information:

    • artifact group ID (missing in Gradle and Buildr)
    • artifact ID (missing in Gradle and Buildr)
    • artifact version (present in all)
    • dependency information (present in all)
    • java compilation settings (missing in Gradle)

    While java compilation settings can be explained by some default setting for all "java" projects (still, it would be nice to see explicit declaration), I can not really find any explanation for missing artifact ID and artifact group ID. These cannot possibly specified by some default configuration. Or if they can, please explain (and then I can also explain how to achieve such a default configuration under Maven :-P).

    I like Gradle and Buildr, but this comparison is just not fair to Maven.

  6. RE: Not an article[ Go to top ]

    both gradle and buildr do include the artifact and groupId; the version, as well. Buildr doesn't need all of it because it has "sensible defaults." As far as whether it's fair or not, it's worth considering whether you prefer the way each one expresses the build. Some people like more expression; others like less. This is why more concise languages exist, as well as Java - each one suits its audience.
  7. RE: Not an article[ Go to top ]

    Rarely do I do "mvn package". What are gradle and buildr going to do when I want to do the equivalent of "mvn install"?

  8. Hello All,

    I have tried myself to somehow compare various build tools, and I know it is hard. Or maybe rather impossible taking into account the number of features that should be compared and number of factors that influence your judgements. I don't believe that one of the tools is superior to others in every aspect (I say it even though I'm a Gradle enthusiast). Yet, in some aspects you can see clear winners.

    You might be interested in short analysis of build scripts length of various build tools that I did some time ago (still missing buildr example - if you could provide this, I will be happy to include buildr among other tools). In fact this is not exactly a comparison of tools - because I don't believe that length of build script is the main factor to consider when choosing one - but rather a story of how these tools evolved and how they grasped the idea of "convention over configuration" and usage of DSL. You can find it here: http://www.dzone.com/links/r/build_script_length_maven_3_polyglot_maven_gradle.html

    Comments welcomed.

    --
    Cheers,

    Tomek Kaczanowski

    http://kaczanowscy.pl/tomek

  9. nonsense[ Go to top ]

    <<they grasped the idea of "convention over configuration">>

    Yup, and some of the questions in this thread illustrate why this is a bad idea.

  10. coc does not hurt[ Go to top ]

    <<they grasped the idea of "convention over configuration">>

    Yup, and some of the questions in this thread illustrate why this is a bad idea.

    Convention over configuration does not hurt if you can override the default values. In Maven overriding the default values is sometimes hard (if possible at all), in Gradle it is much simpler.. So what is you problem with CoC?

     

    --

    Cheers,

    Tomek Kaczanowski