maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gail Stewart <gail.stew...@mineraltree.com>
Subject Re: Creating local repository
Date Fri, 04 Sep 2015 14:54:52 GMT
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 <karabot@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-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 

Gail Stewart
Sr. Release Engineer

AP & Payment Automation
125 Cambridgepark Drive
Cambridge, MA 02140
gail.stewart@mineraltree.com
617.299.3399  x148

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message