问题描述
- 关于maven无法从nexus私服导包
- 我自己搭好了一个私服能用。。。但是eclipse无法导包究竟是什么原因???希望各位大大指教下。。。我eclipse ----maven已经 配置好了installations 和user settings
我的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""> <localRepository>D:mavenRepository</localRepository> <mirrors> <mirror> <id>nexus</id> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public</url> </mirror> </mirrors> <servers> <server> <id>nexus-releases</id> <username>admin</username> <password>admin123</password> </server> <server> <id>nexus-snapshots</id> <username>admin</username> <password>admin123</password> </server> <server> <id>central</id> <username>admin</username> <password>admin123</password> </server> </servers> <profiles> <profile> <id>nexus</id> <repositories> <repository> <id>central</id> <url>http://localhost:8081/nexus/content/groups/public</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>http://localhost:8081/nexus/content/groups/public</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>nexus</activeProfile> </activeProfiles></settings>
解决方案
你的项目的pom文件里是不是得引入这个repository呀,
<repository> <id>central</id> <url>http://localhost:8081/nexus/content/groups/public</url> <releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories>
解决方案二:
<repository> <id>central</id> <url>http://localhost:8081/nexus/content/groups/public</url> </repository> </repositories>
时间: 2024-12-11 00:50:01