We just updated to 2.3.2 and are running into problems deploying certain
SNAPSHOTs.  

We get a 409 when we deploy, saying that the repository rejected the change
due to its SNAPSHOT/release handling policy:

org.apache.maven.lifecycle.LifecycleExecutionException: Error deploying
artifact: Failed to transfer file:
http://artifactory.acme.com/artifactory/libs-snapshots-local/com/acme/Util/SNAPSHOT/Util-SNAPSHOT.jar.
Return code is: 409

2011-02-24 12:49:08,973 [pool-1-thread-21] [WARN ]
(o.a.e.UploadServiceImpl:152) - Sending HTTP error code 409: The repository
'libs-snapshots-local' rejected the artifact
'libs-snapshots-local:com/acme/Util/SNAPSHOT/Util-SNAPSHOT.jar' due to its
snapshot/release handling policy..



We have two local repositories, one for releases and one for snapshots:

    <localRepositories>
        <localRepository>
            <key>libs-releases-local</key>
            <description>Local repository for in-house
libraries</description>
            <includesPattern>**/*</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <blackedOut>false</blackedOut>
            <handleReleases>true</handleReleases>
            <handleSnapshots>false</handleSnapshots>
            <maxUniqueSnapshots>0</maxUniqueSnapshots>
           
<suppressPomConsistencyChecks>false</suppressPomConsistencyChecks>
            <propertySets/>
            <snapshotVersionBehavior>non-unique</snapshotVersionBehavior>
           
<localRepoChecksumPolicyType>client-checksums</localRepoChecksumPolicyType>
        </localRepository>
        <localRepository>
            <key>libs-snapshots-local</key>
            <description>Local repository for in-house
snapshots</description>
            <includesPattern>**/*</includesPattern>
            <repoLayoutRef>maven-2-default</repoLayoutRef>
            <blackedOut>false</blackedOut>
            <handleReleases>false</handleReleases>
            <handleSnapshots>true</handleSnapshots>
            <maxUniqueSnapshots>0</maxUniqueSnapshots>
           
<suppressPomConsistencyChecks>false</suppressPomConsistencyChecks>
            <propertySets/>
            <snapshotVersionBehavior>non-unique</snapshotVersionBehavior>
           
<localRepoChecksumPolicyType>client-checksums</localRepoChecksumPolicyType>
        </localRepository>


In our POM we have our distribution management defined as:

    <distributionManagement>
        <repository>
            <id>releases</id>
           
<url>http://artifactory.acme.com/artifactory/libs-releases-local</url>
        </repository>
        <snapshotRepository>
            <uniqueVersion>false</uniqueVersion>
            <id>snapshots</id>
           
<url>http://artifactory.acme.com/artifactory/libs-snapshots-local</url>
        </snapshotRepository>
    </distributionManagement>

Our settings.xml looks like:

<?xml version="1.0" encoding="UTF-8"?>
<settings>
    <profiles>
        <profile>
            <repositories>
                <repository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>releases</id>
                    <name>libs-releases</name>
                   
<url>http://artifactory.acme.com/artifactory/libs-releases</url>
                </repository>
                <repository>
                    <snapshots/>
                    <id>snapshots</id>
                    <name>libs-snapshots</name>
                   
<url>http://artifactory.acme.com/artifactory/libs-snapshots</url>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                    <id>releases</id>
                    <name>plugins-releases</name>
                   
<url>http://artifactory.acme.com/artifactory/plugins-releases</url>
                </pluginRepository>
                <pluginRepository>
                    <snapshots/>
                    <id>snapshots</id>
                    <name>plugins-snapshots</name>
                   
<url>http://artifactory.acme.com/artifactory/plugins-snapshots</url>
                </pluginRepository>
            </pluginRepositories>
            <id>artifactory</id>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>artifactory</activeProfile>
    </activeProfiles>
    <servers>
        <server>
            <id>releases</id>
            <username>acme</username>
            <password>123456</password>
        </server>
        <server>
            <id>snapshots</id>
            <username>acme</username>
            <password>123456</password>
        </server>
    </servers>
</settings>

I'm able to deploy the same artifact to the libs-releases-local repository,
even though it is a SNAPSHOT.  Somehow Artifactory thinks its a release.

If I change my POM's version from "SNAPSHOT" to a number followed by
SNAPSHOT, eg. "99.1-SNAPSHOT" it gets deployed to the snapshot repository.

Is anyone else seeing similar behavior?




-- 
View this message in context: 
http://forums.jfrog.org/Problem-deploying-SNAPSHOTs-tp6061265p6061265.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to