ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Dockter <>
Subject Re: Deploying to a Maven Repo with Ivy
Date Tue, 14 Oct 2008 19:26:09 GMT

On Oct 14, 2008, at 3:40 PM, Hans Dockter wrote:


> 1.) Creating a MavenUploadResolver which only offers publishing  
> functionality. It would offer a convenient way to choose and  
> configure the Maven upload protocol. It would for example throw an  
> exception in the case a module has more than one artifact.  
> Alternatively/complementary a user might specify which artifact  
> should be deployed. Basically the resolver should try its best to  
> do the job automatically. If unmappable Ivy concepts are used, it  
> throws an exception. Alternatively the user can decide how to  
> downgrade. One place where Maven is not inferior I think is the  
> protocol layer. So Ivy users will be happy with this. I haven't  
> worked with Ivy dynamic properties yet. It should be possible to  
> apply them also to pom uploading. The Pom generator would have to  
> take care of this. Snapshot handling we will get out of the box.

I have the first working implementation. I have implemented a  
MavenUploadResolver which directly implements DependencyResolver. For  
all retrieval operation it throws an UnsupportedOperationException.  
If its publish method is called it checks the arguments for validity  
and assign them to field variables. If more than one pom artifact, or  
more than one non pom artifact, is passed an exception is thrown. The  
pom artifact is generated before by our pom generator. If  
commitPublishTransaction is called, we configure the Ant Maven deploy  
task and execute it. And it really works :)

The MavenUploadResolver has two public custom methods for adding  
normal and snapshot repositories. You can add RemoteRepository  
objects which are part of the Ant Maven tasks. I have never  
completely figured out what those snapshot repositories in Maven are  
about, as you can also publish snapshots to normal repositories. But  
here we go, I don't have to know. This is the same Maven domain model  
that is used for configuring the repositories in the settings.xml or  

One thing I want to add is an artifact filter. If an ivy module has  
more than one artifact to publish, you can configure which ones  
should be included/excluded (If more than one or zero remain an  
exception would be thrown).

- Hans

Hans Dockter
Gradle Project lead

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message