My tech blog

Using snapshots stored in your maven repository with Grails

leave a comment »

In my current project, we are developing a core domain library to be shared across different web applications of different companies. We are also developing the new website of one of those companies in Grails. Therefore, we need to declare a Grails dependency on the core domain library which is stored on a Maven repository.

Grails, by default, uses Ant to build the project and Ivy to resolve dependencies. Using maven as a repository is very easy: you only need to declare it on the “BuildConfig.groovy” file.

The problem is that this simple approach does not pick up changes on snapshots. The way I solved this was using “useOrigin true” in the same file.

Here you have the BuildConfig.groovy file:

grails.project.dependency.resolution = {

	useOrigin true


	repositories {

Written by alexcuesta

January 26, 2011 at 5:06 pm

Posted in Groovy/Grails

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: