Hi,

You don't share the "local repository", it should be seen and actually have
been called "cache". Search for tools called "Maven Repository Manager".
The famous ones out there are Archiva, Artifactory & Nexus (in alphabetical
order).

Cheers

2015-09-05 5:07 GMT+02:00 Niraj Chaudhary <niraj.m.chaudh...@gmail.com>:

> Hi George,
>
> We had tried this earlier in my company.
> The problem is you never know what is 'all' the artifacts.
> Challenges faced:
>
> 1.One developer adding a new third-party dependency required that the
> artifact should be present in all the local dev repos for proper
> compilation.
> 2.Repo grows in size. Sharing becomes difficult.
>
> Thanks,
> Niraj
>
> On Fri, Sep 4, 2015 at 8:51 PM, George Karabotsos <kara...@gmail.com>
> wrote:
>
> > Hi Gail,
> >
> > The problem is that the VM is not controlled by my organization--they
> > are controlled by a third party.  As such, they are not even within our
> > intranet.
> >
> > I do have access to the master VM which has access to the internet to
> > allow me to set it up.   So what you and Michael mention, to get all
> > artifacts first, then use the -o flag from offilne VMs, should do the
> > trick.
> >
> > Thank you so much!
> >
> > Cheers,
> > George
> >
> > On Fri, Sep 4, 2015, at 10:54 AM, Gail Stewart wrote:
> > > How are you going to get the libraries you need to this server if you
> > > have
> > > no net access?
> > >
> > > I'm not sure if this would work, but one way might be to run the maven
> on
> > > a
> > > system with internet access so it populates the local repository in
> > > $HOME/.m2
> > >
> > > Tar or zip that directory up and get it to your server.  Unzip it into
> > > your
> > > $HOME/.m2 or to a common location for several developers to use.  You
> can
> > > tell maven where to find the local repo if you aren't using the default
> > > $HOME/.m2 location.
> > >
> > > Then run maven in offline mode.
> > >
> > > This is not ideal - why doesn't the server have internet access?  Could
> > > it
> > > have access to a company managed server?  If so you could setup a nexus
> > > or
> > > artifactory enterprise server - that would have internet access, but
> > > could
> > > be controlled in a secure manner.
> > >
> > >
> > > On Fri, Sep 4, 2015 at 10:27 AM, George Karabotsos <kara...@gmail.com>
> > > wrote:
> > >
> > > > Hello all,
> > > >
> > > > Let me start by admitting I am by no means a maven expert :).
> > > >
> > > > Now I have a need to create a local file-based repository to be used
> by
> > > > maven when building my project.  I need this because I have no net
> > > > access from a set of VMs I and colleagues have to use .
> > > >
> > > > I was thinking of the following:
> > > > 1) connected to the net, normally proceed and download all necessary
> > > > artifacts
> > > > 2) copy these jars with
> > > >           > cp -r Users/gkarabotsos/.m2/repository .
> > > > 3) Add the following to my pom.xml
> > > >   <repositories>
> > > >     <repository>
> > > >       <id>localrepository</id>
> > > >       <url>file:///c:/repository/</url>
> > > >     </repository>
> > > >   </repositories>
> > > >
> > > > I do know that it does not work--I am guessing my c:/repository
> > > > structure does not have the correct form.
> > > >
> > > > I have also seen, in the net, commands such as the following:
> > > >
> > > > mvn install:install-file -Dfile=YOUR_JAR.jar -DgroupId=YOUR_GROUP_ID
> > > > -DartifactId=YOUR_ARTIFACT_ID -Dversion=YOUR_VERSION -Dpackaging=jar
> > > > -DlocalRepositoryPath=/var/www/html/mavenRepository
> > > >
> > > > Is this the only correct way? I have yet to try it, primarily
> because I
> > > > have a few dozen artifacts and doing so will take me a long time.
> > > >
> > > >
> > > > Cheers,
> > > > George
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > > > For additional commands, e-mail: users-h...@maven.apache.org
> > > >
> > > >
> > >
> > >
> > > --
> > >
> > > Gail Stewart
> > > Sr. Release Engineer
> > >
> > > AP & Payment Automation
> > > 125 Cambridgepark Drive
> > > Cambridge, MA 02140
> > > gail.stew...@mineraltree.com
> > > 617.299.3399 x148
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
> > For additional commands, e-mail: users-h...@maven.apache.org
> >
> >
>



-- 
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

Reply via email to