Spring Maven存储库问题
Maven尝试从端口8081上的localhost下载包/依赖项。这个nexus url接管是不需要的,我以前从未发生过 在运行常规的Spring Maven存储库问题,spring,maven,maven-plugin,pom.xml,nexus,Spring,Maven,Maven Plugin,Pom.xml,Nexus,Maven尝试从端口8081上的localhost下载包/依赖项。这个nexus url接管是不需要的,我以前从未发生过 在运行常规的mvn清洁安装后会发生以下情况: Downloading: http://192.168.10.46:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-io/1.0/plexus-io-1.0.jar Downloading: http://192.168.10.46:8081/nexus/c
mvn清洁安装后
会发生以下情况:
Downloading:
http://192.168.10.46:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-io/1.0/plexus-io-1.0.jar
Downloading:
http://192.168.10.46:8081/nexus/content/groups/public/org/codehaus/plexus/plexus- archiver/1.0/plexus-archiver-1.0.jar
Downloading: http://192.168.10.46:8081/nexus/content/groups/public/org/codehaus/plexus/plexus-utils/1.5.1/plexus-utils-1.5.1.jar
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]
[ERROR] The project com.enonic.kurs:my-plugin:1.0.0-SNAPSHOT (/Users/xx yy/Documents/Enonic plugins/project/project/pom.xml) has 2 errors
[ERROR] Unresolveable build extension: Plugin com.enonic.cms.tools:maven-cms-plugin:1.0.0 or one of its dependencies could not be resolved
从指定存储库下载依赖项之前的所有时间。my pom.xml中的存储库:
<pluginRepositories>
<pluginRepository>
<id>enonic</id>
<name>Enonic Plugin Repository</name>
<url>http://repo.enonic.com/maven</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>com.enonic.cms</groupId>
<artifactId>cms-api</artifactId>
<version>4.4.10</version>
<scope>provided</scope>
</dependency>
.........
---------
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.enonic.cms.tools</groupId>
<artifactId>maven-cms-plugin</artifactId>
<version>1.0.0</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
Settings.xml:
yourr设置xml文件的这一部分正是将任意存储库查找重定向到本地nexus repo的原因
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.10.46:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
我建议您查看手册页面上的Maven基础知识:在我的浏览器中,我可以连接到url。。据我所知,自从上次它起作用以来,没有任何变化。问题是maven试图使用本地存储库?我应该在settings.xml中注释掉一些东西吗?我更新了我的帖子,提供了关于这个问题的更多信息。我的插件(maven cms插件)中的依赖项有一些查找问题,请在
~/.m2/settings.xml
或$m2\u HOME/conf/settings.xml
上显示您的存储库镜像设置,在底部发布。现在我得到了一个新错误:error]错误解析插件“org.apache.maven.plugins:maven install plugin”的版本,来自存储库[local(/Users/geir-nygard/.m2/repository),enonic(http://repo.enonic.com/maven),nexus(http://192.168.10.46:8081/nexus/content/groups/public)]:在任何插件库中都找不到插件->[帮助1]
<settings>
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.10.46:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!--Enable snapshots for the built in central repo to direct -->
<!--all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></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>
</profiles>
<activeProfiles>
<!--make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
ERROR] Error resolving version for plugin 'org.apache.maven.plugins:maven-install-plugin' from the repositories [local (/Users/xx yy/.m2/repository), enonic (http://repo.enonic.com/maven), nexus (http://192.168.10.46:8081/nexus/content/groups/public)]: Plugin not found in any plugin repository -> [Help 1]
<mirrors>
<mirror>
<!--This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.10.46:8081/nexus/content/groups/public</url>
</mirror>
</mirrors>
<mirrorOf>*,!enonic</mirrorOf>
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases><enabled>true</enabled></releases>
<snapshots><enabled>true</enabled></snapshots>
</pluginRepository>
</pluginRepositories>