1) No. The id is just a logical name inside Maven. It is the URL that
matters. If you use the http://localhost:8080/artifactory/repo you point at
Artifactory's global virtual repository and an ordered search is conducted
on configured repositories, including caches, according to the policies set
on each repository
(http://www.jfrog.org/sites/artifactory/latest/faqs.html#repositories).

2) Yes, it does work, but repo1 will still be consulted right after
Artifactory (in case an artifact could not be resolved with the current
Artifactory configuration), which is normally not what you want.

mfs wrote:
> 
> Hi Yoav,
> 
> It seems to be working now...Well actually the artifacts i was
> refering to were actually the plugins (which were always being
> downloaded from the maven public repo i.e. repo1), and after adding
> the pluginrepositories section (as below) in pom those are now being
> cached/downloaded from the locally configured repository...now your
> last reply has got me a bit confused, 1) arent the ids suppose to be
> whatever you have named them (in the key tag) in
> artifactory.config.xml because thats from where you want to download
> your artifact/plugin 2) why is it working like this..
> 
> <pluginRepositories>
>       <pluginRepository>
>               <id>maven-public-repo-cache</id>
>               <url>http://localhost:8080/artifactory/repo</url>
>               <snapshots>
>                       <enabled>false</enabled>
>               </snapshots>
>       </pluginRepository>
> </pluginRepositories>
> 
> 
> 
> On 8/20/07, Yoav Landman <[EMAIL PROTECTED]> wrote:
>>
>> The repository id must be "central" to override repo1 (for releases, or
>> "snapshots" to override it for snapshots).
>> If you wish to use a different id, then you have to use mirroring in
>> settings.xml.
>>
>> HTH
>>
>>
>> mfs wrote:
>> >
>> > Hi Yoav,
>> >
>> > Thanks for the quick follow..so basically among the two approaches
>> > suggested, the first is the one i have opted, and have defined the
>> > maven-public-repository-cache in the parent pom as it states (instead
>> > of settings.xml)..or am i still missing something..
>> >
>> > Farhan.
>> >
>> > On 8/20/07, Yoav Landman <[EMAIL PROTECTED]> wrote:
>> >>
>> >> You need to make Artifactory either a mirror or a replacement for the
>> >> "repo1"
>> >> central repository by following a simple Maven configuration. See:
>> >> http://www.jfrog.org/sites/artifactory/latest/maven.html
>> >>
>> >>
>> >> mfs wrote:
>> >> >
>> >> > Dear All,
>> >> >
>> >> > I have setup a maven public repository cache so as to maintain the
>> >> > artifacts used commonly (within the organization) and hence not
>> >> > require a download everytime from a maven public repository and btw
>> i
>> >> > am using Artifactory as the Repository Manager.
>> >> >
>> >> > So in order to achieve the above i have defined the following in the
>> >> > artifactory-config.xml
>> >> >
>> >> > <remoteRepository>
>> >> >     <key>maven-public-repo</key>
>> >> >     <handleReleases>true</handleReleases>
>> >> >     <handleSnapshots>false</handleSnapshots>
>> >> >    
>> <excludesPattern>org/artifactory/**,org/jfrog/**</excludesPattern>
>> >> >     <url>http://repo1.maven.org/maven2</url>
>> >> >  </remoteRepository>
>> >> >
>> >> > and similarly in the pom.xml i have defined the following entry so
>> as
>> >> > to refer to it..
>> >> >
>> >> >  <repository>
>> >> >       <id>maven-public-repo-cache</id>
>> >> >       <name>xyz Repository</name>
>> >> >       <url>http://localhost:8080/artifactory/repo</url>
>> >> >       <layout>default</layout>
>> >> >       <releases>
>> >> >             <enabled>true</enabled>
>> >> >       </releases>
>> >> >       <snapshots>
>> >> >            <enabled>false</enabled>
>> >> >       </snapshots>
>> >> >  </repository>
>> >> >
>> >> > Now the problem is that the repository DOES cache artifacts but NOT
>> >> > all of the artifacts that are downloaded (from the public repo) and
>> >> > hence for them it still refers to the repo1.maven.org, now i am not
>> >> > sure why is that the case..why is it not caching everything ?
>> >> >
>> >> > Thanks in advance and Regards,
>> >> >
>> >> > Farhan.
>> >> >
>> >> >
>> ---------------------------------------------------------------------
>> >> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/artifactory---maintaining-a-public-repo-cache-tf4301698s177.html#a12245037
>> >> Sent from the Maven - Users mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> >> For additional commands, e-mail: [EMAIL PROTECTED]
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/artifactory---maintaining-a-public-repo-cache-tf4301698s177.html#a12245254
>> Sent from the Maven - Users mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/artifactory---maintaining-a-public-repo-cache-tf4301698s177.html#a12245584
Sent from the Maven - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to