RE: No versions available but actually local repository contains it!
Even if I remove *all* hamcrest-core artifacts from my Nexus and local repo, Maven 3.0.4 again pulls some artifacts, but does not use 1.3 when I say [1.3]. But I want exactly 1.3. So what next to try? Can you give me an idea how a test case should be made up to let you reproduce this? -Original Message- From: Martin Gainty [mailto:mgai...@hotmail.com] Sent: Mittwoch, 25. Juli 2012 16:14 To: users@maven.apache.org Subject: RE: No versions available but actually local repository contains it! Importance: High javadoc suggests bracket version bracket or [version] for exact match http://maven.apache.org/plugins/maven-enforcer- plugin/rules/versionRanges.html if you specify a specifiv version such as version1.3/versionand you get any other version such as 1.1 or 1.2 then that is a bugperhaps a 1.2 or 1.1 was installed into 1.3 and you never had thie opportunity to update the .pom and plugin.xml to proper version? If you can provide a complete testcase on this behaviour...then please file a bug herehttp://jira.codehaus.org/browse/MNG#selectedTab=com.atlassian.jira. plugin.system.project%3Apopularissues-panel Thanks,Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Subject: No versions available but actually local repository contains it! Date: Wed, 25 Jul 2012 09:27:05 +0200 From: k...@quipsy.de To: users@maven.apache.org I have a very strange problem with Maven 3.0.4 running on JDK 1.6.0_26 on Win 7 Pro SP1 (64 Bit): When I want to compile, Maven says that it cannot resolve a dependency: No versions available for org.hamcrest:hamcrest-core:jar:[1.3,1.3] within specified range. But actually, Maven in fact successfully downloaded exactly that JAR and POM in exactly that version from Nexus (hence, from Maven Central in turn), as I can see the JAR and POM in both, my local repository and my Nexus instance! The weird thing is, if I replace [1.3] by [1.2] it does NOT complain about missing dependency! Weird, isn't it? And it gets even more weird: If I change my POM to relax the requested range from [1.2] to simply 1.2 (without braces, just to see what happens) it downloads version 1.1. But for what, if a 1.2 and 1.3 already are there? How can I fix this? I definitively need version 1.3, which IS available in my local repository, my Nexus instance and Maven Central! Thanks a lot! Markus - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: No versions available but actually local repository contains it!
How does that explain the local behaviour? I remove everything (the complete groupId folder) from my local repo and Nexus instance, trigger a build, and get the same problem again: The file with version 1.3 is then found in Nexus and local repo, but maven still says that 1.3 is not existing when forcing [1.3]. BTW, the problematic artifact is org.hamcrest:hamcrest-core:1.3. -Original Message- From: Milos Kleint [mailto:mkle...@gmail.com] Sent: Mittwoch, 25. Juli 2012 09:33 To: Maven Users List Subject: Re: No versions available but actually local repository contains it! there's some code in latest maven that not only checks the presence of the jar/pom in local repository but also some additional metadata which describes where it was downloaded from. where is defined by repository id. if the repository id in your project is missing in the current metadata, a new attempt will be made to download it. if it fails, the build fails as well. That way maven shoudl enforce that your project is always buildable with given pom content. Milos On Wed, Jul 25, 2012 at 9:27 AM, Markus Karg k...@quipsy.de wrote: I have a very strange problem with Maven 3.0.4 running on JDK 1.6.0_26 on Win 7 Pro SP1 (64 Bit): When I want to compile, Maven says that it cannot resolve a dependency: No versions available for org.hamcrest:hamcrest-core:jar:[1.3,1.3] within specified range. But actually, Maven in fact successfully downloaded exactly that JAR and POM in exactly that version from Nexus (hence, from Maven Central in turn), as I can see the JAR and POM in both, my local repository and my Nexus instance! The weird thing is, if I replace [1.3] by [1.2] it does NOT complain about missing dependency! Weird, isn't it? And it gets even more weird: If I change my POM to relax the requested range from [1.2] to simply 1.2 (without braces, just to see what happens) it downloads version 1.1. But for what, if a 1.2 and 1.3 already are there? How can I fix this? I definitively need version 1.3, which IS available in my local repository, my Nexus instance and Maven Central! Thanks a lot! Markus - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: No versions available but actually local repository contains it!
Hey Markus, I happened to be working in a project that currently uses hamcrest-core 1.1 transitively via junit 4.10, we also use nexus. If I add an explicit dependency for org.hamcrest:hamcrest-core:[1.3] to the pom I get the requested 1.3 version as expected. I tested this on 2 machines: my Mac desktop with maven 3.0.3; and my old linux desktop with maven 3.0.4. Both systems behave as expected (i.e. maven resolves the artifact to version 1.3). Both systems began without the artifact in their local repository. Since you said in your original post that you tried specifying versions [1.2] and 1.2 and maven resolved these to 1.2 and 1.1 respectively, there must be some other dependency of your project that either explicitly or transitively is depending on version 1.1 (my bet is on junit ;). To help you diagnose the problem further, try running mvn -X dependency:tree | grep hamcrest. This will show you how maven is resolving the version of the hamcrest artifacts. You may also want to double-check the checksums of the 1.3 artifact against central. I recall a recent thread where a corrupted artifact made it appear to maven that the artifact didn't exist and the error message was hiding the underlying corruption problem. Let us know if the output of that command provides any clues. Cheers, Doug On Thu, Jul 26, 2012 at 11:51 AM, Markus KARG mar...@headcrashing.euwrote: How does that explain the local behaviour? I remove everything (the complete groupId folder) from my local repo and Nexus instance, trigger a build, and get the same problem again: The file with version 1.3 is then found in Nexus and local repo, but maven still says that 1.3 is not existing when forcing [1.3]. BTW, the problematic artifact is org.hamcrest:hamcrest-core:1.3. -Original Message- From: Milos Kleint [mailto:mkle...@gmail.com] Sent: Mittwoch, 25. Juli 2012 09:33 To: Maven Users List Subject: Re: No versions available but actually local repository contains it! there's some code in latest maven that not only checks the presence of the jar/pom in local repository but also some additional metadata which describes where it was downloaded from. where is defined by repository id. if the repository id in your project is missing in the current metadata, a new attempt will be made to download it. if it fails, the build fails as well. That way maven shoudl enforce that your project is always buildable with given pom content. Milos On Wed, Jul 25, 2012 at 9:27 AM, Markus Karg k...@quipsy.de wrote: I have a very strange problem with Maven 3.0.4 running on JDK 1.6.0_26 on Win 7 Pro SP1 (64 Bit): When I want to compile, Maven says that it cannot resolve a dependency: No versions available for org.hamcrest:hamcrest-core:jar:[1.3,1.3] within specified range. But actually, Maven in fact successfully downloaded exactly that JAR and POM in exactly that version from Nexus (hence, from Maven Central in turn), as I can see the JAR and POM in both, my local repository and my Nexus instance! The weird thing is, if I replace [1.3] by [1.2] it does NOT complain about missing dependency! Weird, isn't it? And it gets even more weird: If I change my POM to relax the requested range from [1.2] to simply 1.2 (without braces, just to see what happens) it downloads version 1.1. But for what, if a 1.2 and 1.3 already are there? How can I fix this? I definitively need version 1.3, which IS available in my local repository, my Nexus instance and Maven Central! Thanks a lot! Markus - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
Re: No versions available but actually local repository contains it!
there's some code in latest maven that not only checks the presence of the jar/pom in local repository but also some additional metadata which describes where it was downloaded from. where is defined by repository id. if the repository id in your project is missing in the current metadata, a new attempt will be made to download it. if it fails, the build fails as well. That way maven shoudl enforce that your project is always buildable with given pom content. Milos On Wed, Jul 25, 2012 at 9:27 AM, Markus Karg k...@quipsy.de wrote: I have a very strange problem with Maven 3.0.4 running on JDK 1.6.0_26 on Win 7 Pro SP1 (64 Bit): When I want to compile, Maven says that it cannot resolve a dependency: No versions available for org.hamcrest:hamcrest-core:jar:[1.3,1.3] within specified range. But actually, Maven in fact successfully downloaded exactly that JAR and POM in exactly that version from Nexus (hence, from Maven Central in turn), as I can see the JAR and POM in both, my local repository and my Nexus instance! The weird thing is, if I replace [1.3] by [1.2] it does NOT complain about missing dependency! Weird, isn't it? And it gets even more weird: If I change my POM to relax the requested range from [1.2] to simply 1.2 (without braces, just to see what happens) it downloads version 1.1. But for what, if a 1.2 and 1.3 already are there? How can I fix this? I definitively need version 1.3, which IS available in my local repository, my Nexus instance and Maven Central! Thanks a lot! Markus - To unsubscribe, e-mail: users-unsubscr...@maven.apache.org For additional commands, e-mail: users-h...@maven.apache.org
RE: No versions available but actually local repository contains it!
javadoc suggests bracket version bracket or [version] for exact match http://maven.apache.org/plugins/maven-enforcer-plugin/rules/versionRanges.html if you specify a specifiv version such as version1.3/versionand you get any other version such as 1.1 or 1.2 then that is a bugperhaps a 1.2 or 1.1 was installed into 1.3 and you never had thie opportunity to update the .pom and plugin.xml to proper version? If you can provide a complete testcase on this behaviour...then please file a bug herehttp://jira.codehaus.org/browse/MNG#selectedTab=com.atlassian.jira.plugin.system.project%3Apopularissues-panel Thanks,Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. Subject: No versions available but actually local repository contains it! Date: Wed, 25 Jul 2012 09:27:05 +0200 From: k...@quipsy.de To: users@maven.apache.org I have a very strange problem with Maven 3.0.4 running on JDK 1.6.0_26 on Win 7 Pro SP1 (64 Bit): When I want to compile, Maven says that it cannot resolve a dependency: No versions available for org.hamcrest:hamcrest-core:jar:[1.3,1.3] within specified range. But actually, Maven in fact successfully downloaded exactly that JAR and POM in exactly that version from Nexus (hence, from Maven Central in turn), as I can see the JAR and POM in both, my local repository and my Nexus instance! The weird thing is, if I replace [1.3] by [1.2] it does NOT complain about missing dependency! Weird, isn't it? And it gets even more weird: If I change my POM to relax the requested range from [1.2] to simply 1.2 (without braces, just to see what happens) it downloads version 1.1. But for what, if a 1.2 and 1.3 already are there? How can I fix this? I definitively need version 1.3, which IS available in my local repository, my Nexus instance and Maven Central! Thanks a lot! Markus