You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by tong123123 <to...@yahoo.com.hk> on 2012/12/11 11:13:15 UTC

strange with repository element in pom

at first, my pom has not the following repository
<repositories>
        <repository>
          <id>jboss-public-repository-group</id>
          <name>JBoss Public Maven Repository Group</name>
          <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </releases>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>never</updatePolicy>
          </snapshots>
        </repository>

and the project has error that it cannot download hamcrest from http://repo.maven.apache.org/maven2,
then I add the above JBoss repository to pom, delete the correponding folder in local repository and select the project > maven > update project, the 

hamcrest jar can download successfully.
Then I delete the latest downloaded hamcrest jar file in local repository and remove the JBoss repository element in the pom.
I expect the previous error will error, but out of my expectation, the hamcrest jar file can be downloaded even I already remove the JBoss repository element from the pom 

and delete the hamcrest jar file from local repository, why the hamcrest jar file can still be downloaded?

Re: strange with repository element in pom

Posted by Anders Hammar <an...@hammar.net>.
I'm guessing there was something in your local repo initially that made
this not work. Then you remove that and it now works. Very hard to tell
without detailed info.
The hamcrest artifacts are in central so you do not need the jboss repo for
that.

/Anders


On Tue, Dec 11, 2012 at 11:13 AM, tong123123 <to...@yahoo.com.hk>wrote:

> at first, my pom has not the following repository
> <repositories>
>         <repository>
>           <id>jboss-public-repository-group</id>
>           <name>JBoss Public Maven Repository Group</name>
>           <url>
> https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
>           <layout>default</layout>
>           <releases>
>             <enabled>true</enabled>
>             <updatePolicy>never</updatePolicy>
>           </releases>
>           <snapshots>
>             <enabled>true</enabled>
>             <updatePolicy>never</updatePolicy>
>           </snapshots>
>         </repository>
>
> and the project has error that it cannot download hamcrest from
> http://repo.maven.apache.org/maven2,
> then I add the above JBoss repository to pom, delete the correponding
> folder in local repository and select the project > maven > update project,
> the
>
> hamcrest jar can download successfully.
> Then I delete the latest downloaded hamcrest jar file in local repository
> and remove the JBoss repository element in the pom.
> I expect the previous error will error, but out of my expectation, the
> hamcrest jar file can be downloaded even I already remove the JBoss
> repository element from the pom
>
> and delete the hamcrest jar file from local repository, why the hamcrest
> jar file can still be downloaded?
>