Typically you should never access the local Maven repo directly, but use
Maven (or a Maven lib) for that. It would then handle download of any
dependency missing etc.

I think you're trying to do something "clever" by bypassing Maven and/or
the idea of Maven repositories. It could work, but you could very well run
into issues. One such issue is when people used to Maven assume you're
doing it in some way, but in fact you're doing it some other way.
I suggest that you follow Maven's best-practices and create a remote repo
where you deploy your artifacts. The during deployment you download from
there. A repository manager is more a less a must today and will give you
lots of other benefits (audit, auth, etc.).

/Anders

On Wed, Nov 20, 2019 at 4:01 PM Kruse, Stephen S <stephen.kr...@gd-ms.com>
wrote:

> Thanks for the response Anders!  My question is would you ever use your
> local .m2/repository for you deployment since that in theory should contain
> all of your dependencies?  Do you foresee any issues with doing this?
>
> Thanks,
> Steve
>
> -----Original Message-----
> From: Anders Hammar <and...@hammar.net>
> Sent: Wednesday, November 20, 2019 8:23 AM
> To: Maven Users List <users@maven.apache.org>
> Subject: Re: Using the .m2 directory for deployment
>
> The .m2/repository folder i a local Maven repository, which is local for
> one machine. What you want to do is to deploy (Maven lingo for publish) to
> a repository manager (such as Nexus och Artifactory for example). You
> deployment script/system can then download from the repo manager and
> perform the deployment.
>
> /Anders
>
> On Wed, Nov 20, 2019 at 1:47 PM Kruse, Stephen S <stephen.kr...@gd-ms.com>
> wrote:
>
> > Hi,
> >
> >
> >
> > I am looking into possible deployment strategies with maven to support
> > the current project I’m working on.  One strategy I am thinking about
> > is to use the .m2 for deployment as well as the development
> > environment.  I have not seen anyone else talk of using the .m2 for
> > deployment purposes and was hoping that I could get a good
> > understanding of why.  One benefit I foresee is having the same
> > environment used for both the development and runtime environment.  Any
> thoughts are much appreciated.
> >
> >
> >
> > Thanks,
> >
> > Steve
> >
> >
> >
> > H Stephen Kruse
> >
> > General Dynamics (GD-MS)
> >
> > 12450 Fair Lakes Cir, Fairfax, VA 22033
> >
> > BYG-1/TCS Software Lead
> >
> > Office: (703) 272-1774
> >
> >
> >
> >
> >
>

Reply via email to