Return-Path: X-Original-To: apmail-maven-users-archive@www.apache.org Delivered-To: apmail-maven-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8FC79187A0 for ; Fri, 4 Sep 2015 14:55:10 +0000 (UTC) Received: (qmail 53060 invoked by uid 500); 4 Sep 2015 14:55:09 -0000 Delivered-To: apmail-maven-users-archive@maven.apache.org Received: (qmail 52990 invoked by uid 500); 4 Sep 2015 14:55:09 -0000 Mailing-List: contact users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Maven Users List" Reply-To: "Maven Users List" Delivered-To: mailing list users@maven.apache.org Received: (qmail 52979 invoked by uid 99); 4 Sep 2015 14:55:08 -0000 Received: from Unknown (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Sep 2015 14:55:08 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 6DA321AB56A for ; Fri, 4 Sep 2015 14:55:08 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.001 X-Spam-Level: *** X-Spam-Status: No, score=3.001 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-east.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id K4rO-tbVDDag for ; Fri, 4 Sep 2015 14:54:54 +0000 (UTC) Received: from mail-lb0-f176.google.com (mail-lb0-f176.google.com [209.85.217.176]) by mx1-us-east.apache.org (ASF Mail Server at mx1-us-east.apache.org) with ESMTPS id 175E642F35 for ; Fri, 4 Sep 2015 14:54:54 +0000 (UTC) Received: by lbcjc2 with SMTP id jc2so12721180lbc.0 for ; Fri, 04 Sep 2015 07:54:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=i5e3bV/8zDrpQuqYYf0Vb9bXyLyms8++RNjUbVlg78k=; b=WEhhqF4uM+u8+uVSmZwy1fgAC/C5AlV7Z4oWZwJ3Jzh7RIzsrjfXHquJPprPZ/ZDKK VNtIGM4k5RQOSEZl6zdWKtZKIO0lEhuIlneXiBq3CcuabJOHH7CGXWNjXOsbGvfJZVPU K1euKkEjkH3gmxKRYkhpfL1mPtZ2LhhAIQTQgHtjcs943MuIFwZkH7S59YRSAPZgGip9 xaWMFSvyAGh2vyQYXhwHKFhZgfW7++IXqhXEdLNIgWiXwlbGlbkO+6g/cd46oOOsIa2Z giCvZhIfrX+zMP3WDa/nwe23CeZXL/r85EH34X8XGH3uRlFH6z9+g/Ybsql3MHfVeAj4 B2Vw== X-Gm-Message-State: ALoCoQmzlTc5rplqSSlQW4UAYwHjZO/O7XhTC2iFVaziz3alhrxreqIiTLFNDmJZc64bc1a5umlT MIME-Version: 1.0 X-Received: by 10.152.44.196 with SMTP id g4mr4173391lam.56.1441378492972; Fri, 04 Sep 2015 07:54:52 -0700 (PDT) Received: by 10.114.173.114 with HTTP; Fri, 4 Sep 2015 07:54:52 -0700 (PDT) In-Reply-To: <1441376839.3776819.374831697.1FA6616D@webmail.messagingengine.com> References: <1441376839.3776819.374831697.1FA6616D@webmail.messagingengine.com> Date: Fri, 4 Sep 2015 10:54:52 -0400 Message-ID: Subject: Re: Creating local repository From: Gail Stewart To: Maven Users List Content-Type: multipart/alternative; boundary=089e0158c61e0f9fab051eed156a --089e0158c61e0f9fab051eed156a Content-Type: text/plain; charset=UTF-8 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 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 > > > localrepository > file:///c:/repository/ > > > > 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 --089e0158c61e0f9fab051eed156a--