1、下载maven3,解压,添加环境变量MAVEN_HOME和path
2、下载nexus2解压,添加环境变量path
3、把D:\dev\mvn\apache-maven-3.0.4\conf下的setting.xml中修改为<localRepository>H:\MavenJar</localRepository>,MavenJar是我的本地仓库
4、建立中央仓库,超级管理员身份运行cmd,执行nexus install
5、修改D:\dev\mvn\nexus-2.1.2\bin\jsw\conf中的wrapper.conf中wrapper.java.command=C:\Program Files\Java\jdk1.6.0_20\bin
6、cmd中执行nexus start,然后浏览器中输入http://localhost:8081/nexus/index.html#welcome
用户名admin,密码admin123
7、配置中央仓库:点击左侧的repository,复制Public Repositories他对应的地址:http://localhost:8081/nexus/content/groups/public/,即为中央仓库的地址
8、在parent的pom.xml中配置:
<repositories>
<repository> <id>nexus</id> <name>Nexus Repository</name> <url>http://localhost:8081/nexus/content/groups/public/</url> <layout>default</layout> <releases> <enabled>false</enabled> </releases> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories>
9、配置镜像:设置私有工厂一般要配置镜像
在mvn的setting.xml中的<mirrors>里面添加:
<mirror> <id>central</id> <mirrorOf>*</mirrorOf> <name>Human Readable Name for this Mirror.</name> <url>http://localhost:8081/nexus/content/repositories/central</url> </mirror>
这里面的*表示parent的pom.xml中所有的repository添加配置,我的里面只有一个nexus
10、把lucence创建的nexus索引文件拷贝到D:\dev\mvn\sonatype-work\nexus\indexer\central-ctx中,先清空,也要先nexus stop。
二。maven创建项目
创建一个简单的maven项目的命令如下:
mvn archetype:create -DgroupId=com.luo -DartifactId=plat-DpackageName=com.luo -DarchetypeArtifactId=maven-archetype-artifactId=webapp
DpackageName可省略不写
相关推荐
nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库nexus 搭建 maven仓库
maven3.8.3+nexus3.34.zip
maven 私服 nexus2 nexus3 安装与说明,只有简单的安装,没有详细的配置使用说明
Maven Nexus 私服搭建 从零开始,资源下载、安装指导、开发配置说明
建立Maven私服 – Nexus下载、安装、配置、使用 建立Maven私服 – Nexus下载、安装、配置、使用
Nexus搭建Maven私服 +maven安装步骤
配置Nexus代理中央仓库,其它任何公开的Maven仓库,将你组织内部的Maven配置指向Nexus,这样所有构件都将从Nexus下载,如果Nexus没有你要的构件,它会自动先去外部仓库下载到本地,仅一次。 本地宿主仓库。Nexus可以...
linux-maven-maven私服nexus安装文档
maven nexus 配置,简要介绍如何配置nexus。。。。。。
开发人员的福音,MAVEN私服,nexus截止到目前最新版,提供共完善jar包依赖使用功能
如何进行Linux安装配置maven以及搭建nexus服务器.docx
maven和nexus
maven maven私服 nexus 私服
Windows 下Nexus搭建Maven私服 Windows 下Nexus搭建Maven私服
良心工具仅需5积分,2021年最新nexus,解压密码nexus-3x
maven使用及Nexus搭建Maven私服
.\mvnDeployTool.exe -r C:\\Users\\yyc\\.m2\\repository\\org\\apache\\maven -s D:\devEnv\apache-maven-3.6.3\conf\settings.xml -url http://IP:PORT/nexus/content/repositories/thirdpart -rid thirdpart
该文档是关于配置maven私服nexus,对maven学习者有很大的帮助
Mac版下安装需要是有的maven和nexus安装包,使用简单,解压便可使用。一点点积累,成长共同见证。