Showing posts with label Maven. Show all posts
Showing posts with label Maven. Show all posts

Saturday, January 21, 2012

What's Gradle?

I think title for this post should be “Best of both Worlds - Maven & Ivy”. In todays world these are the most commonly used configuration management & Build Management tool. Here i'm assuming that you have prior knowledge of Maven or Ivy. And If you had chance to play with Maven or Ivy, most of you would agree with my next statement. Ivy is far superior dependency management tool then Maven and Maven is far better build integration automation tool then Ivy. Developers and Architects needed a tool that can combine functionality of these two outstanding tools.
Gradle, in my opinion has been evolved from Maven & Ivy. As we all know both Maven & Ivy are excellent tools, but both of these have some limitations, and that’s where Gradle is going to win!
It can work with Maven or Ivy repository to jars or directory to local file system. One interesting part is, different from Maven or Ivy, Gradle scripts are Groovy based not XML.
Here’s excellent user guide for Gradle.

http://gradle.org/docs/current/userguide/userguide_single.html#multiProject

Thursday, June 24, 2010

Preview of Maven 3 feature's

Maven 3 is promising to be the most significant upgrade since the release of Maven 2. While maintaining backward compatibility with existing Maven 2 projects, it introduces a number of powerful and compelling new features, such as a complete rewrite of the internal architecture, OSGi support and multi-language pom files.

One exciting new feature in Maven 3 is it's ability to work with pom files written in non-XML notations. The Maven core now provides an underlying DSL to access the Maven internals, and write POM files in the language of your choice. This currently includes scripting languages like Groovy, Ruby, and others.

With Maven 3, you can use a Groovy DSL that maps directly to the XML pom format. So, instead of

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.5</version>
<scope>test</scope>
</dependency>



you could write:

dependencies {
dependency { groupId 'junit'; artifactId 'junit'; version '4.7'; scope 'test' }
}


If you're familiar with the XML pom files, this will read pretty easily - it's essentially an XML pom file without the noise generated by the XML tags. Although it's an obvious improvement, some of the transcribed Groovy DSL code might still seem a bit wordy to some. For example, a set of project dependencies might look like this:

dependencies {
dependency {
groupId 'junit'
artifactId 'junit'
version '4.7'
scope 'test'
}
dependency {
groupId 'org.hamcrest'
artifactId 'hamcrest-all'
version '1.1'
}
dependency {
groupId 'log4j'
artifactId 'log4j'
version '1.2.12'
}
}
However, you can make this more concise simply by using semi-colons to separate the dependency elements:

dependencies {
dependency { groupId 'junit'; artifactId 'junit'; version '4.7'; scope 'test' }
dependency { groupId 'org.hamcrest'; artifactId 'hamcrest-all'; version '1.1' }
dependency { groupId 'log4j'; artifactId 'log4j'; version '1.2.12' }
}

This is certainly more concise and more readable, and goes with the general tendancy of moving away from XML as a build scripting language in favour of more lightweight notations. But the real power of this is that it is effectively an interface to the Maven 3 core, that gives you full access to all of the Maven features. The Maven 3 core is rock solid, and you can leverage all the existing features and plugins from the Maven 2 ecosphere.

Maven 3 is fully backward-compatible with your existing Maven 2 projects. Here's some good sites to get more information about Maven 3.

http://stackoverflow.com/questions/1414618/good-learning-resources-for-maven-3-mercury

Friday, March 26, 2010

Maven one of the best CI tool available

Few days back I wrote a sample web service app using Maven, Maven can even generate classes from WSDL and very easy to use and configure it. I think it can save lots of development time.

here's Jarvana repository, which can get you most of the classes, jars etc etc...its really great work.

http://www.jarvana.com/jarvana/