Releasing a multi-project build to maven central


(Ben Warner) #1

Have been reading this excellent blog on releasing gradle projects to sonatype http://jedicoder.blogspot.com.au/2011/11/automated-gradle-project-deployment-to.html

However my project is a multi-module project, and I’d prefer to release it that way to maven repo so that “users” can choose whether they wish to depend-on the parent project or one of the sub projects.

Has anyone had experience at this? Would I need to create 3+ poms etc to upload.

Any help would be appreciated.


(Szczepan Faber) #2

It might be best if you ask the Jedicoder to update his blog post :slight_smile:

At the moment, I don’t release any multproject build to maven central. Perhaps other community members can share the experience?


(Peter Niederwieser) #3

A separate POM is generated for each subproject automatically. I found it tricky to generate and publish a parent POM though, so I’m no longer using one. Instead, I put the common information into each and every POM (of course the build script is DRY). This approach has served me well.

As our new publishing DSL unfolds (in 1.3 and later), it should become easier to deal with such cases.