On 19/11/2012, at 10:31 PM, Adam Murdoch wrote: > > On 20/11/2012, at 6:22 AM, Luke Daley wrote: > >> Hi, >> >> I'm working on >> https://github.com/gradle/gradle/blob/master/design-docs/publication-model.md#customising-maven-descriptor-xml >> >> Some questions: >> >> 1. Multiple artifacts >> >> The spec says that: >> >>> When this MavenPublication instance is used for publishing, the following >>> defaults are used: >>> … >>> • All artifacts from public configurations are published. >> >> This strategy works for Ivy (kinda), but is problematic for Maven. There's a >> key difference between Maven and Ivy publication; Ivy can publish an >> arbitrary set of artifacts, Maven can publish one non-classified artifact >> and zero or more additional, classified, artifacts. If we use this “All >> artifacts from public configurations are published” strategy, all artifacts >> except one would need to have a classifier. Is this what we want at this >> stage? > > We have a few options: > > 1. Assert that artifact tuples (name, classifier, extension) do not contain > duplicates, that name == artefactId, and that there is exactly one artefact > with classifier == null.
Name is irrelevant here because it's imposed as the pom's artifactId. IIRC extension doesn't come in to play here. You can't have two artifacts with the same classifier and with different extensions. > 2. As above, but use artifactId as the name for artefacts. If it's one publication = one pom (and it should be) then this is the only option. > 3. We add some concept of component (internal for now), that defines which > artefact is the main artefact, if any. For all other artefacts, map 'type' to > 'classifier' and assert as above. > > We might start with #2, and soon after start moving towards a higher-level > description, even if only used initially for our plugins to communicate > internally with the publishing plugins. > >> 2. Only runtime dependencies? >> >> Spec: >> >>> When this MavenPublication instance is used for publishing, the following >>> defaults are used: >>> … >>> • No dependencies are included in the pom. >>> • When the java plugin is applied, the following dependencies are included >>> in the pom.xml: >>> • All dependencies specified in configurations.runtime are added with >>> runtime scope. >> >> Why only runtime scope? > > Because those are the only ones we know about. Care to expand on that? How do we know about them? -- Luke Daley Principal Engineer, Gradleware http://gradleware.com --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
