Jeppe Madsen wrote:
Hi,
We have a multiproject build where the output of some projects are just
jar files which are common to all the other webapps. These common jar
files should be on the container classpath and not included in each war
file. How can we specify that in Gradle?
If we do
compile project(':common')
The common project will (correctly) be compiled but the resulting jar
will be included in the war.
If we do
providedCompile project(':common')
The jar file (if it exists) will not be included in the war, but the
common project is not built....
We currently do the first option and manually remove the common.jar from
the war, but maybe there's a better way?
/Jeppe
In version 0.5.*, I think you should use your second approach, but use
the linkConfWithTask method to link the providedCompile configuration to
the libs task of the other project.
Something like:
dependencies {
providedCompile project(':common')
linkConfWithTask(':common:libs')
}
I haven't tried this, but this is my understanding of how it works.
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email