Colin Yates wrote:
Hi all,
I have a number of different projects with some common libraries (who hasn't
;)). I am evolving away from the multi-project build (which is working very
well actually) simply because we want to enforce versioning between these
projects. Assume I have the following:
- libA
- libB
- projectAWar
- projectAUtility
Note: that the dependencies go upwards so projectAUtility depends on
projectAWar (or rather the JAR from projectAWar) depends on libB depends on
libA. To repeat, projectAWar does *not* depend on projectAUtility.
Given that each of these are defined as separate projects I have to define the
dependencies just like any external library right? If that is true then I
assume I must publish each dependant module into a maven repository. I have
this working (copied from the documentation), but there are a few questions:
- how can I easily create and publish the source JAR (including the relevant
bit in the pom descriptor?)
I don't know about the "relevant bit in the pom descriptor" but I
publish sources and javadoc jars with this:
task sourcesJar(type: Jar, dependsOn:classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn:javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
// This requires gradle 0.9...
artifacts {
archives sourcesJar
archives javadocJar
}
I'm not too familiar with maven in this regard. What is missing from
the pom in this case?
- for publishing multiple artifacts (i.e. for the JAR and WAR file from the
WAR projects) I need to define a filter - has anyone got a simple example of
this?
I'm not sure what exactly you mean here. Can you give an example?
-Paul
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email