最近在公司里面搭了个框架用起来还是不错的,所以想整回家把环境搭起来日后慢慢优化...
框架采用maven结构进行管理的...在公司里面有专门的私服,配置起来比较方便,回到家我想不搭私服了吧,直接用网络上现成的私服:发现了Nexus:https://code.lds.org/nexus
于是就想直接把maven的settings.xml更改下发现有些包还是找不到,当所有jar包都找到之后但是例如有些数据库的最新的驱动等可能在线的私服没有需要手动放到本地的资源库中,也就是数据库的驱动,在次过程中遇到一个问题;build项目的时候一直报一个错:
is missing, no dependency information available [WARNING] The POM for ... is missing, no dependency information available
最终发现一个国外的朋友也遇到过此类问题,然后热心的网友回答了他的问题:
http://cocoon.10839.n7.nabble.com/mvn-clean-install-failure-quot-Could-not-resolve-dependencies-quot-td11041.html
最终问题解决...
下面留下配置文件做记录:
.m2/settings.xml内容:
镜像中的配置:
<mirrors> <!-- mirror | Specifies a repository mirror site to use instead of a given repository. The repository that | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used | for inheritance and direct lookup purposes, and must be unique across the set of mirrors. | <mirror> <id>mirrorId</id> <mirrorOf>repositoryId</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://my.repository.com/repo/path</url> </mirror> --> <mirror> <id>nexus</id> <url>https://code.lds.org/nexus/content/groups/approved-group/</url> <mirrorOf>central</mirrorOf> </mirror> <mirror> <id>nexus2</id> <url>https://code.lds.org/nexus/content/repositories/central/</url> <mirrorOf>external:*,!central</mirrorOf> </mirror> </mirrors>
profiles中的配置:
<profile> <id>nexus</id> <repositories> <repository> <id>central</id> <url>http://central</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> <!-- <updatePolicy>always</updatePolicy> --> <!-- <checksumPolicy>ignore</checksumPolicy> --> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://central</url> <releases> <enabled>true</enabled> </releases> <snapshots> <enabled>true</enabled> </snapshots> </pluginRepository> </pluginRepositories> </profile>
其中pom文件中需要配置:
<repositories> <repository> <id>maven2-repository.java.net</id> <name>Java.net Repository for Maven</name> <url>http://download.java.net/maven/2/</url> <layout>default</layout> </repository> <repository> <id>apache.snapshots</id> <name>Apache Snapshot Repository</name> <url>http://repository.apache.org/snapshots</url> <releases> <enabled>false</enabled> </releases> </repository> </repositories>
相关推荐
Windows 下Nexus搭建Maven私服 Windows 下Nexus搭建Maven私服
Nexus搭建Maven私服 +maven安装步骤
Maven Nexus 私服搭建 从零开始,资源下载、安装指导、开发配置说明
linux下搭建内网maven私服
maven 环境搭建总结 maven心得
关于使用Nexus搭建Maven私服的开发文档。新手了解一下。
maven搭建web项目hello world
在CentOS7上用Nexus3搭建Maven私服。 一、需要的环境 CentOS 7里需要安装jdk8和Maven3,具体的安装步骤可以百度一下。 二、需要的包 需要nexus3的安装包,官网上https://www.sonatype.com/download-oss-sonatype...
搭建maven私服的软件,包括maven版本3.5.3,nexus版本3.12.1
spring boot 框架搭建 maven项目
maven使用及Nexus搭建Maven私服
提供了基于Nexus搭建Maven私服所需要的一切资源和个人经验,搭建后可maven deploy 上传自己的jar包。别人如何在自己的maven项目中引用我将单独再上传一份。
附件是自己使用docker在内网和外网搭建Maven私服Nexus3所总结的文档,通过该文档可以在内网搭建属于自己的nexus私服,提高自己的生产力。
maven-j2ee-plugin-1.4.jar
详细地教你如何用Eclipse搭建Maven2,同时也对私服(nexus)的搭建有详细的说明,一个很好的学习资料。
使用Nexus1.8搭建MAVEN私服详细步骤,以及在网页上上传JAR包
本文介绍如何搭建Maven私服,包括命令和图片的详解实操
Elipse 搭建maven 开发环境 管理jar包仓库 搭建spring+mybatis项目
maven私服搭建文档里简单介绍了maven私服的搭建及配置
使用nexus 可以搭建maven私服,如何使用nexus搭建maven 本地服务器呢?