You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Kristian Freed <kr...@gmail.com> on 2013/07/25 14:58:05 UTC

Preventing Maven from downloading certain versions from external repositories

Hi,

In a current project, by convention, we use 1.0-LOCAL-SNAPSHOT as the
default version for local builds, producing official builds only through
our CI server. This works well but during local builds, Maven will
needlessly look for these versions in external repositories, slowing the
build down.

Is there a way to configure Maven never to look for specific versions
outside the local .m2 cache to avoid this slowdown?

Regards,
Kristian

Re: Preventing Maven from downloading certain versions from external repositories

Posted by Russell Gold <ru...@gold-family.us>.
Maven has a fair number of conventions that are respected by a lot of its code. Trying to work against those conventions is likely to cause problems for you. Maybe if you explain what your goal is, we can suggest a more Maven-like way of accomplishing the same thing.

On Jul 25, 2013, at 8:58 AM, Kristian Freed <kr...@gmail.com> wrote:

> Hi,
> 
> In a current project, by convention, we use 1.0-LOCAL-SNAPSHOT as the
> default version for local builds, producing official builds only through
> our CI server. This works well but during local builds, Maven will
> needlessly look for these versions in external repositories, slowing the
> build down.
> 
> Is there a way to configure Maven never to look for specific versions
> outside the local .m2 cache to avoid this slowdown?
> 
> Regards,
> Kristian

-----------------
Come read my webnovel, Take a Lemon <http://www.takealemon.com>, 
and listen to the Misfile radio play <http://www.gold-family.us/audio/misfile.html>!





Re: Preventing Maven from downloading certain versions from external repositories

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Kristian,

> In a current project, by convention, we use 1.0-LOCAL-SNAPSHOT as the
> default version for local builds, producing official builds only
> through our CI server. This works well but during local builds, Maven
> will needlessly look for these versions in external repositories,
> slowing the build down.

If the LOCAL-SNAPSHOT modules are all part of the same reactor, Maven
shouldn't try to resolve them remotely. So I am assuming you have multiple
codebases with inter-codebase dependencies? In that case, you could create
another multi-module POM at the very top level, putting each codebase in a
subdirectory, then build all projects as part of the same reactor. The
LOCAL-SNAPSHOT dependency couplings should all get resolved from the
reactor then.

Regards,
Curtis


On Thu, Jul 25, 2013 at 8:58 AM, Kristian Freed <kr...@gmail.com>wrote:

> Unfortunately we also have other internal libraries on SNAPSHOT versions
> that do need to be retrieved from the repository, so going offline
> completely is not an option.
>
> Kristian
>
>
> On Thu, Jul 25, 2013 at 2:12 PM, Andreas Dolk <
> andreas.dolk.mobil@googlemail.com> wrote:
>
> > Sure. Build in offline mode:
> >
> > mvn install -o
> >
> > It may not work everytime, but maven will complain loud enough, if it
> can't
> > find an artifact in your local repo.
> >
> > Andreas
> >
> >
> > 2013/7/25 Kristian Freed <kr...@gmail.com>
> >
> > > Hi,
> > >
> > > In a current project, by convention, we use 1.0-LOCAL-SNAPSHOT as the
> > > default version for local builds, producing official builds only
> through
> > > our CI server. This works well but during local builds, Maven will
> > > needlessly look for these versions in external repositories, slowing
> the
> > > build down.
> > >
> > > Is there a way to configure Maven never to look for specific versions
> > > outside the local .m2 cache to avoid this slowdown?
> > >
> > > Regards,
> > > Kristian
> > >
> >
> >
> >
> > --
> > Andreas Dolk
> >
> > Zurmainerstraße 33
> > D-54292 Trier
> > Phone「+49 651 4362884」
> > Mobile「+49 177 4970815」
> > EMail「andreas.dolk.mobil@googlemail.com」
> >
>

Re: Preventing Maven from downloading certain versions from external repositories

Posted by Vincent Latombe <vi...@gmail.com>.
Hi,

I use xxx-LOCAL for this kind of thing, since they are not considered as
snapshots, maven won't try everyday to download a new local version.

Vincent


2013/7/25 Ron Wheeler <rw...@artifact-software.com>

> Are you at least proxying the external Maven repos through your own repo.
> That will speed things up.
>
> Ron
>
> On 25/07/2013 9:58 AM, Kristian Freed wrote:
>
>> Unfortunately we also have other internal libraries on SNAPSHOT versions
>> that do need to be retrieved from the repository, so going offline
>> completely is not an option.
>>
>> Kristian
>>
>>
>> On Thu, Jul 25, 2013 at 2:12 PM, Andreas Dolk <
>> andreas.dolk.mobil@googlemail.**com <an...@googlemail.com>>
>> wrote:
>>
>>  Sure. Build in offline mode:
>>>
>>> mvn install -o
>>>
>>> It may not work everytime, but maven will complain loud enough, if it
>>> can't
>>> find an artifact in your local repo.
>>>
>>> Andreas
>>>
>>>
>>> 2013/7/25 Kristian Freed <kr...@gmail.com>
>>>
>>>  Hi,
>>>>
>>>> In a current project, by convention, we use 1.0-LOCAL-SNAPSHOT as the
>>>> default version for local builds, producing official builds only through
>>>> our CI server. This works well but during local builds, Maven will
>>>> needlessly look for these versions in external repositories, slowing the
>>>> build down.
>>>>
>>>> Is there a way to configure Maven never to look for specific versions
>>>> outside the local .m2 cache to avoid this slowdown?
>>>>
>>>> Regards,
>>>> Kristian
>>>>
>>>>
>>>
>>> --
>>> Andreas Dolk
>>>
>>> Zurmainerstraße 33
>>> D-54292 Trier
>>> Phone「+49 651 4362884」
>>> Mobile「+49 177 4970815」
>>> EMail「andreas.dolk.mobil@**googlemail.com<an...@googlemail.com>
>>> 」
>>>
>>>
>
> --
> Ron Wheeler
> President
> Artifact Software Inc
> email: rwheeler@artifact-software.com
> skype: ronaldmwheeler
> phone: 866-970-2435, ext 102
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@maven.**apache.org<us...@maven.apache.org>
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: Preventing Maven from downloading certain versions from external repositories

Posted by Ron Wheeler <rw...@artifact-software.com>.
Are you at least proxying the external Maven repos through your own 
repo. That will speed things up.

Ron
On 25/07/2013 9:58 AM, Kristian Freed wrote:
> Unfortunately we also have other internal libraries on SNAPSHOT versions
> that do need to be retrieved from the repository, so going offline
> completely is not an option.
>
> Kristian
>
>
> On Thu, Jul 25, 2013 at 2:12 PM, Andreas Dolk <
> andreas.dolk.mobil@googlemail.com> wrote:
>
>> Sure. Build in offline mode:
>>
>> mvn install -o
>>
>> It may not work everytime, but maven will complain loud enough, if it can't
>> find an artifact in your local repo.
>>
>> Andreas
>>
>>
>> 2013/7/25 Kristian Freed <kr...@gmail.com>
>>
>>> Hi,
>>>
>>> In a current project, by convention, we use 1.0-LOCAL-SNAPSHOT as the
>>> default version for local builds, producing official builds only through
>>> our CI server. This works well but during local builds, Maven will
>>> needlessly look for these versions in external repositories, slowing the
>>> build down.
>>>
>>> Is there a way to configure Maven never to look for specific versions
>>> outside the local .m2 cache to avoid this slowdown?
>>>
>>> Regards,
>>> Kristian
>>>
>>
>>
>> --
>> Andreas Dolk
>>
>> Zurmainerstraße 33
>> D-54292 Trier
>> Phone「+49 651 4362884」
>> Mobile「+49 177 4970815」
>> EMail「andreas.dolk.mobil@googlemail.com」
>>


-- 
Ron Wheeler
President
Artifact Software Inc
email: rwheeler@artifact-software.com
skype: ronaldmwheeler
phone: 866-970-2435, ext 102


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Preventing Maven from downloading certain versions from external repositories

Posted by Kristian Freed <kr...@gmail.com>.
Unfortunately we also have other internal libraries on SNAPSHOT versions
that do need to be retrieved from the repository, so going offline
completely is not an option.

Kristian


On Thu, Jul 25, 2013 at 2:12 PM, Andreas Dolk <
andreas.dolk.mobil@googlemail.com> wrote:

> Sure. Build in offline mode:
>
> mvn install -o
>
> It may not work everytime, but maven will complain loud enough, if it can't
> find an artifact in your local repo.
>
> Andreas
>
>
> 2013/7/25 Kristian Freed <kr...@gmail.com>
>
> > Hi,
> >
> > In a current project, by convention, we use 1.0-LOCAL-SNAPSHOT as the
> > default version for local builds, producing official builds only through
> > our CI server. This works well but during local builds, Maven will
> > needlessly look for these versions in external repositories, slowing the
> > build down.
> >
> > Is there a way to configure Maven never to look for specific versions
> > outside the local .m2 cache to avoid this slowdown?
> >
> > Regards,
> > Kristian
> >
>
>
>
> --
> Andreas Dolk
>
> Zurmainerstraße 33
> D-54292 Trier
> Phone「+49 651 4362884」
> Mobile「+49 177 4970815」
> EMail「andreas.dolk.mobil@googlemail.com」
>

Re: Preventing Maven from downloading certain versions from external repositories

Posted by Andreas Dolk <an...@googlemail.com>.
Sure. Build in offline mode:

mvn install -o

It may not work everytime, but maven will complain loud enough, if it can't
find an artifact in your local repo.

Andreas


2013/7/25 Kristian Freed <kr...@gmail.com>

> Hi,
>
> In a current project, by convention, we use 1.0-LOCAL-SNAPSHOT as the
> default version for local builds, producing official builds only through
> our CI server. This works well but during local builds, Maven will
> needlessly look for these versions in external repositories, slowing the
> build down.
>
> Is there a way to configure Maven never to look for specific versions
> outside the local .m2 cache to avoid this slowdown?
>
> Regards,
> Kristian
>



-- 
Andreas Dolk

Zurmainerstraße 33
D-54292 Trier
Phone「+49 651 4362884」
Mobile「+49 177 4970815」
EMail「andreas.dolk.mobil@googlemail.com」