I don't use remote repository for snapshots, that's how I "solved" it :)
I found the reason why it can't download the file. "Handle releases" must be
enabled when using nonunique snapshot versions
I managed to reproduce it on the local pc:
1. Install latest tomcat
2. copy artifactory.war it tomcat webapps, let it create default
configuration
3. change libs-snapshot-local to nonunique versions
4. let anonymous user deploy anything
5. Enable handle releases for libs-snapshot-local. Here is the mistery for
me. Shouldn't it detect snapshot by the version SNAPSHOT? Without this
option maven returns response code 409 and there is a message in the logs
"rejected blablabla.jar due to its snapshot/release handling policy..
6. deploy some artifact. Remember to
add <uniqueVersion>false</uniqueVersion> in the pom
7. start another arifactory instance. I didn't use tomcat here an launched
it straight from the unpacked zip installation
8. on the seccond artifactory allow anonymous to deploy anything and deploy
same artifact in the libs-snapshot-local. There was no need to enable
"Handle releases", must be related to Nonunique option somehow
9. create new remote repository with key libs-snapshot-remote and url
pointing to the first instace libs-snapshot-local. Remove the checkbox from
the "Handle releases"
10. create new virtual repository and add libs-snapshot-local and
libs-snapshot-remote
11. go the the simple browser to the deployed jars. There will be snapshots
with the timestamps from the local repository and the snapshots from the
remote repository. Try to download snapshot from the remore repository and
it will fail.
12. Reenable "Handle releases" in the remote repository and try to download
in the simple browser. All works now
2011/4/28 Noam Y. Tenne [via Artifactory] <
[email protected]>
> How did you solve it?
> I was unable to reproduce this locally.
> Also, do you see perhaps any outstanding logs (on both local and remote)
> when performing the failing request?
>
> On Thu, Apr 28, 2011 at 10:58 AM, Shohou <[hidden
> email]<http://user/SendEmail.jtp?type=node&node=6312451&i=0&by-user=t>
> > wrote:
>
>> Thanks for you help. I solved my problem in different way.
>>
>> Don't know why it can't download the file. When i browse through the
>> simple browser, I see files from the remote repository. But when i try to
>> click on the file to download it, I get 404 error.
>> Remote repository is https-ed with password and no anonymous access. I see
>> files in simple browser, so password is configured correctly. When i try to
>> download the file directly from the remote repository, it downloads
>> sucessfully, but through virtual repository of the local artifactory it
>> returns 404 :(
>>
>> I think maven version is irrelative if i can't download the file through
>> the browser
>>
>> 2011/4/27 Noam Y. Tenne [via Artifactory] <[hidden
>> email]<http://user/SendEmail.jtp?type=node&node=6312356&i=0&by-user=t>
>> >
>>
>> Hi,
>>>
>>> To clarify on the resolution order, this is true in regard to artifact
>>> requests; first the local repositories are searched and if the artifact is
>>> not found within them, the remote repositories are searched.
>>> This does not hold to snapshot resolution via virtual repositories, since
>>> Artifactory collects snapshot information of all the repositories under the
>>> target virtual, creates a merge of all found snapshots and follows to
>>> represent the latest one.
>>> In your case, Maven properly detects that the non-unique POM should be
>>> downloaded, but fails to retrieve it.
>>> Which version of Maven are you using?
>>> Also, are you able to request the POM file directly from the remote
>>> repository?
>>>
>>> On Wed, Apr 27, 2011 at 3:25 PM, Shohou <[hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=6310623&i=0&by-user=t>
>>> > wrote:
>>>
>>>> Hi!
>>>>
>>>> Some background first. I have an artifactory instance running in the
>>>> another
>>>> city that have some problems with artifacts deploying (sometimes it
>>>> returns
>>>> 500 error and fails our automated builds).
>>>> I decided to bypass this problem by installing another local instace of
>>>> the
>>>> artifactory to store SNAPSHOTs.
>>>>
>>>> Here is the description of the problem that i don't know how to solve:
>>>> 1. I created one local repository with "handle snapshots" checkbox
>>>> enabled
>>>> and with Unique in "Maven Snapshot Version Behavior".
>>>> 2. Created remote repository to point to the main artifactory instance,
>>>> also
>>>> with handle snapshots enabled. The remote instance has Nonunique version
>>>> behavior.
>>>> 3. Also I created virtual repository that has both local and remote
>>>> repositories in it.
>>>> 4. I deployed new artifact in local repository. Same artifacts exists in
>>>> the
>>>> remote repository.
>>>> 5. When maven tries to resolve the artifact, it gets maven-metadata.xml
>>>> from
>>>> the remote repository (it seems):
>>>>
>>>> Downloading:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/maven-metadata.xml
>>>> Downloaded:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/maven-metadata.xml
>>>> (313 B at 0.2 KB/sec)
>>>> Downloading:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/Blablabla-SNAPSHOT.pom
>>>> [WARNING] The POM for com:Blablabla:jar:SNAPSHOT is missing, no
>>>> dependency
>>>> information available
>>>> Downloading:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/Blablabla-SNAPSHOT.jar
>>>>
>>>> maven-metadata-snapshots.xml in the maven repository in profile has
>>>> content:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <metadata>
>>>> <groupId>com</groupId>
>>>> <artifactId>Blablabla</artifactId>
>>>> <version>SNAPSHOT</version>
>>>> <versioning>
>>>> <snapshot>
>>>> <buildNumber>10</buildNumber>
>>>> </snapshot>
>>>> <lastUpdated>20110427100008</lastUpdated>
>>>> </versioning>
>>>> </metadata>
>>>>
>>>> 6. If i remove remote repository from the virtual repository, i get
>>>> correct
>>>> resolution of the artifact:
>>>>
>>>> Downloading:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/maven-metadata.xml
>>>> Downloaded:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/maven-metadata.xml
>>>> (357 B at 0.1 KB/sec)
>>>> Downloading:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/Blablabla-20110427.100008-2.pom
>>>> Downloaded:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/Blablabla-20110427.100008-2.pom
>>>> (5 KB at 35.2 KB/sec)
>>>> Downloading:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/Blablabla-20110427.100008-2.jar
>>>> Downloaded:
>>>>
>>>> http://192.168.6.26:8090/artifactory/snapshots-only/com/Blablabla/SNAPSHOT/Blablabla-20110427.100008-2.jar
>>>> (427 KB at 2904.2 KB/sec)
>>>>
>>>> maven-metadata-snapshots.xml in the maven repository in profile has
>>>> content:
>>>> <?xml version="1.0" encoding="UTF-8"?>
>>>> <metadata>
>>>> <groupId>com</groupId>
>>>> <artifactId>Blablabla</artifactId>
>>>> <version>SNAPSHOT</version>
>>>> <versioning>
>>>> <snapshot>
>>>> <timestamp>20110427.100008</timestamp>
>>>> <buildNumber>2</buildNumber>
>>>> </snapshot>
>>>> <lastUpdated>20110427100008</lastUpdated>
>>>> </versioning>
>>>> </metadata>
>>>>
>>>> What am I doing wrong? Documentation says that resolution order always
>>>> starts with local repositories. Is this a bug?
>>>>
>>>> --
>>>> View this message in context:
>>>> http://forums.jfrog.org/snapshot-resolution-order-tp6309265p6309265.html<http://forums.jfrog.org/snapshot-resolution-order-tp6309265p6309265.html?by-user=t&by-user=t&by-user=t>
>>>> Sent from the Artifactory - Users mailing list archive at Nabble.com.
>>>>
>>>>
>>>> ------------------------------------------------------------------------------
>>>> WhatsUp Gold - Download Free Network Management Software
>>>> The most intuitive, comprehensive, and cost-effective network
>>>> management toolset available today. Delivers lowest initial
>>>> acquisition cost and overall TCO of any competing solution.
>>>> http://p.sf.net/sfu/whatsupgold-sd
>>>> _______________________________________________
>>>> Artifactory-users mailing list
>>>> [hidden
>>>> email]<http://user/SendEmail.jtp?type=node&node=6310623&i=1&by-user=t>
>>>>
>>>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------------
>>>
>>> WhatsUp Gold - Download Free Network Management Software
>>> The most intuitive, comprehensive, and cost-effective network
>>> management toolset available today. Delivers lowest initial
>>> acquisition cost and overall TCO of any competing solution.
>>> http://p.sf.net/sfu/whatsupgold-sd
>>> _______________________________________________
>>> Artifactory-users mailing list
>>> [hidden
>>> email]<http://user/SendEmail.jtp?type=node&node=6310623&i=2&by-user=t>
>>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>>
>>>
>>> ------------------------------
>>> If you reply to this email, your message will be added to the
>>> discussion below:
>>> http://forums.jfrog.org/snapshot-resolution-order-tp6309265p6310623.html<http://forums.jfrog.org/snapshot-resolution-order-tp6309265p6310623.html?by-user=t&by-user=t>
>>> To unsubscribe from snapshot resolution order, click here.
>>>
>>
>>
>> ------------------------------
>> View this message in context: Re: snapshot resolution
>> order<http://forums.jfrog.org/snapshot-resolution-order-tp6309265p6312356.html?by-user=t>
>>
>> Sent from the Artifactory - Users mailing list
>> archive<http://forums.jfrog.org/Artifactory-Users-f2377369.html?by-user=t>at
>> Nabble.com.
>>
>>
>> ------------------------------------------------------------------------------
>> WhatsUp Gold - Download Free Network Management Software
>> The most intuitive, comprehensive, and cost-effective network
>> management toolset available today. Delivers lowest initial
>> acquisition cost and overall TCO of any competing solution.
>> http://p.sf.net/sfu/whatsupgold-sd
>> _______________________________________________
>> Artifactory-users mailing list
>> [hidden
>> email]<http://user/SendEmail.jtp?type=node&node=6312451&i=1&by-user=t>
>> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>>
>>
>
> ------------------------------------------------------------------------------
>
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Artifactory-users mailing list
> [hidden email]<http://user/SendEmail.jtp?type=node&node=6312451&i=2&by-user=t>
> https://lists.sourceforge.net/lists/listinfo/artifactory-users
>
>
> ------------------------------
> If you reply to this email, your message will be added to the discussion
> below:
> http://forums.jfrog.org/snapshot-resolution-order-tp6309265p6312451.html
> To unsubscribe from snapshot resolution order, click
> here<http://forums.jfrog.org/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=6309265&code=c2hvaG91QGdtYWlsLmNvbXw2MzA5MjY1fDEyOTA4MTYyNzk=>.
>
>
--
View this message in context:
http://forums.jfrog.org/snapshot-resolution-order-tp6309265p6312944.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
WhatsUp Gold - Download Free Network Management Software
The most intuitive, comprehensive, and cost-effective network
management toolset available today. Delivers lowest initial
acquisition cost and overall TCO of any competing solution.
http://p.sf.net/sfu/whatsupgold-sd
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users