Uploaded image for project: 'Forge'
  1. Forge
  2. FORGE-2051

Installing various Java EE Facets duplicate dependencies in build descriptor

XMLWordPrintable

      project-new --named blahhh
      javaee-setup --javaEEVersion 7
      jpa-new-entity --named Blahhhhh
      

      Even though the javax.enterprise:javaee-api is installed, individual specifications still add their own duplicate provided APIs. This should not be the case. EE* should satisfy all spec dependency requirements.

      apply from: 'forge.gradle'
      apply plugin: 'war'
      apply plugin: 'java'
      repositories {
          mavenCentral()
      }
      version = "1.0.0-SNAPSHOT"
      group = "org.gradleTest"
      archiveName 'gradleTest'
      dependencies {
          direct group: "javax", name: "javaee-api"
          direct group: "org.hibernate.javax.persistence", name: "hibernate-jpa-2.0-api"
          direct group: "javax.enterprise", name: "cdi-api"
          direct group: "org.jboss.spec.javax.faces", name: "jboss-jsf-api_2.0_spec"
      }
      allprojects {
          dependencies {
              managed configuration: "compile", group: "javax", name: "javaee-api", version: "7.0"
              managed configuration: "import", group: "org.jboss.spec", name: "jboss-javaee-6.0", version: "3.0.2.Final", ext: "pom"
              managed configuration: "compile", group: "org.hibernate.javax.persistence", name: "hibernate-jpa-2.0-api", version: "1.0.1.Final"
              managed configuration: "compile", group: "javax.enterprise", name: "cdi-api", version: "1.0-SP4"
              managed configuration: "compile", group: "org.jboss.spec.javax.faces", name: "jboss-jsf-api_2.0_spec", version: "1.0.0.Final"
          }
      }
      
      

      Should be:

      apply from: 'forge.gradle'
      apply plugin: 'war'
      apply plugin: 'java'
      repositories {
          mavenCentral()
      }
      version = "1.0.0-SNAPSHOT"
      group = "org.gradleTest"
      archiveName 'gradleTest'
      dependencies {
          direct group: "javax", name: "javaee-api"
      }
      allprojects {
          dependencies {
              managed configuration: "compile", group: "javax", name: "javaee-api", version: "7.0"
          }
      }
      
      

            rhn-support-ggastald George Gastaldi
            lincolnthree Lincoln Baxter III (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: