On 3/08/10 11:26 PM, Baruch Sadogursky wrote:
Hi, folks!
I'd like to know if there is any way to exclude some $GRADLE_HOME/lib
jars from the build classpath. Namely, maven-ant-tasks.jar contains
Maven2 dependencies which clash with Maven3 I am trying to use in my
plugin.
The following stuff doesn't work:
buildscript {
configurations {
classpath.exclude group: 'org.apache.maven'
}
}
There's no way to exclude the stuff from $GRADLE_HOME/lib at the moment.
We need to restructure the classloader hierarchy to make this work,
which is something we've been putting off until after the 0.9 release is
out. The plan is that jars which are not part of the Gradle API (like
the Maven 2 jars) will move out of the root classloader, into a separate
implementation classloader, which will not be visible from the build
scripts or plugins. We will also isolate the plugins from each other to
some degree. Not sure how this will look yet. Regardless, it should fix
your problem.
Of course, another simple (but short-term) solution is to change Gradle
to use the Maven 3 jars instead.
--
Adam Murdoch
Gradle Developer
http://www.gradle.org
CTO, Gradle Inc. - Gradle Training, Support, Consulting
http://www.gradle.biz