hierynomus / license-gradle-plugin

Manage your license(s)

Home Page:http://www.javadude.nl

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

downloadLicenses tasks fails when there are local depdencies

spilth opened this issue · comments

We have a project where one of the JARs we are relying is not available in any Maven repository (ojdbc6) so we are referencing locally:

repositories {
    mavenCentral()
    flatDir name: 'localRepository', dirs: 'lib'
}

dependencies {
    compile(":ojdbc6:11.2.0.3")
}

When I run gradle downloadLicenses I get the following error:

$ gradle downloadLicenses
:downloadLicenses FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':downloadLicenses'.
> Could not resolve all dependencies for configuration 'detachedConfiguration51'.
   > Could not download artifact ':ojdbc6:11.2.0.3:ojdbc6.pom'
      > Artifact ':ojdbc6:11.2.0.3:ojdbc6.pom' not found.

Hi @spilth,

You can solve this by adding the following to your build.gradle file:

project.downloadLicenses {
  excludeDependencies = [":ojdbc6:11.2.0.3"]
}