George,

Nor am I a Maven expert, by any stretch of the imagination!

But from experience, when you want to work with Maven such that is uses only 
the local repository you must use the -o (the offline only) option when 
executing your builds.

I will look at your other questions because I think there are some other things 
you can do as alternatives.

Mike

Michael Tarullo
Contractor (Engility Corp)
Enterprise Architect
NSRR System Administrator
FAA WJH Technical Center
(609)485-5294

-----Original Message-----
From: George Karabotsos [mailto:kara...@gmail.com] 
Sent: Friday, September 04, 2015 10:27 AM
To: users@maven.apache.org
Subject: Creating local repository

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


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

Reply via email to