On 23/11/2012, at 10:44 AM, Szczepan Faber wrote:

>> * When the group or version for the project is not specified, publishing
>> should probably fail.
> 
> +1 It's a user error to me.

It depends.

What about a simple HTTP upload? My project makes a file, that I want to 
publish to a HTTP server. Let's say it's a zip of documentation. I know nothing 
about maven/ivy artifact managers etc.

Two options:

1. Publishing as we speak of it is about this world of artifacts and artifact 
repositories etc, and other operations (such as a simple HTTP put) are 
something else
2. Only fail if that particular publish operation (e.g. Ivy publish) doesn't 
have some data it requires.


>> * When running 'gradle publish' with no outgoing repositories of the
>> appropriate type defined, we should probably log a warning to let you know
>> that you've forgotten to do this.

This couldn't be a general thing. We could do it a finer level though. For 
example, if you apply the 'ivy-publish' plugin, but there are no 
PublishToIvyRepository tasks in the project, then an action on the “publish” 
lifecycle task could throw a warning.

> Where is it published if there are no right outgoing repos?

Nowhere. The “publish” lifecycle task will run, but it won't be depending on 
any real publish tasks.

>> * When running 'gradle publish' and there are unused repositories defined
>> (e.g. I've applied the maven-publish plugin but defined an ivy repository),
>> we should probably log a warning to let you know that the repository isn't
>> going to be used.
> 
> +1 I think. If it is not used it should not be in the build script.

This is going to be hard to do, impossible I think.

1. How do you determine “unused”? Just because I've applied the ivy-publish 
plugin but there is a maven repository doesn't really mean it's unused.
2. Where does this logic go? A variant on #1, you can't have a plugin assume 
that if there is a repository of a different type than it knows about in 
publishing.repositories that it is “unused”

-- 
Luke Daley
Principal Engineer, Gradleware 
http://gradleware.com


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

    http://xircles.codehaus.org/manage_email


Reply via email to