maven 从私仓库下载jar包
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>test1</groupId>
<artifactId>test1</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging> <dependencies>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
</dependency>
<dependency>
<groupId>fakepath</groupId>
<artifactId>test3</artifactId>
<version>0.0.2</version>
</dependency> </dependencies>
<!-- 私有仓库 -->
<repositories>
<repository>
<id>thirdparty</id>
<name>Team Nexus Repository</name>
<url>http://192.168.1.130:8081/nexus/content/repositories/thirdparty</url>
</repository>
</repositories>
<!-- 私有仓库 -->
<pluginRepositories>
<pluginRepository>
<id>nexus</id>
<name>local nexus</name>
<url>http://192.168.1.130:8081/nexus/content/groups/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<build>
<defaultGoal>package</defaultGoal>
<finalName>${project.artifactId}</finalName> <plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin> </plugins>
</build>
</project>
settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <pluginGroups></pluginGroups>
<proxies></proxies> <servers>
<server>
<id>releases</id>
<username>admin</username>
<password>admin123</password>
</server>
<server>
<id>snapshots</id>
<username>admin</username>
<password>admin123</password>
</server>
</servers> <mirrors>
<mirror>
<id>nexus-releases</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.1.130:8081/nexus/content/groups/public</url>
</mirror>
<mirror>
<id>nexus-snapshots</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.1.130:8081/nexus/content/groups/public-snapshots</url>
</mirror>
</mirrors> <profiles>
<profile>
<id>nexus</id>
<repositories>
<repository>
<id>maven-nexus-public</id>
<name>Team Nexus Repository</name>
<url>http://192.168.1.130:8081/nexus/content/groups/public</url>
</repository>
<repository>
<id>release</id>
<name>Team Nexus Repository</name>
<url>http://192.168.1.130:8081/nexus/content/repositories/releases</url>
</repository>
<repository>
<id>snapshots</id>
<name>Team Nexus Repository</name>
<url>http://192.168.1.130:8081/nexus/content/repositories/snapshots</url>
</repository>
<repository>
<id>thirdparty</id>
<name>Team Nexus Repository</name>
<url>http://192.168.1.130:8081/nexus/content/repositories/thirdparty</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>nexus-releases</id>
<url>http://nexus-releases</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
<pluginRepository>
<id>nexus-snapshots</id>
<url>http://nexus-snapshots</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles> <activeProfiles>
<activeProfile>nexus</activeProfile>
</activeProfiles> </settings>
maven 从私仓库下载jar包的更多相关文章
- 如何去maven仓库下载jar包
Maven仓库地址 : http://search.maven.org/ https://mvnrepository.com/ 或者你直接百度搜索 : maven仓库 第一个就是 我现在想下载myba ...
- Maven & Gradle 如何从中央仓库下载Jar包
https://mvnrepository.com/ maven 中央仓库 gradle可以轻松的完成Android项目对第三方jar包文件的依赖下载,再也不需要我们手动下载jar包,然后拷贝到 ...
- 在Maven项目中,指定使用阿里云仓库下载jar包
Maven项目中,在pom.xml的</project>标签之前加入一下标签,指定使用阿里云仓库下载jar包. <!-- 使用aliyun maven --> <repo ...
- Maven仓库下载jar包失败的处理方案
Maven仓库下载jar包失败的处理方案 在使用Maven项目的时候,有时候中央仓库并没有对应的包比如kaptcha-2.3.2.jar: 为了使我们的 项目能够正常运行下去,我们可以去别的地方下载对 ...
- Maven 官网 查找&下载 jar包& pom引用 完美方案
Maven 官网 查找&下载 jar包 & pom引用 问题描述 在我们在开发过程中,经常遇到程序中需要引用的某个版本jar包,但是在公司的私有仓库下载不到的情况. 遇到这种情况,该怎 ...
- maven向本地仓库导入jar包(处理官网没有的jar包)
对于官网没有的jar包,maven向本地仓库导入jar包用如下命令 mvn install:install-file -DgroupId=包名 -DartifactId=项目名 -Dversion=版 ...
- 从Maven中央仓库下载jar包
1. Maven中央仓库 Maven中央仓库存放着比较新版本比较全的 jar 包 仓库网址:https://mvnrepository.com/ 2. 使用Maven中央仓库的 jar 包 (1) 在 ...
- [bug] Maven每次都自动下载jar包非常慢
解决 方法一:将maven改为离线模式,自己下载jar包复制到仓库中 eclipse中Window>preferences>maven>勾选Offline 方法二:将maven镜像改 ...
- maven向本地仓库导入jar包
如果maven工程的依赖jar包在网上找不到,那么只能自己打包,然后传到本地仓库,可以使用如下命令 mvn install:install-file -DgroupId=com.redis.redis ...
随机推荐
- 扯淡 id 先用着
)) { ) { ) & ) { ); }}
- xcode6 怎样下载ios7模拟器
1. 怎样下载ios7模拟器 点击xcode.选择"Preferences".选择"downloads",就能够看见IOS 7.1,只是下载有点慢. 2. 怎样 ...
- 【Unity】8.2 GUI Style和GUISkin
分类:Unity.C#.VS2015 创建日期:2016-04-27 一.自定义GUI Control 功能控件 (Functional Control) 是游戏必要的,而这些控件的外观对游戏的美感非 ...
- 菜鸟学SSH(五)——Struts2上传文件
上传文件在一个系统当中是一个很常用的功能,也是一个比较重要的功能.今天我们就一起来学习一下Struts2如何上传文件. 今天讲的上传文件的方式有三种: 1,以字节为单位传输文件: 2,Struts2封 ...
- mongodb学习比较(数据操作篇)
1. 批量插入: 以数组的方式一次插入多个文档可以在单次TCP请求中完成,避免了多次请求中的额外开销.就数据传输量而言,批量插入的数据中仅包含一份消息头,而多次单条插入则会在每次插入数据时封 ...
- python(58):python下划线
详解Python中的下划线 本文将讨论Python中下划线(_)字符的使用方法.我们将会看到,正如Python中的很多事情,下划线的不同用法大多数(并非所有)只是常用惯例而已. 单下划线(_) 通常情 ...
- 17、uwp 打包失败记录
今天在打包时,总是打包失败, visual studio 报错误: 严重性 说明 代码 项目 文件 行 禁止显示状态错误 Error info: error 80080204: All app pac ...
- Linux: grep多个关键字“与”和“或”
1.或操作 grep -E '123|abc' filename // 找出文件(filename)中包含123或者包含abc的行 egrep '123|abc' filename // 用egrep ...
- 【TensorFlow】TF-tf.nn.dropout
官方的接口是这样的 tf.nn.dropout(x, keep_prob, noise_shape=None, seed=None, name=None) 根据给出的keep_prob参数,将输入te ...
- idea 项目添加web支持
选中项目添加 add - web