Hi,
I have been migrating a project from 0.8 to 0.9 (using
gradle-0.9-20100308090020+0300) and have struck a problem with the
publication of artifacts to an ivy repository when using a multi-project
layout.
Artifacts are published to a directory that uses the path name of the
sub-project. For example, with a subproject "one" artifacts are published
to a directory "_one".
eg.
When running gradle -i one:uploadArchives with the gradle build file below,
artifacts are published with the following layout:
Publishing to Resolver localPublications
published one to /home/ross/devel/publications/_one/2.0/one.jar
published ivy to /home/ross/devel/publications/_one/2.0/ivy.xml
The published ivy.xml file has module="one" revision="2.0", which is what I
would expect.
Am i missing something in the configuration?
Is there some way to specify the directory / module name?
Thanks,
Ross
build.gradle
=========
import org.gradle.api.artifacts.Configuration
import org.gradle.api.artifacts.ProjectDependency
import org.gradle.api.Project
String ivyPattern = '/[module]/[revision]/ivy.xml'
String artifactPattern = '/[module]/[revision]/[artifact](.[ext])'
File localPublicationsDir = file('../publications')
dependsOnChildren()
subprojects {
apply id:'java'
group = 'example'
version = '2.0'
repositories {
add(new org.apache.ivy.plugins.resolver.FileSystemResolver()) {
name = 'localPublications'
validate = false
addIvyPattern(localPublicationsDir.absolutePath + ivyPattern)
addArtifactPattern(localPublicationsDir.absolutePath +
artifactPattern)
}
}
uploadArchives {
uploadDescriptor = true
repositories {
add project.repositories.localPublications
}
}
}
=====