8
votes

I use Artifactory as a Maven Repository, on which I'm not admin (corporate repo). I'm trying to use XmlSchema (through many dependencies of appfuse-basic-struts archetype) but I'm face of an issue that I am not able to understand when I run mvn package:

HTTP Status 409 - The target deployment path 'org/apache/ws/commons/XmlSchema/1.1/XmlSchema-1.1.pom' does not match the POM's expected path prefix 'org/apache/ws/commons/XmlSchema/SNAPSHOT'. Please verify your POM content for correctness and make sure the source path is a valid Maven repository root path.

type Status report

message The target deployment path 'org/apache/ws/commons/XmlSchema/1.1/XmlSchema-1.1.pom' does not match the POM's expected path prefix 'org/apache/ws/commons/XmlSchema/SNAPSHOT'. Please verify your POM content for correctness and make sure the source path is a valid Maven repository root path.

description The request could not be completed due to a conflict with the current state of the resource (The target deployment path 'org/apache/ws/commons/XmlSchema/1.1/XmlSchema-1.1.pom' does not match the POM's expected path prefix 'org/apache/ws/commons/XmlSchema/SNAPSHOT'. Please verify your POM content for correctness and make sure the source path is a valid Maven repository root path.). Apache Tomcat/6.0.18

Even in transitive dependencies, I don't find it. Can anyone explain me what the trouble ?

I found this post Using Maven-3 Got Http 409 error when re-deploy with archiva but it does not seem to match my issue.

EDIT 1 : this work quite well when I don't use my corporate repo.

EDIT 2 : Here the view of the repo via http :

Index of repo/org/apache/ws/commons/XmlSchema/1.1

Name                     Last modified      Size

../
maven-metadata.xml->         -    -
maven-metadata.xml.md5->     -    -
maven-metadata.xml.sha1->    -    -
XmlSchema-1.1.jar        18-Sep-2006 20:12  124.96 KB
XmlSchema-1.1.jar.asc->      -    -
XmlSchema-1.1.jar.md5    18-Sep-2006 20:12  32 bytes
XmlSchema-1.1.jar.sha1   18-Sep-2006 20:12  40 bytes
XmlSchema-1.1.pom->          -    -
XmlSchema-1.1.pom.md5->      -    -
XmlSchema-1.1.pom.sha1->     -    -

EDIT 3 : Dependencies

mvn dependency:tree

[INFO] com.edf.dpi.esip.gdt:gdt-ihm:war:7.0.1-SNAPSHOT
[INFO] +- org.appfuse:appfuse-struts:war:2.0-m5:compile
[INFO] +- org.appfuse:appfuse-struts:warpath:2.0-m5:compile
[INFO] |  +- org.appfuse:appfuse-web-common:war:2.0-m5:compile
[INFO] |  +- org.appfuse:appfuse-web-common:warpath:2.0-m5:compile
[INFO] |  |  +- org.appfuse:appfuse-service:jar:2.0-m5:compile
[INFO] |  |  |  +- aspectj:aspectjweaver:jar:1.5.3:compile
[INFO] |  |  |  +- net.sf.ehcache:ehcache:jar:1.3.0-beta2:compile
[INFO] |  |  |  |  \- net.sf.jsr107cache:jsr107cache:jar:1.0:compile
[INFO] |  |  |  +- velocity:velocity:jar:1.4:compile
[INFO] |  |  |  |  \- velocity:velocity-dep:jar:1.4:runtime
[INFO] |  |  |  \- org.codehaus.xfire:xfire-all:jar:1.2.6:compile
[INFO] |  |  |     +- org.codehaus.xfire:xfire-aegis:jar:1.2.6:compile
[INFO] |  |  |     |  \- net.java.dev.stax-utils:stax-utils:jar:20040917:compile
[INFO] |  |  |     +- org.codehaus.xfire:xfire-ws-security:jar:1.2.6:compile
[INFO] |  |  |     |  +- xfire:opensaml:jar:1.0.1:compile
[INFO] |  |  |     |  +- bouncycastle:bcprov-jdk15:jar:133:compile
[INFO] |  |  |     |  +- xerces:xercesImpl:jar:2.7.1:compile
[INFO] |  |  |     |  +- xml-apis:xml-apis:jar:1.0.b2:compile
[INFO] |  |  |     |  +- xml-security:xmlsec:jar:1.3.0:compile
[INFO] |  |  |     |  +- wss4j:wss4j:jar:1.5.1:compile
[INFO] |  |  |     |  \- commons-discovery:commons-discovery:jar:0.2:compile
[INFO] |  |  |     +- org.codehaus.xfire:xfire-core:jar:1.2.6:compile
[INFO] |  |  |     |  +- wsdl4j:wsdl4j:jar:1.6.1:compile
[INFO] |  |  |     |  +- jaxen:jaxen:jar:1.1-beta-9:compile
[INFO] |  |  |     |  |  \- xerces:xmlParserAPIs:jar:2.6.2:compile
[INFO] |  |  |     |  +- stax:stax-api:jar:1.0.1:compile
[INFO] |  |  |     |  +- org.apache.ws.commons:XmlSchema:jar:1.1:compile
[INFO] |  |  |     |  +- org.codehaus.woodstox:wstx-asl:jar:3.2.0:compile
[INFO] |  |  |     |  +- jdom:jdom:jar:1.0:compile
[INFO] |  |  |     |  \- commons-httpclient:commons-httpclient:jar:3.0:compile
[INFO] |  |  |     +- org.codehaus.xfire:xfire-java5:jar:1.2.6:compile
[INFO] |  |  |     |  \- xfire:xfire-jsr181-api:jar:1.0-M1:compile
[INFO] |  |  |     +- org.codehaus.xfire:xfire-generator:jar:1.2.6:compile
[INFO] |  |  |     |  \- org.codehaus.xfire:xfire-jaxb2:jar:1.2.6:compile
[INFO] |  |  |     |     \- com.sun.xml.bind:jaxb-xjc:jar:2.0.1:compile
[INFO] |  |  |     |        \- com.sun.xml.bind:jaxb-impl:jar:2.0.1:compile
[INFO] |  |  |     +- org.codehaus.xfire:xfire-xmlbeans:jar:1.2.6:compile
[INFO] |  |  |     |  \- xmlbeans:xbean:jar:2.2.0:compile
[INFO] |  |  |     +- org.codehaus.xfire:xfire-annotations:jar:1.2.6:compile
[INFO] |  |  |     |  \- commons-attributes:commons-attributes-api:jar:2.1:compile
[INFO] |  |  |     |     +- ant:ant:jar:1.5:compile
[INFO] |  |  |     |     \- qdox:qdox:jar:1.5:compile
[INFO] |  |  |     +- org.codehaus.xfire:xfire-jaxws:jar:1.2.6:compile
[INFO] |  |  |     |  +- javax.xml.ws:jaxws-api:jar:2.0:compile
[INFO] |  |  |     |  |  \- javax.xml.bind:jaxb-api:jar:2.0:compile
[INFO] |  |  |     |  |     \- javax.xml.bind:jsr173_api:jar:1.0:compile
[INFO] |  |  |     |  +- com.sun.xml.messaging.saaj:saaj-impl:jar:1.3:compile
[INFO] |  |  |     |  \- javax.xml.soap:saaj-api:jar:1.3:compile
[INFO] |  |  |     \- org.codehaus.xfire:xfire-spring:jar:1.2.6:compile
[INFO] |  |  |        \- org.apache.xbean:xbean-spring:jar:2.8:compile
[INFO] |  |  +- commons-collections:commons-collections:jar:3.2:compile
[INFO] |  |  +- commons-dbcp:commons-dbcp:jar:1.2.2:compile
[INFO] |  |  |  \- commons-pool:commons-pool:jar:1.3:compile
[INFO] |  |  +- org.directwebremoting:dwr:jar:2.0.1:compile
[INFO] |  |  +- javax.servlet:jstl:jar:1.1.2:compile
[INFO] |  |  +- taglibs:standard:jar:1.1.2:compile
[INFO] |  |  +- struts-menu:struts-menu:jar:2.4.2:compile
[INFO] |  |  |  +- commons-digester:commons-digester:jar:1.7:compile
[INFO] |  |  |  \- velocity-tools:velocity-tools-view:jar:1.0:compile
[INFO] |  |  +- opensymphony:clickstream:jar:1.0.2:compile
[INFO] |  |  +- opensymphony:oscache:jar:2.3:compile
[INFO] |  |  +- opensymphony:sitemesh:jar:2.2.1:compile
[INFO] |  |  \- org.tuckey:urlrewrite:jar:2.5.2:compile
[INFO] |  +- org.apache.struts:struts2-core:jar:2.0.6:compile
[INFO] |  |  +- opensymphony:xwork:jar:2.0.1:compile
[INFO] |  |  +- freemarker:freemarker:jar:2.3.8:compile
[INFO] |  |  +- opensymphony:ognl:jar:2.6.11:compile
[INFO] |  |  +- commons-logging:commons-logging:jar:1.1:compile
[INFO] |  |  \- com.sun:tools:jar:1.5.0:system
[INFO] |  +- org.apache.struts:struts2-codebehind-plugin:jar:2.0.6:compile
[INFO] |  +- org.apache.struts:struts2-spring-plugin:jar:2.0.6:compile
[INFO] |  +- commons-fileupload:commons-fileupload:jar:1.1.1:compile
[INFO] |  +- commons-io:commons-io:jar:1.1:compile
[INFO] |  +- displaytag:displaytag:jar:1.1:compile
[INFO] |  |  +- commons-lang:commons-lang:jar:2.1:compile
[INFO] |  |  +- com.lowagie:itext:jar:1.3:compile
[INFO] |  |  \- commons-beanutils:commons-beanutils:jar:1.7.0:compile
[INFO] |  +- org.acegisecurity:acegi-security-tiger:jar:1.0.3:compile
[INFO] |  |  \- org.acegisecurity:acegi-security:jar:1.0.3:compile
[INFO] |  |     +- commons-codec:commons-codec:jar:1.3:compile
[INFO] |  |     \- oro:oro:jar:2.0.8:compile
[INFO] |  +- log4j:log4j:jar:1.2.15:compile
[INFO] |  |  +- javax.mail:mail:jar:1.4:compile
[INFO] |  |  |  \- javax.activation:activation:jar:1.1:compile
[INFO] |  |  +- javax.jms:jms:jar:1.1:compile
[INFO] |  |  +- com.sun.jdmk:jmxtools:jar:1.2.1:compile
[INFO] |  |  \- com.sun.jmx:jmxri:jar:1.2.1:compile
[INFO] |  \- org.springframework:spring:jar:2.0.5:compile
[INFO] +- org.appfuse:appfuse-hibernate:jar:2.0-m5:compile
[INFO] |  +- org.appfuse:appfuse-data-common:jar:2.0-m5:compile
[INFO] |  |  \- javax.persistence:persistence-api:jar:1.0:compile
[INFO] |  \- org.hibernate:hibernate-annotations:jar:3.2.1.ga:compile
[INFO] |     \- org.hibernate:hibernate:jar:3.2.1.ga:compile
[INFO] |        +- javax.transaction:jta:jar:1.0.1B:compile
[INFO] |        +- asm:asm-attrs:jar:1.5.3:compile
[INFO] |        +- dom4j:dom4j:jar:1.6.1:compile
[INFO] |        +- antlr:antlr:jar:2.7.6:compile
[INFO] |        +- cglib:cglib:jar:2.1_3:compile
[INFO] |        \- asm:asm:jar:1.5.3:compile
[INFO] +- mysql:mysql-connector-java:jar:5.0.5:compile
[INFO] +- javax.servlet:jsp-api:jar:2.0:provided
[INFO] +- javax.servlet:servlet-api:jar:2.4:provided
[INFO] +- jmock:jmock:jar:1.1.0:test (scope not updated to compile)
[INFO] +- junit:junit:jar:4.10:test
[INFO] |  \- org.hamcrest:hamcrest-core:jar:1.1:test
[INFO] +- org.springframework:spring-mock:jar:2.0.8:test
[INFO] \- org.subethamail:subethasmtp-wiser:jar:1.0.3:test
[INFO]    \- org.subethamail:subethasmtp-smtp:jar:1.0.3:test

3
As stated in the error, the dependent POM file is being deployed to the GAVC coordinates of 'org.apache.ws.commons:XmlSchema:1.1', but the contents of the POM actually declare coordinates of 'org.apache.ws.commons:XmlSchema:SNAPSHOT'. Have you run 'mvn dependency:tree' to try and find where it comes from? - noamt
Yes, but I missed it. I redid the job and really looked for it : org.codehaus.xfire:xfire-java5:jar:1.2.6:compile --> org.codehaus.xfire:xfire-core:jar:1.2.6:compile --> org.codehaus.xfire:xfire-all:jar:1.2.6:compile --> org.appfuse:appfuse-service:jar:2.0-m5:compile - Jean-Rémy Revy

3 Answers

4
votes

The transitive dependencies have practically been poisoned.

The best thing you can do is check if the original POM of 'XmlSchema' has been publish with the version 'SNAPSHOT' or not. If it has, ask the project maintainers to correct this mistake and re-publish the POM; If it hasn't been published this way, remove the incorrect POM file and make sure that you resolve it again from a healthy source.

If both of these options aren't applicable, you can download the POM file, edit to correct and redeploy it to your local repository

2
votes

I had this same problem and I was able to get around it by checking the "Supress POM Consistency Checks" check box in the Artifactory remote repository settings.

maven repo settings

0
votes

I have the same error: the official pom of XmlSchema v1.1 is wrong, there is no healty source you can get it from so you have the following options:

  1. correct it by hand on artifactory,
  2. copy it by hand to your local repository (no changes needed),
  3. upgrade to a more recent version (since it is a transitive dependency of xfire 1.2.6 this could be not possible, but you can try).

For more info see the answer to this post: Maven Central Repository admins know that the pom is wrong but they cannot correct it and Apache doesn't support XmlSchema 1.1 anymore.

Furthermore this is not the only problematic pom: also Apache commons-logging v1.1 is wrong (it lists wrong dependencies), so I always use v1.1.1 or above.