Windows平台上Maven私服的搭建
来源:互联网 发布:淘宝手办现货可信? 编辑:程序博客网 时间:2024/05/16 01:52
下载 nexus-2.12.0-01-bundle.zip
将文件解压,然后打开命令提示符,定位到解压目录下nexus-2.12.0-01下的bin目录。
执行nexus.bat install
出现上述提示表示安装成功
接着启动服务nexus.bat start
如果出现如下提示表示启动失败。此时需要修改文件。
在安装文件中找到wrapper.conf文件找到第15行将wrapper.java.command=你的java.exe
文件所在的位置
若出现下面提示表示启动成功
完成后要实现从本地向私服上传文件需要配置路径及登录的用户名密码
配置登录密码:
在maven的安装目录下找到settings.xml然后在service标签中添加如下标签
<server> <id>releases</id> <username>admin</username> <password>admin123</password></server><server> <id>snapshots</id> <username>admin</username> <password>admin123</password></server>
上面是登录私服默认的用户名与密码,
<profile> <!--profile的id--> <id>dev</id> <repositories> <repository> <!--仓库id,repositories可以配置多个仓库,保证id不重复--> <id>nexus</id> <!--仓库地址,即nexus仓库组的地址--> <url>http://192.168.119.129:8081/nexus/content/groups/public/</url> <!--是否下载releases构件--> <releases> <enabled>true</enabled> </releases> <!--是否下载snapshots构件--> <snapshots> <enabled>true</enabled> </snapshots> </repository> </repositories> <pluginRepositories> <!-- 插件仓库,maven的运行依赖插件,也需要从私服下载插件 --> <pluginRepository> <!-- 插件仓库的id不允许重复,如果重复后边配置会覆盖前边 --> <id>public</id> <name>Public Repositories</name> <url>http://192.168.119.129:8081/nexus/content/groups/public/</url> </pluginRepository> </pluginRepositories> </profile> </profiles><activeProfiles> <activeProfile>dev</activeProfile></activeProfiles>
上面是下载位置相关配置192.168.119.129:8081应该换成自己搭建的服务器的ip及端口号。
将如下代码添加到自己的pom.xml中,其中的localhost:8081应该换成自己搭建的服务器的ip及端口号
<distributionManagement> <repository> <id>releases</id> <url>http://localhost:8081/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <url>http://localhost:8081/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
在eclipse中出现下面信息就表示连接私服并下载依赖包成功。
相关问题:
ArtifactDescriptorException: Failed to read artifact descriptor for commons-beanutils:commons-beanutils:jar:1.9.1: ArtifactResolutionException: Failure to transfer commons-beanutils:commons-beanutils:pom:1.9.1 from http://192.168.52.134:8081/nexus/content/groups/public/ was cached in the local repository, resolution will not be reattempted until the update interval of nexus has elapsed or updates are forced. Original error: Could not transfer artifact commons-beanutils:commons-beanutils:pom:1.9.1 from/to nexus (http://192.168.52.134:8081/nexus/content/groups/public/): No response received after 60000
翻译
ArtifactDescriptorException:无法读取commons-beanutils的artifact描述符:commons-beanutils:jar:1.9.1:ArtifactResolutionException:未能传输commons-beanutils:commons-beanutils:pom:1.9.1 from http://192.168.52.134:8081 / nexus / content / groups / public /被缓存在本地存储库中,在nexus的更新间隔过去或更新被强制之前,决议将不被重新尝试。 原始错误:无法传输工件commons-beanutils:commons-beanutils:pom:1.9.1 from / to nexus(http://192.168.52.134:8081/nexus/content/groups/public/):60000后没有收到回复
解决办法
2.到本地Maven仓库找到对应位置(就是这个jar包的位置),这时候可能会发现里面有*.lastupdate一些文件,删除之后重新下载。(网络不好可能要重复多次)
将所有提示出来的jar包中的*.lastupdate全部删除掉再次更新即可
- Windows平台上Maven私服的搭建
- Windows平台上安装搭建iPhone/iPad的开发环境
- Windows平台上安装搭建iPhone/iPad的开发环境
- Windows平台上安装搭建iPhone/iPad的开发环境
- Windows平台上安装搭建iPhone/iPad的开发环境
- Windows平台上安装搭建iPhone/iPad的开发环境
- Nginx+PHP在Windows平台上的搭建
- 在Github上搭建自己的博客(Windows平台)
- gozmq在windows平台上的搭建过程
- Hadoop 2.8 在 windows 平台上的搭建(单节点)
- 在Windows平台上搭建kafka
- Windows Maven(nexus) 服务器、私服搭建
- windows服务器maven私服搭建
- Windows下Maven私服怎么搭建
- 关于windows平台上的java和c/c++的editplus搭建开发平台
- Tomcat服务器在Mac平台和windows平台上的搭建
- Nupic的Windows平台搭建
- windows+iis的平台上搭建支持php+mysql 服务器上也是一样
- 第四次实验
- 【AGC002E】Candy Piles 博弈论
- 在windows下安装运行disconf
- 实验3.4 栈与队列——链队列
- python中报错:SyntaxError: invalid character in identifier
- Windows平台上Maven私服的搭建
- linux下 指定区域截图
- 微信小程序顶部下拉菜单栏
- 第七章 使用Akka构建高并发程序
- 出于数据保护的结构体指针强制转换和字段截断
- Coprime Sequence HDU
- Nodejs之事件
- BigNums——HDUOJ 1316
- 设计模式之单例模式