Setup Maven to use our dedicated server -


we maintain our own repository server totally cut-off internet because of our company policies.

to achieve this, install maven in our system , executed following command force maven download dependencies offline purpose: mvn dependency:go-offline

upon completion, move downloaded dependencies our tomcat server , update maven's settings.xml mirror url served tomcat (where dependencies stored). not using 3rd party repository manager now.

<mirror>   <id>projectscentralrepository</id>   <mirrorof>*</mirrorof>   <name>central repository</name>   <url>http://localhost:8080/repos</url> </mirror> 

problem occurs when remove dependencies in our .m2\repository , try run "mvn package" package simple project not have dependencies (refers our pom.xml). many of dependencies downloaded our server not understand why following error occurs. weren't dependencies downloaded when execute mvn dependency:go-offline?

[error] failed execute goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources (default-resources) on project test: execution default-resources of goal org.apache.maven.plugins:maven-resources-plugin:2.6:resources failed: plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or on e of dependencies not resolved: following artifacts not resolved: org.apache.maven:maven-profile:jar:2.0.6, org.apache.maven:maven-repository-metadata:jar:2.0.6, org.apache.maven:maven-plugin-registry:jar:2.0.6, classworlds:classworlds:jar:1.1-alpha-2: not find artifa ct org.apache.maven:maven-profile:jar:2.0.6 in projectscentralrepository (http://localhost:8080/repos) -> [help 1] [error]  

i notice maven had downloaded multiple versions of different dependencies. example, had downloaded 2.05 2.2.0 of maven-profile pom files 2.0.9 has jar file. how force maven download latest version of maven dependencies , use latest version when performing "mvn package" goal?

thank guys.

our pom.xml:

<project xmlns="http://maven.apache.org/pom/4.0.0" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance"   xsi:schemalocation="http://maven.apache.org/pom/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">   <modelversion>4.0.0</modelversion>    <groupid>xx.yyyy.test</groupid>   <artifactid>test</artifactid>   <version>1.0</version>   <packaging>jar</packaging>   <name>testing</name>   <url>http://maven.apache.org</url>  </project> 


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -