I have my projects that depend (directly and transitively) on Log4j 1.2.15.
Because of the problem described here: http://onemanwenttomow.wordpress.com/2007/12/31/maven2-log4j-and-jmx-dependencies/ and here: http://unitstep.net/blog/2009/05/18/resolving-log4j-1215-dependency-problems-in-maven-using-exclusions/
adding the depedency to log4j:log4j:1.2.15 in my build files make Gradle 1.0-milestone-7 fail because of the changes made in the resolution of the missing JMX reference implementation JARs (milestone-5 and 6 simply skipped the missing JARs).
So, what I would like to do is to add those missing JARs (jmxtools-1.2.1.jar and jmxri-1.2.1.jar) to my flatDir repository provided with the Gradle project. However, even if my build.gradle says:
repositories {
flatDir dirs: “${rootProject.projectDir}/repo”
mavenRepo url: “${main_repo}”
mavenLocal () }
and I put those jars in “${rootProject.projectDir}/repo”, Gradle ignores them and fails with (for instance):
Could not resolve all dependencies for configuration ‘:MyProject:compile’. Cause: Artifact ‘com.sun.jdmk:jmxtools:1.2.1@jar’ not found
Changing my dependency declaration towards log4j adding (for instance) “exclude: module ‘jmxtools’” is not a viable solution, because log4j 1.2.15 is also required transitively by other dependencies, so I would need to add that exclusion to ALL the dependencies that I know that require Log4j… It’s ugly and unmaintainable.
So, my question is: is there a way to tell Gradle to pick up those missing JARs from the “repo” directory?
Actually, this is not the only case where I would need Gradle to look in that directory when it does not find something in the Maven repository. For instance, there are dependencies for which the source/javadoc archives are not in the Maven repository, but I added them in the “repo” dir… However, that is another case in which Gradle just ignores them and says it can’t find source/javadoc archives