using maven repos with gradle

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

using maven repos with gradle

Nick Evgeniev
Hi, Just want to know if it's possible to use maven repositories with gradle (read & publish). we're reconsidering project build infrastructure in our company. So far we've evaluated maven, ivy, maven ant tasks as a replacement for homegrown ant scripts. Unfortunately every evaluated solution has it's own shortcomings. For example with ivy I can resolve deps against maven repositories but can't publish to. Even if we don't use maven as a build system, I see no reason not to use local (company wide) maven repository for cross project deps. with ivy it's not possible (or I have to use both ivy + maven ant tasks, maintain ivy.xml & pom.xml i.e. it's a bug prone approach). as gradle is based on ivy I suspect that there is no native support for maven repos? Is it correct? If so, is it on todo list? when? our short requirements list for build system looks like: 1. build by convention for multimodule project 2. easy dependency management between modules in mm project 3. easy build customization for individual modules (here maven just falls short, as I don't like the idea of writing maven plugins) 4. ide support. 4.1 execute particular build task from within IDE (intellij, eclipse) 4.2 create IDE project file from build script (with correct dependencies intellij, eclipse) 4.3 assisted editing of build scripts in IDE 5. resolve project dependencies on 3rd party libs (against mavenrepoo) 6. freeze (remember) versions of 3rd party libs on project release (repeatable build) 7. publish build artifacts to repository (maven) What can't be done withgradle?
Reply | Threaded
Open this post in threaded view
|

Re: using maven repos with gradle

hans_d
Administrator
Hi Nick,

On Sep 9, 2008, at 2:29 PM, Nick Evgeniev wrote:

> Hi, Just want to know if it's possible to use maven repositories  
> with gradle (read & publish). we're reconsidering project build  
> infrastructure in our company. So far we've evaluated maven, ivy,  
> maven ant tasks as a replacement for homegrown ant scripts.  
> Unfortunately every evaluated solution has it's own shortcomings.  
> For example with ivy I can resolve deps against maven repositories  
> but can't publish to. Even if we don't use maven as a build system,  
> I see no reason not to use local (company wide) maven repository  
> for cross project deps. with ivy it's not possible (or I have to  
> use both ivy + maven ant tasks, maintain ivy.xml & pom.xml i.e.  
> it's a bug prone approach). as gradle is based on ivy I suspect  
> that there is no native support for maven repos? Is it correct?

Yes

> If so, is it on todo list?

Yes

> when?

We plan to release 0.4 today or tomorrow. We want to improve the  
support for Maven Repos in 0.5. It is a top priority feature as one  
of my customers requires this. What we want to provide is the  
possibility to deploy poms with any Ivy resolver, including deploying  
snapshots. Our plan is to do this on the Ivy level and want to  
contribute this to the Ivy project once it is ready.

> our short requirements list for build system looks like:

> 1. build by convention for multimodule project

Yes

> 2. easy dependency management between modules in mm project

Yes

> 3. easy build customization for individual modules (here maven just  
> falls short, as I don't like the idea of writing maven plugins)

Yes

> 4. ide support.

> 4.1 execute particular build task from within IDE (intellij, eclipse)

Only via the external task support of the IDE's. It would be very  
nice to have specific Gradle IDE plugins, but AFAIKT the current  
Gradle developers don't plan to implement this themselves in the  
foreseeable future. We hope for contributions here.

> 4.2 create IDE project file from build script (with correct  
> dependencies intellij, eclipse)

In 0.4 this is provided for Eclipse projects. We want to provide it  
for IntelliJ soon. Contributions are welcome :)

> 4.3 assisted editing of build scripts in IDE

In IntelliJ the support is already very good. See also Appendix B in  
the user's guide.

> 5. resolve project dependencies on 3rd party libs (against mavenrepoo)

> 6. freeze (remember) versions of 3rd party libs on project release  
> (repeatable build)

I don't understand 5 and 6.

> 7. publish build artifacts to repository (maven)

See above.

As a general remark. The more customization you plan, the more  
serious you are about project automation, Gradle will already pay off  
in its current incarnation compared to Maven.

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: using maven repos with gradle

Xavier Hanin
On Wed, Sep 10, 2008 at 12:45 PM, Hans Dockter <[hidden email]> wrote:
Hi Nick,


On Sep 9, 2008, at 2:29 PM, Nick Evgeniev wrote:

Hi, Just want to know if it's possible to use maven repositories with gradle (read & publish). we're reconsidering project build infrastructure in our company. So far we've evaluated maven, ivy, maven ant tasks as a replacement for homegrown ant scripts. Unfortunately every evaluated solution has it's own shortcomings. For example with ivy I can resolve deps against maven repositories but can't publish to. Even if we don't use maven as a build system, I see no reason not to use local (company wide) maven repository for cross project deps. with ivy it's not possible (or I have to use both ivy + maven ant tasks, maintain ivy.xml & pom.xml i.e. it's a bug prone approach). as gradle is based on ivy I suspect that there is no native support for maven repos? Is it correct?

Yes


If so, is it on todo list?

Yes

when?

We plan to release 0.4 today or tomorrow. We want to improve the support for Maven Repos in 0.5. It is a top priority feature as one of my customers requires this. What we want to provide is the possibility to deploy poms with any Ivy resolver, including deploying snapshots. Our plan is to do this on the Ivy level and want to contribute this to the Ivy project once it is ready.
 
This is very interesting, and I'm pretty sure this will interest the Ivy community. If you want to increase the chance to get this into Ivy core, I suggest discussing your ideas as soon as possible on the [hidden email] list. It's the best way to fit in Ivy philosophy, and we may even ease your job.

Xavier
--
Xavier Hanin - Independent Java Consultant
BordeauxJUG co leader - http://www.bordeauxjug.org/
Blogger - http://xhab.blogspot.com/
Apache Ivy Creator - http://ant.apache.org/ivy/
Reply | Threaded
Open this post in threaded view
|

Re: using maven repos with gradle

hans_d
Administrator
Hi Xavier,

On Sep 10, 2008, at 12:51 PM, Xavier Hanin wrote:

> We plan to release 0.4 today or tomorrow. We want to improve the  
> support for Maven Repos in 0.5. It is a top priority feature as one  
> of my customers requires this. What we want to provide is the  
> possibility to deploy poms with any Ivy resolver, including  
> deploying snapshots. Our plan is to do this on the Ivy level and  
> want to contribute this to the Ivy project once it is ready.
>
> This is very interesting, and I'm pretty sure this will interest  
> the Ivy community. If you want to increase the chance to get this  
> into Ivy core, I suggest discussing your ideas as soon as possible  
> on the [hidden email] list. It's the best way to fit in Ivy  
> philosophy, and we may even ease your job.

I will definitely proceed like you have suggested. A couple of weeks  
ago I have roughly described my ideas in the ivy dev list (you have  
responded).

First I will file a Ivy-Jira for this. Then I will start thinking  
about it in detail and post my implementation plans to ivy dev.

Thanks for your interest

- Hans

--
Hans Dockter
Gradle Project lead
http://www.gradle.org





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: using maven repos with gradle

Nick Evgeniev
In reply to this post by hans_d
Hi, hdockter wrote: >> 5. resolve project dependencies on 3rd party libs (against mavenrepoo) > >> 6. freeze (remember) versions of 3rd party libs on project release >> (repeatable build) > > I don't understand 5 and 6. 5 is about downloading dependencies from (maven) repositories to project (lib) directory, as gradle is built on top of ivy I guess it does so. 6 is about the following scenario (though it's not exactly the case for enterprise projects) I can describe module dependency on *latest* (snapshot) version of the particular library. But once I made a release, I want snapshot dependency to be resolved (and frozen) to the *exact* version of the particular library. So I need build task which resolves all "snapshot" dependencies to exact ones. This can be done in form of two dependency sets one with "soft" versions (snapshots) allowed and another with "hard" versions (all "soft" versions resolved to concrete ones). "hard" versions set should be updated by "release" task only. (more elegant solution is appreciated)