I'm working on a Linux/Apache/MySQL/Grails application and have the choice of build tools. I'm looking at Gradle or Gant. They look very similar to me, so I'm not sure what differentiates them.
What are the major differences between Gradle and Gant that would make me pick one over the other?
The main difference is that Gant is a build tool, while Gradle is a project management tool (from the dev/ops standpoint).
So Gradle, compared to Gant, comes "battery included", because it allows you to easily use plugins, manage dependencies, has a complete, hookable, lifecycle, etc...
It is a bit like comparing Ant and Maven, stricly looking on the Java side.
The major reasons you would likely pick Gradle over Gant:
The functionality of Gant is a subset of Gradle. (basically a groovy wrapper around ANT)
Gant is built with Gradle
Beyond that Gradle has a plugin architecture, is DSL based, integrates with Maven and Ivy and has true incremental builds. Gant was a valuable innovation in its time, the lessons of which are in Gradle.
Grails already comes with a build system included, so you don't need to do anything. At the moment it is based on Gant scripts, but a switch to Gradle is on the roadmap for Grails 2.0.
Related
Bazel is a multi-language build tool from Google that acts as a replacement for things like Maven, Gradle, Make, etc. There are articles written on how to migrate from Gradle to Bazel, for instance. But I wonder if this tool works with Grails.
Grails is a web app framework that uses Gradle, but from what I've seen it's a bit more than that. For lack of a better term, Grails itself acts as a "wrapper" for common tasks such as building an app as a WAR or JAR file, running the app locally with different profiles, or scaffolding new files and features. Popular IDEs such as IntelliJ have Grails plugins available to run these Grails commands. So it seems to me like it's perhaps tightly coupled to the Gradle build script that backs it.
It also seems to me that just because Bazel says it supports Gradle projects doesn't necessarily imply that it supports Grails projects, because of all these reasons regarding Grails being more than just Gradle. But I wanted to ask the community if my assumptions are true, or if, in fact, people are already using Bazel as a substitute for Gradle inside Grails projects. Can it be done?
Bazel could in theory be used to build grails projects as it is fundamentally agnostic to the type of thing being built. That said, grails probably works well with gradle out of the box and you'd have to re-implement a number of things yourself again and probably is not worth the effort. If you are a large shop and have multiple other languages that you need to support however, it may be worth investing in the effort.
https://github.com/pubref/rules_maven supports using a gradle file to determine transitive maven dependencies if you want to investigate further.
Is it possible to convert Maven Project to Jenkins (I want to convert all the project from Maven to Jenkins)
My organization does not want to use Maven any more. The project has to be completely in Jenkins.
Please let me know the process of converting the project.
Thank you.
As Krishnan said in the comments, Jenkins is not a build tool. Jenkins is a build server that is meant for invoking build tools like Maven. It doesn't replace build tools.
So your question of converting Maven to Jenkins doesn't really make sense, since they are doing different things. However, if you are for some reason unable to use Maven, you have some alternatives. Some I can think of:
Use Gradle
Use Ant (only recommended for simply structured projects with little to no dependencies)
Use command line calls with plain javac like this: How to compile and run a simple java file in jenkins on Windows (not recommended since you have to script everything a build tool does yourself)
I am reading lots of articles here about the subject and try to find a nice set of tools to integrate and create a Complete CI environment.
Among those articles I particularly liked this one: Continuum as a Jenkins replacement?
I have installed here, but not yet configured because we are doing some testes with GIT and Jenkins. We have Nexus working fine.
Now I need to have some recommendations to cover the following topics:
Code Coverage - JaCoCo, Cobertura, Sonar?
Code Quality Analysis
PMD, Sonar? ANT, MAVEN, GRADLE?
Maybe I am mixing some concepts here regarding the use of some tools, like SonarQube, if that is the case I am sorry.
So, I am open to "hear" about this. Thanks
Ant, Maven and Gradle are build tools. You pick one that suites your team. Gradle/Maven may directly work with artifact repos. Ant will require help from Ivy.
Coverage: JaCoCo supports newer Java(7, 8).. Not so much luck with Cobertura
Sonar: If you can integrate your code with SonarQube that takes care of bit Code Quality Metrics (like Duplicate detection, Findbug , Security ..etc)
On Jenkins
You can integrate Jenkins with all of the above tools. You can create Jenkins jobs for practically everything and have tons of plugins to make even simpler. There are more plugins to make Jenkins' based CD easier: Build Flow and workflow plugin.
I am building my first Grails app and would like the build to be managed by Gradle. I see that there is a Grails-Gradle plugin and many online searches indicate that it is not possible to build a Grails app using Gradle without this plugin.
My question is: why? Why (specifically) is this plugin necessary in order for Gradle to be able to build a Grails app? What functionality does this plugin provide that is otherwise missing?
I don't know why you think it's impossible to build a Grails app without the plugin. It's possible to issue commands to the grails shell from Gradle without the plugin, but it's not very clean.
That's what this plugin does. It cleans up that process, and makes it much Groovier with a DSL. It also makes your Gradle script more portable to other projects and persons.
If you browse the source code you will see all the inner workings of the plugin and realize what it's setting up in your Gradle script. What it offers is a lot of access to Grails in a very standard and portable manner.
At my new gig, they use Ant and cannot be persuaded to move to Maven.
I've looked everywhere for a decent example of how a multi-project ant build system should be assembled. The apache site falls short. I'm looking specifically for best practices to:
Automatically build local projects that are dependencies of a project
Share artifacts from project to their dependents
Export a project's dependencies and generated artifacts (jars) to be inherited by dependent projects
Share third-party dependencies between projects
I'm sure I can do all this without using Ivy - what did people do before Ivy? I really don't want to have to set up a corporate repository or rely on external repositories - the engineers here are really against that and have all their third-party jars checked into src control.
Can anyone point me at a good open source example of a multi-project ant build?
I don't have too much hands on experience with building large numbers of dependent projects with Ant, but this tutorial looks like it will do what you need without any additional tools.