title: Maven package error: An attached artifact must have a different ID than its corresponding main artifact
body: <p>Geting this error on: mvn package</p>
  
  <p>It fails to build every time with the same error, I've tried renaming the artifact, as well as changing dependencies for build in the pom file. Please see more details below:</p>
  
  <p>Any help would be very much appreciated.
  error:</p>
  
  <pre><code>    [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 2.599 s
  [INFO] Finished at: 2014-09-29T14:49:45+01:00
  [INFO] Final Memory: 33M/379M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.1.7.RELEASE:repackage (default) on project compiled: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.1.7.RELEASE:repackage failed: For artifact {com.phil-hudson:compiled:1.0-SNAPSHOT:war}: An attached artifact must have a different ID than its corresponding main artifact. -&gt; [Help 1]
  [ERROR] 
  [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
  [ERROR] Re-run Maven using the -X switch to enable full debug logging.
  [ERROR] 
  [ERROR] For more information about the errors and possible solutions, please read the following articles:
  [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
  
  Process finished with exit code 1
  </code></pre>
  
  <p>pom.xml</p>
  
  <pre><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"&gt;
  
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;com.phil-hudson&lt;/groupId&gt;
      &lt;artifactId&gt;compiled&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;properties&gt;
  
      &lt;!-- Generic properties --&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  
      &lt;/properties&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
          &lt;version&gt;1.1.5.RELEASE&lt;/version&gt;
      &lt;/parent&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework&lt;/groupId&gt;
              &lt;artifactId&gt;spring-web&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.commons&lt;/groupId&gt;
              &lt;artifactId&gt;commons-lang3&lt;/artifactId&gt;
              &lt;version&gt;3.3.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.inject&lt;/groupId&gt;
              &lt;artifactId&gt;javax.inject&lt;/artifactId&gt;
              &lt;version&gt;1&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;com.wordnik&lt;/groupId&gt;
              &lt;artifactId&gt;swagger-jaxrs_2.10&lt;/artifactId&gt;
              &lt;version&gt;1.3.2&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.codehaus.jackson&lt;/groupId&gt;
              &lt;artifactId&gt;jackson-mapper-asl&lt;/artifactId&gt;
              &lt;version&gt;1.9.13&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-core&lt;/artifactId&gt;
              &lt;version&gt;2.2.8-b01&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.sun.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-impl&lt;/artifactId&gt;
              &lt;version&gt;2.2-promoted-b65&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.tomcat&lt;/groupId&gt;
              &lt;artifactId&gt;tomcat-servlet-api&lt;/artifactId&gt;
              &lt;version&gt;8.0.12&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax.servlet.jsp&lt;/groupId&gt;
              &lt;artifactId&gt;jsp-api&lt;/artifactId&gt;
              &lt;version&gt;2.1&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
  
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;1.1.7.RELEASE&lt;/version&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;repackage&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;warName&gt;disney-product-feed&lt;/warName&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;repositories&gt;
          &lt;repository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;url&gt;http://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/repository&gt;
      &lt;/repositories&gt;
  
      &lt;pluginRepositories&gt;
          &lt;pluginRepository&gt;
              &lt;id&gt;spring-releases&lt;/id&gt;
              &lt;url&gt;http://repo.spring.io/libs-release&lt;/url&gt;
          &lt;/pluginRepository&gt;
      &lt;/pluginRepositories&gt;
  
  
  &lt;/project&gt;
  </code></pre>
  
  <p>mvn dependency:tree</p>
  
  <pre><code>[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:1.1.5.RELEASE:compile
  [INFO] |  +- org.springframework.boot:spring-boot-starter:jar:1.1.5.RELEASE:compile
  [INFO] |  |  +- org.springframework.boot:spring-boot:jar:1.1.5.RELEASE:compile
  [INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:1.1.5.RELEASE:compile
  [INFO] |  |  +- org.springframework.boot:spring-boot-starter-logging:jar:1.1.5.RELEASE:compile
  [INFO] |  |  |  +- org.slf4j:jcl-over-slf4j:jar:1.7.7:compile
  [INFO] |  |  |  +- org.slf4j:jul-to-slf4j:jar:1.7.7:compile
  [INFO] |  |  |  +- org.slf4j:log4j-over-slf4j:jar:1.7.7:compile
  [INFO] |  |  |  \- ch.qos.logback:logback-classic:jar:1.1.2:compile
  [INFO] |  |  |     \- ch.qos.logback:logback-core:jar:1.1.2:compile
  [INFO] |  |  \- org.yaml:snakeyaml:jar:1.13:runtime
  [INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:1.1.5.RELEASE:compile
  [INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.54:compile
  [INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:7.0.54:compile
  [INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-logging-juli:jar:7.0.54:compile
  [INFO] |  +- org.hibernate:hibernate-validator:jar:5.0.3.Final:compile
  [INFO] |  |  +- javax.validation:validation-api:jar:1.1.0.Final:compile
  [INFO] |  |  +- org.jboss.logging:jboss-logging:jar:3.1.1.GA:compile
  [INFO] |  |  \- com.fasterxml:classmate:jar:1.0.0:compile
  [INFO] |  +- org.springframework:spring-core:jar:4.0.6.RELEASE:compile
  [INFO] |  \- org.springframework:spring-webmvc:jar:4.0.6.RELEASE:compile
  [INFO] |     \- org.springframework:spring-expression:jar:4.0.6.RELEASE:compile
  [INFO] +- org.springframework:spring-web:jar:4.0.6.RELEASE:compile
  [INFO] |  +- org.springframework:spring-aop:jar:4.0.6.RELEASE:compile
  [INFO] |  |  \- aopalliance:aopalliance:jar:1.0:compile
  [INFO] |  +- org.springframework:spring-beans:jar:4.0.6.RELEASE:compile
  [INFO] |  \- org.springframework:spring-context:jar:4.0.6.RELEASE:compile
  [INFO] +- com.fasterxml.jackson.core:jackson-databind:jar:2.3.3:compile
  [INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.3.3:compile
  [INFO] |  \- com.fasterxml.jackson.core:jackson-core:jar:2.3.3:compile
  [INFO] +- org.apache.commons:commons-lang3:jar:3.3.2:compile
  [INFO] +- org.springframework.boot:spring-boot-starter-test:jar:1.1.5.RELEASE:compile
  [INFO] |  +- junit:junit:jar:4.11:compile
  [INFO] |  +- org.mockito:mockito-core:jar:1.9.5:compile
  [INFO] |  |  \- org.objenesis:objenesis:jar:1.0:compile
  [INFO] |  +- org.hamcrest:hamcrest-core:jar:1.3:compile
  [INFO] |  +- org.hamcrest:hamcrest-library:jar:1.3:compile
  [INFO] |  \- org.springframework:spring-test:jar:4.0.6.RELEASE:compile
  [INFO] +- javax.inject:javax.inject:jar:1:compile
  [INFO] +- com.wordnik:swagger-jaxrs_2.10:jar:1.3.2:compile
  [INFO] |  +- org.scala-lang:scala-library:jar:2.10.0:compile
  [INFO] |  +- com.wordnik:swagger-core_2.10:jar:1.3.2:compile
  [INFO] |  |  +- commons-lang:commons-lang:jar:2.4:compile
  [INFO] |  |  +- org.slf4j:slf4j-api:jar:1.7.7:compile
  [INFO] |  |  +- com.fasterxml.jackson.module:jackson-module-scala_2.10:jar:2.1.5:compile
  [INFO] |  |  |  +- com.thoughtworks.paranamer:paranamer:jar:2.3:compile
  [INFO] |  |  |  \- org.scala-lang:scala-reflect:jar:2.10.0:compile
  [INFO] |  |  +- com.fasterxml.jackson.module:jackson-module-jsonSchema:jar:2.1.0:compile
  [INFO] |  |  +- com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:jar:2.0.0:compile
  [INFO] |  |  |  \- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.0.0:compile
  [INFO] |  |  +- com.wordnik:swagger-annotations:jar:1.3.2:compile
  [INFO] |  |  +- org.json4s:json4s-ext_2.10:jar:3.2.4:compile
  [INFO] |  |  |  +- joda-time:joda-time:jar:2.3:compile
  [INFO] |  |  |  \- org.joda:joda-convert:jar:1.2:compile
  [INFO] |  |  +- org.json4s:json4s-native_2.10:jar:3.2.4:compile
  [INFO] |  |  |  \- org.json4s:json4s-core_2.10:jar:3.2.4:compile
  [INFO] |  |  |     +- org.json4s:json4s-ast_2.10:jar:3.2.4:compile
  [INFO] |  |  |     \- org.scala-lang:scalap:jar:2.10.0:compile
  [INFO] |  |  |        \- org.scala-lang:scala-compiler:jar:2.10.0:compile
  [INFO] |  |  \- org.json4s:json4s-jackson_2.10:jar:3.2.4:compile
  [INFO] |  +- javax.ws.rs:jsr311-api:jar:1.1.1:compile
  [INFO] |  \- org.reflections:reflections:jar:0.9.8:compile
  [INFO] |     +- com.google.guava:guava:jar:11.0.2:compile
  [INFO] |     |  \- com.google.code.findbugs:jsr305:jar:1.3.9:compile
  [INFO] |     +- javassist:javassist:jar:3.12.1.GA:compile
  [INFO] |     \- dom4j:dom4j:jar:1.6.1:compile
  [INFO] |        \- xml-apis:xml-apis:jar:1.0.b2:compile
  [INFO] +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.13:compile
  [INFO] |  \- org.codehaus.jackson:jackson-core-asl:jar:1.9.13:compile
  [INFO] +- com.sun.xml.bind:jaxb-core:jar:2.2.8-b01:compile
  [INFO] |  +- javax.xml.bind:jaxb-api:jar:2.2.9:compile
  [INFO] |  \- com.sun.istack:istack-commons-runtime:jar:2.16:compile
  [INFO] +- com.sun.xml.bind:jaxb-impl:jar:2.2-promoted-b65:compile
  [INFO] +- org.apache.tomcat:tomcat-servlet-api:jar:8.0.12:compile
  [INFO] \- javax.servlet.jsp:jsp-api:jar:2.1:provided
  </code></pre>