Uploaded image for project: 'Gradle'
  1. Gradle
  2. GRADLE-2945

maven-publish plugin does not add excludes to generated pom

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1-rc-1

      Description

      I build a gradle project with:

      gradle clean publishToMavenLocal

      In the build.gradle file I need to exclude all transitive dependencies for 'commons-jxpath'

      dependencies {
      compile("commons-jxpath:commons-jxpath:1.2") {
      exclude group: '*'
      }

      But in the generated pom nothing is set to exclude:

      <dependency>
      <groupId>commons-jxpath</groupId>
      <artifactId>commons-jxpath</artifactId>
      <version>1.2</version>
      <scope>runtime</scope>
      </dependency>

      I would expect:

      <dependency>
      <groupId>commons-jxpath</groupId>
      <artifactId>commons-jxpath</artifactId>
      <version>1.2</version>
      <scope>runtime</scope>
      <exclusions>
      <exclusion>
      <artifactId>*</artifactId>
      <groupId>*</groupId>
      </exclusion>
      </exclusions>
      </dependency>

      Do I specify the exclusion for the dependency incorrectly or is it not supported in the maven-publish plugin (worked with the maven plugin)

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            forums Gradle Forums
            Votes:
            12 Vote for this issue
            Watchers:
            12 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: