Java Project不会识别任何maven依赖项

Java Project不会识别任何maven依赖项,java,maven,jar,Java,Maven,Jar,当我安装我的mavenmy项目时,我遇到以下错误: Failed to execute goal on project xxx Could not resolve dependencies for project yyy:xxx:1.0: Failed to collect dependencies for [log4j:log4j:jar:1.2.9 (compile), junit:junit:jar:3.8.1 (compile), yyy:framework:jar:1.0 (comp

当我安装我的
maven
my项目时,我遇到以下错误:

Failed to execute goal on project xxx Could not resolve dependencies for project yyy:xxx:1.0: 
Failed to collect dependencies for [log4j:log4j:jar:1.2.9 (compile), junit:junit:jar:3.8.1 (compile), yyy:framework:jar:1.0 (compile), ant:ant:jar:1.6.2 (compile), 
commons-beanutils:commons-beanutils:jar:1.6.1 (compile), commons-collections:commons-collections:jar:3.1 (compile), 
commons-dbcp:commons-dbcp:jar:1.2.1 (compile), commons-digester:commons-digester:jar:1.5 (compile), 
commons-fileupload:commons-fileupload:jar:1.0 (compile), commons-lang:commons-lang:jar:2.0 (compile), 
commons-logging:commons-logging:jar:1.0.3 (compile), commons-pool:commons-pool:jar:1.2 (compile), 
commons-validator:commons-validator:jar:1.0.2 (compile), xalan:xalan:jar:2.5.1 (compile), 
xerces:xercesImpl:jar:2.4.0 (compile), xml-apis:xml-apis:jar:1.0.b2 (compile), com.oracle:ojdbc14:jar:9.0.2.0.0 (compile),
 hsqldb:hsqldb:jar:1.7.1 (compile), p6spy:p6spy:jar:1.1 (compile), hibernate:hibernate:jar:2.1.6 (compile), 
 javax.transaction:jta:jar:1.1 (compile), ehcache:ehcache:jar:0.9 (compile), c3p0:c3p0:jar:0.8.4.5 (compile), 
cglib:cglib:jar:2.0.1 (compile), dom4j:dom4j:jar:1.4 (compile), odmg:odmg:jar:3.0 (compile), 
 javax.xxx:xxx:jar:api:2.1 (compile), com.lowagie:itext:jar:1.3.1 (compile), org.slf4j:slf4j-api:jar:1.6.1 (compile),
 org.slf4j:slf4j-nop:jar:1.6.1 (compile), org.dbunit:dbunit:jar:2.4.8 (compile), xdoclet:xdoclet-ejb-module:jar:1.2.3 (compile), 
 xdoclet:xdoclet:jar:1.2.3 (compile), xdoclet:xdoclet-hibernate-module:jar:1.2.3 (compile), 
 xdoclet:xjavadoc:jar:1.5 (runtime)]:
 Failed to read artifact descriptor for commons-beanutils:commons-beanutils:jar:1.4-dev: Could not transfer artifact commons-beanutils:commons-beanutils:pom:1.4-dev: ConnectException: UnresolvedAddressException -> [Help 1]
这些依赖项都包含在my
pom.xml
中。你知道怎么解决这个问题吗?我尝试添加settings.xml,但没有成功。
Settings.xml

<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
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>C:\Users\abc\.m2\repository</localRepository>
  <interactiveMode/>
  <usePluginRegistry/>
  <offline/>
  <pluginGroups/>
  <servers/>
  <mirrors/>
  <proxies/>
  <profiles/>
  <activeProfiles/>

C:\Users\abc\.m2\repository


请帮助,我被卡住了。

您需要配置settings.xml以指向一个或多个存储库,这些存储库承载您正在查找的工件。它们将下载到您的本地存储库中。例如:

<profiles>
    <profile>
        <id>central</id>
        <activation>
           <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
            <repository>
                <id>central</id>
                <url>http://repo1.maven.org/maven2</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>central</id>
                <url>http://repo1.maven.org/maven2</url>
                <releases>
                    <enabled>true</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>

中心的
真的
中心的
http://repo1.maven.org/maven2
真的
真的
中心的
http://repo1.maven.org/maven2
真的
真的

我不确定您是否可以读取计算机上其他用户的文件。将maven存储库重新定位到另一个路径,例如C:/maven_存储库,并在maven设置中更改本地路径。这个大小写对我很有用。

你有代理吗?@Bunti:不,我不这么认为。你有大写的设置文件名吗?你的maven存储库中有库吗?检查您是否有用于
commons beanutils
的JAR,如果没有,请尝试手动下载到存储库,然后安装mavenThe settings.xml。该设置在我自己的用户帐户中。无论如何,请尝试更改maven存储库的位置。我需要更改存储库所在文件夹的URL?maven需要知道从何处下载依赖项。如果您的所有依赖项都在一个地方,例如Maven Central或您公司的内部Artifactory,那么您只需要指向一个repo。您需要用所需的依赖项填充本地存储库。最简单的方法是指向包含所有依赖项的远程repo,并让Maven为您完成。或者,您可以手动填充本地存储库。例如,对于p6spy,从下载jar,运行“mvn安装:安装文件-Dfile=p6spy-1.1.jar-DgroupId=p6spy-DartifactId=p6spy-Dversion=1.1-Dpackaging=jar”。