On 4 August 2011 11:29, dcracauer <[email protected]> wrote:

> When gradle sets up the classpath, only the source jar is on the classpath.
> Additionally, I use hibernate-validator and need to include the sources on
> my classpath there as well. When I set up my dependencies like this:
>
>        compile group: 'org.hibernate', name: 'hibernate-validator',
> version:
> '4.2.0.Final'
>        compile group: 'org.hibernate', name: 'hibernate-validator',
> version:
> '4.2.0.Final', classifier: 'source'
>
> only one will be included.
>

First: you need to use "sources" not "source" as your classifier. Even then,
you'll probably run into http://issues.gradle.org/browse/GRADLE-739
Can you try using a different configuration for the 'sources' classifier?

eg:
       compile group: 'org.hibernate', name: 'hibernate-validator',
version: '4.2.0.Final'
       compileSources group: 'org.hibernate', name: 'hibernate-validator',
version: '4.2.0.Final', classifier: 'source'

You can always check what's in each configuration by:
println configurations.compileSources.asPath

cheers
-- 
Darrell (Daz) DeBoer
Principal Engineer, Gradleware
http://www.gradleware.com

Reply via email to