I have spoken to Adam about this and they have a plan for reworking how 
publications work for 1.0 that will totally make this obsolete.  Unless 
something has changed, it is scheduled for milestone-2.

On Friday, March 04, 2011, at 08:58 am, Brett Cave wrote:
> thanks steve, that works pretty well, the basePomConfig is what I was
> trying to do. The primary thing I was missing was how to define the
> repository url in the root project for ease of management (e.g. if it
> changes, it just needs to be changed in the root).
> 
> the artifact is uploaded now, just lacking the pom which will come from a
> base pom.
> 
> thanks again :)
> 
> On Fri, Mar 4, 2011 at 4:47 PM, Steve Ebersole <[email protected]> wrote:
> > 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

---
Steve Ebersole <[email protected]>
http://hibernate.org

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

    http://xircles.codehaus.org/manage_email


Reply via email to