在IDEA开发环境中,maven如何管理java项目依赖项的下载
我在用IDEA编码。当我使用maven时,我遇到了一个奇怪的问题 首先,IDEA配置了本地maven环境,并使用本地配置文件在IDEA开发环境中,maven如何管理java项目依赖项的下载,java,maven,intellij-idea,Java,Maven,Intellij Idea,我在用IDEA编码。当我使用maven时,我遇到了一个奇怪的问题 首先,IDEA配置了本地maven环境,并使用本地配置文件setting.xml,配置了nexus节点 其次,我从基于maven的eclipse导入了一个项目 我确信setting.xml100%正确。但是这个想法不是从nexus下载jar,而是从maven url下载 我不知道发生了什么事 我清理~\m2文件夹,并清理“lib”floder。但这也不是成功 我想知道如何使用maven下载jar,如何确定url,以及在什么情况下下
setting.xml
,配置了nexus节点
其次,我从基于maven的eclipse导入了一个项目
我确信setting.xml
100%正确。但是这个想法不是从nexus下载jar,而是从maven url下载
我不知道发生了什么事
我清理~\m2
文件夹,并清理“lib”floder。但这也不是成功
我想知道如何使用maven下载jar,如何确定url,以及在什么情况下下载失败
我隐藏了groupId、artifactId、名称和密码,但我确信它是正确的
我隐藏了一些依赖,它太多了
父Pom位于nexus中
<?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:\Software\maven\repo</localRepository>
<pluginGroups>
</pluginGroups>
<proxies>
</proxies>
<servers>
<server>
<id>nexus</id>
<username>name</username>
<password>pwd</password>
</server>
<server>
<id>y-snapshots</id>
<username>name</username>
<password>pwd</password>
</server>
<server>
<id>y-releases</id>
<username>name</username>
<password>pwd</password>
</server>
</servers>
<mirrors>
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://192.168.31.169:8081/repository/maven-public/</url>
</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></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>
<activeProfile>nexus</activeProfile>
</activeProfiles>
</settings>
D:\Software\maven\repo
关系
名称
pwd
y型快照
名称
pwd
y型释放
名称
pwd
关系
*
http://192.168.31.169:8081/repository/maven-公开的/
关系
中心的
http://central
符合事实的
符合事实的
中心的
http://central
符合事实的
符合事实的
关系
4.0.0
com.s
党卫军
1.4.0-快照
s-公共
1.5.0-快照
罐子
mysql
mysql连接器java
检查您的设置:文件->设置
检查您的项目pom中是否有itI中提到的存储库。我确信maven主目录和用户设置文件都是本地的,并且本地存储库已覆盖,并且setting.xml只有一个镜像,但下载url不是nexus url,值得注意的是,我需要使用vpn代理下载内部网络,检查pom.xml是否指定了存储库地址我更新问题,添加pom文件和setting.xmlFile | Settings | Build,Execution,Deployment | Build Tools | Maven |存储库
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.s</groupId>
<artifactId>ss</artifactId>
<version>1.4.0-SNAPSHOT</version>
</parent>
<artifactId>s-common</artifactId>
<version>1.5.0-SNAPSHOT</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
</project>