Uploaded image for project: 'Atlas'
  1. Atlas
  2. ATLAS-2571

Maven: duplicate declarations

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0.0
    • None
    • None

    Description

      [INFO] Scanning for projects...

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for org.apache.atlas:atlas-graphdb-titan0:jar:1.0.0-SNAPSHOT

      [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.solr:solr-solrj:jar -> version vs ${solr.version} @ org.apache.atlas:atlas-graphdb-titan0:[unknown-version], /Users/jonesn/IdeaProjects/atlas/graphdb/titan0/pom.xml, line 194, column 21

      [WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.apache.solr:solr-core:jar -> version vs ${solr.version} @ org.apache.atlas:atlas-graphdb-titan0:[unknown-version], /Users/jonesn/IdeaProjects/atlas/graphdb/titan0/pom.xml, line 200, column 21

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for org.apache.atlas:hive-bridge:jar:1.0.0-SNAPSHOT

      [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-resources-plugin @ org.apache.atlas:hive-bridge:[unknown-version], /Users/jonesn/IdeaProjects/atlas/addons/hive-bridge/pom.xml, line 484, column 21

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for org.apache.atlas:falcon-bridge:jar:1.0.0-SNAPSHOT

      [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-resources-plugin @ org.apache.atlas:falcon-bridge:[unknown-version], /Users/jonesn/IdeaProjects/atlas/addons/falcon-bridge/pom.xml, line 370, column 21

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for org.apache.atlas:sqoop-bridge:jar:1.0.0-SNAPSHOT

      [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-resources-plugin @ org.apache.atlas:sqoop-bridge:[unknown-version], /Users/jonesn/IdeaProjects/atlas/addons/sqoop-bridge/pom.xml, line 433, column 21

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for org.apache.atlas:storm-bridge:jar:1.0.0-SNAPSHOT

      [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-resources-plugin @ org.apache.atlas:storm-bridge:[unknown-version], /Users/jonesn/IdeaProjects/atlas/addons/storm-bridge/pom.xml, line 536, column 21

      [WARNING]

      [WARNING] Some problems were encountered while building the effective model for org.apache.atlas:hbase-bridge:jar:1.0.0-SNAPSHOT

      [WARNING] 'build.plugins.plugin.(groupId:artifactId)' must be unique but found duplicate declaration of plugin org.apache.maven.plugins:maven-resources-plugin @ org.apache.atlas:hbase-bridge:[unknown-version], /Users/jonesn/IdeaProjects/atlas/addons/hbase-bridge/pom.xml, line 508, column 21

      [WARNING]

      [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.

      [WARNING]

      [WARNING] For this reason, future Maven versions might no longer support building such malformed projects.

      [WARNING]

      [WARNING] The project org.apache.atlas:apache-atlas:pom:1.0.0-SNAPSHOT uses prerequisites which is only intended for maven-plugin projects but not for non maven-plugin projects. For such purposes you should use the maven-enforcer-plugin. See https://maven.apache.org/enforcer/enforcer-rules/requireMavenVersion.html

      [INFO] ------------------------------------------------------------------------

       

       

      These are generally caused by duplicates - for example taking the first:

       

      <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-solrj</artifactId>
      </dependency>

      <dependency>
      <groupId>org.apache.solr</groupId>
      <artifactId>solr-solrj</artifactId>
      <version>${solr.version}</version>
      </dependency>

       

      So we have it declared twice, once pulling in solr.version - defined in the top level pom, and the other blank. In the case of this plugin, the version is not declared in any DependencyManagement section (the common way of defining default plugin versions which can then be overriden in child poms)

      Cleaning this up.

      Attachments

        1. ATLAS-2571.patch
          5 kB
          Nigel Jones
        2. ATLAS-2571.patch
          5 kB
          Nigel Jones

        Issue Links

          Activity

            People

              jonesn Nigel Jones
              jonesn Nigel Jones
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: