On 22/12/2010, at 10:59 PM, Peter Niederwieser wrote:

> 
> I have a project "foo" that produces both a War and a Jar (with "jar.enabled
> = true"). The Jar looks fine, but when another project declares a project
> lib dependency on foo, the classes in the Jar don't seem to make it on the
> other project's compile class path. Is this a known problem, and what's the
> best way to work around it?

It's this one: http://jira.codehaus.org/browse/GRADLE-687

A work around is to enable the 'jar' task, and add it back to the 'archives' 
configuration:

jar.enabled = true
artifacts { archives jar }

It's not a perfect work around, in that you end up with both the jar and war in 
the compile and runtime classpath, which can be a problem if you then bundle 
some kind of distribution, or another war, in a dependent project.


--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz

Reply via email to