What does your resolver (of artifactory-snapshot-uploads) and cache settings look like ? Maybe they contain [module] and not [artifact] in their path.
But I don't find it a good idea to publish two different artifacts and two different pom-files in one publish command. Normally, one ivy.xml file should correspond with one published pom.xml file, and you have ivy-tasks to convert/publish your ivy.xml as a pom.xml. The module name in the ivy.xml should match the artifactId of your pom.xml file. It would make your publishing also much more transparant. Regards, Marc 2014-02-12 22:52 GMT+01:00 rickbryant <rick.bry...@gxs.com>: > Ivy Users, > > We recently completed integration of Ivy dependency management with our > legacy Ant build and all of our dependency retrieves (Maven formatted) from > our Artifactory repository work without issue. However, we have encountered > an odd issue with Ivy publish. > > When publishing two separate artifacts in the same build, the first > artifact > and its associated POM are published successfully. Then the second artifact > is published successfully but its associated POM is not published and the > build fails: > [ivy:publish] DEPRECATED: 'ivy.conf.file' is deprecated, use > 'ivy.settings.file' instead > [ivy:publish] :: loading settings :: file = > c:\Projects\CSR_trunk\Build\ivysettings.xml > [ivy:publish] :: publishing :: com.gxs.csr# > [ivy:publish] published ICSServicesClient to > > http://artifactory.gxsonline.net/libs-snapshot-local/com/gxs/csr/ICSServicesClient/01.02.03.06-SNAPSHOT/ICSServicesClient-01.02.03.06-SNAPSHOT.jar > [ivy:publish] published ICSServicesClient to > > http://artifactory.gxsonline.net/libs-snapshot-local/com/gxs/csr/ICSServicesClient/01.02.03.06-SNAPSHOT/ICSServicesClient-01.02.03.06-SNAPSHOT.pom > [ivy:publish] published ICSServicesUtilities to > > http://artifactory.gxsonline.net/libs-snapshot-local/com/gxs/csr/ICSServicesUtilities/01.02.03.06-SNAPSHOT/ICSServicesUtilities-01.02.03.06-SNAPSHOT.jar > > BUILD FAILED > c:\Projects\CSR_trunk\Build\build2.xml:87: The following error occurred > while executing this line: > c:\Projects\CSR_trunk\Build\build2.xml:107: impossible to publish artifacts > for com.gxs.csr#;working@TN-BRYANTR2: java.io.IOException: PUT operation > to > URL > > http://artifactory.gxsonline.net/libs-snapshot-local/com/gxs/csr/ICSServicesUtilities/01.02.03.06-SNAPSHOT/ICSServicesUtilities-01.02.03.06-SNAPSHOT.pom > failed with status code 409: Conflict > > Here's our Ivy publish task in our build.xml: > <ivy:publish resolver="artifactory-snapshot-uploads" overwrite="true" > publishivy="false" > > pubrevision="${majorVersion}.${minorVersion}.${releaseNumber}.${buildNumber}-SNAPSHOT"> > <artifacts > pattern="${ICSServicesSrc}/Build/tmp/ICSServicesClient.[ext]"/> > <artifacts > pattern="${ICSServicesSrc}/Build/tmp/ICSServicesUtilities.[ext]"/> > </ivy:publish> > > Here's our publications segment in our ivy.xml (the two POM files are > created manually and have different content): > <publications> > <artifact name="ICSServicesClient" ext="jar" type="jar"/> > <artifact name="ICSServicesClient" ext="pom" type="pom"/> > <artifact name="ICSServicesUtilities" ext="jar" type="jar"/> > <artifact name="ICSServicesUtilities" ext="pom" type="pom"/> > </publications> > > And here's the detailed error message from Artifactory: > Could not save resource > > 'libs-snapshot-local:com/gxs/csr/ICSServicesUtilities/01.02.03.06-SNAPSHOT/ICSServicesUtilities-01.02.03.06-20140204.171744-6.pom': > The target deployment path > > 'com/gxs/csr/ICSServicesUtilities/01.02.03.06-SNAPSHOT/ICSServicesUtilities-01.02.03.06-20140204.171744-6.pom' > does not match the POM's expected path prefix > 'com/gxs/csr/ICSServicesClient/01.02.03.06-SNAPSHOT'. Please verify your > POM > content for correctness and make sure the source path is a valid Maven > repository root path. Looks like it is expecting the path to be > ICSServiceClient not ICSServicesUtilities > > We originally thought that Artifactory was causing this issue so we set up > a > WebEx with JFrog. They recommended we disable POM validation on the > repository and then republish the artifacts. This time the two artifacts > and > their associated POM files published successfully. However, when we looked > in Artifactory at the contents of the second POM file > (ICSServicesUtilities) > it contained the same exact contents as the first POM file > (ICSServicesClient) which is incorrect. We did verify that the contents of > the two POM files we created had different contents so it appears that Ivy > changed the contents of the second POM file during publication. > > Has anyone else encountered this issue before? Is it not possible to > publish > two artifacts with Ivy to a Maven-based Artifactory repository that are > located in different paths (requiring different POM files)? For comparison > purposed we have successfully published these exact two artifacts and > associated POM files to this repository using Maven Ant Tasks but we woul > really prefer to use Ivy for publications if possible. > > Thanks, > Rick > > > > > -- > View this message in context: > http://apache-ivy.996301.n3.nabble.com/Artifactory-Publish-Failure-tp9626.html > Sent from the ivy-user mailing list archive at Nabble.com. >