Here is how I do it currently:
https://github.com/hibernate/hibernate-core/blob/master/hibernate-
core/hibernate-core.gradle#L75
Which is based on 'basePomConfig' closure I create in the root project and
inject into every subproject. In my case I simply need the artifactId of the
second artifact to be different so I apply the basePomConfig and then
overwrite the artifactId. As noted there is lots of duplication here.
On Friday, March 04, 2011, at 08:33 am, Brett Cave wrote:
> I've been reading through old posts trying to figure out how to upload
> multiple artifacts from a single subproject in a multiproject build.
>
> Parent build, in "subprojects" section:
>
> uploadArchives {
> repositories.mavenDeployer {
> repository(url: "file://localhost/tmp/testRepo")
> // pom.version, pom.artifactId & pom.groupId set.
> }
> }
>
> Only 1 out of a number of subprojects has multiple artifacts that need to
> be uploaded. Should the repository url be propogated from the parent, this
> just extends the configuration? I get an error "Cause: Could not publish
> configurations [configuration ':my-project:archives'].", "Caused by: A
> distributionManagement element or remoteRepository element is required to
> deploy"
>
> Config in the subproject:
>
> task myTar(type: Tar) {
> // tar stuff
> }
>
> artifacts {
> archives myTar
> }
>
> // trying to extend the configuration of repositories.mavenDeployer from
> the parent's "subprojects" configuration.
> uploadArchives {
> repositories.mavenDeployer {
> addFilter('tar') { artifact, file ->
> artifact.name.contains 'some-artifact'
> }
> }
> }
---
Steve Ebersole <[email protected]>
http://hibernate.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email