You have to create Profile for that..

If you will put following entry in your settings.xml file it will first look
at the remote repository and then it will look for your local repository.
Basically you need to create <profile>

<profile>
    <id>Repository Proxy</id>
    <activation>
        <activeByDefault>true</activeByDefault>
    </activation>
      <repositories>
            <repository>
                <id>archiva.internal</id>
                <url>http://localhost:8080/archiva/repository/internal/
</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
            </repository>
    </repositories>
  </profile>



If you will create <mirror> then it will only look for defined repository
only. It will not look for remote in this case.


I hope it helps.

Thanks,
daivish.



On Wed, Aug 10, 2011 at 4:35 PM, Barrie Treloar <baerr...@gmail.com> wrote:

> On Thu, Aug 11, 2011 at 12:06 AM, goutham <goutham.vasire...@gmail.com>
> wrote:
> > I want it to restrict to the remote repo only. It should not look into
> local
> > repo , at least first it have to look in remote and then go for local
> >
> > On Wed, Aug 10, 2011 at 6:02 PM, Anders Hammar [via Maven] <
> > ml-node+4685646-210393254-220...@n5.nabble.com> wrote:
> >
> >> Short answer: it's the same command
> >>
> >> somewhat longer answer: Maven will first look in your local repo. If not
> >> found there, it will look in the configured remote repos (and download
> to
> >> your local repo if found).
> >>
> >> Maybe reading some of the first chapters in some Maven book will give
> you a
> >>
> >> better idea on how Maven works. You'll find two free books here [1].
> >>
> >> /Anders
> >>
> >> [1] http://www.sonatype.com/Support/Books
>
> Did you go and read the suggested sources?
>
> I don't undetstand why you would want to check remote repo only.
> Any released artifact NEVER changes, so if its in your local repo its
> identical to what would be on the remote repo.
> This saves you networks connection and download times, which is a good
> thing.
>
> As Wayne points out, you can always delete ~/.m2/repository (or
> specific parts of it) with no issues.
> Maven will just re-download the versions again.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> For additional commands, e-mail: users-h...@maven.apache.org
>
>

Reply via email to