I am not sure about "proper" naming, however simply in terms of building
the jar w/ contents it really is as simple as:
// create the javadoc jar
task javadocJar(type: Jar, dependsOn: javadoc) {
fileSet(dir: javadoc.destinationDir)
classifier = 'javadoc'
}
task sourcesJar(type: Jar, dependsOn: anySourceGenerationTasks...) {
from sourceSets.main.allSource
classifier = 'sources'
}
artifacts {
archives javadocJar
archives sourcesJar
}
Again, the adding these to the upload archives does not work in 0.8 as I
mentioned b4 per GRADLE-704 which Hans has already fixed in trunk.
In terms of naming, by default gradle will build a jar name based partially on
the task name and other info (that's all covered in the user guide). I am not
yet sure how to get it to name the generated jars using the expected naming
pattern here.
On Mon, 2009-10-26 at 14:10 -0500, Steve Ebersole wrote:
> There was a bug with "attaching" secondary artifacts for deployment:
> http://jira.codehaus.org/browse/GRADLE-704
>
> Fixed in trunk already.
>
> I have not yet tried actually creating the sources artifact so i cannot
> say, but actually deploying them would hit the same issue linked above.
>
>
> On Mon, 2009-10-26 at 14:47 -0400, Paul Speed wrote:
> > I'm feeling a tinge of maven envy today as I'm trying to figure out how
> > to upload source (and possibly javadoc) bundles to a maven repository
> > along with my regular jar artifacts.
> >
> > What is the easiest way to generate these sorts of -sources.jar files to
> > go with my release? If there's not a simple way what would be the
> > shortest path for me to configure such a setup in my build files?
> >
> > I poked around the docs and archives and didn't see anything obvious.
> > Thanks for any information.
> >
> > -Paul
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe from this list, please visit:
> >
> > http://xircles.codehaus.org/manage_email
> >
> >
--
Steve Ebersole <[email protected]>
Hibernate.org
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email