How to configure maven without internet access

When converting a dynamic web project to a maven project, I get this error:

"CoreException: Could not calculate build plan: 
 Plugin org.apache.maven.plugins:maven-compiler-plugin"

I can’t access the Internet to download any banners and plugins during the conversion, because I am on a limited network without Internet access. Is there a way to make a Maven project without internet access?

I use:

Eclipse kepler
Maven 3.0.4
JDK 1.6
+4
source share
5 answers

You can manually download or find suitable artifacts. (jars) Then copy them to the local maven repository.

Now you can use

mvn clean install -o  // off-line build 

build a project without the Internet.

+4
source

, , , , - , , maven . :

  • , , .
  • sonatype nexus , .
  • Sonatype nexus serer - . , nexus maven.
  • , , pom.xml nexus

, . - , , .

+3
mvn clean -o install

- Maven , , :

-o, --offline 

Maven .

+1

, , , maven , . , , , , . -, .

, ,

0

Maven - , maven. - (Central Maven Repository) (Nexus - maven Enterprise) - maven .m2 .

, , maven , , pom (s) maven:

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
0

Source: https://habr.com/ru/post/1570821/


All Articles