Maven 下载依赖项有困难

Maven 下载依赖项有困难,maven,selenium,Maven,Selenium,我在IntelliJ中下载junit和Selenium依赖项时遇到困难。 我已经在我的办公室笔记本电脑上安装了Intellij,要连接到互联网,我们必须通过代理。我已经在IDE中添加了所有代理详细信息,并且我能够连接到internet,但是当我尝试下载junit和selenium依赖项时,我看到以下错误 未找到依赖项junit:junit:4.12 检查Maven模型的解决问题。请帮忙 POM文件详细信息:- <?xml version="1.0" encoding="UTF-8"?>

我在IntelliJ中下载junit和Selenium依赖项时遇到困难。 我已经在我的办公室笔记本电脑上安装了Intellij,要连接到互联网,我们必须通过代理。我已经在IDE中添加了所有代理详细信息,并且我能够连接到internet,但是当我尝试下载junit和selenium依赖项时,我看到以下错误

未找到依赖项junit:junit:4.12 检查Maven模型的解决问题。请帮忙

POM文件详细信息:-

<?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>

    <groupId>Temp1</groupId>
    <artifactId>Temp1</artifactId>
    <version>1.0-SNAPSHOT</version>

    <dependencies>

        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
            <version>2.47.1</version>
        </dependency>


        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

您可以使用Maven配置一个用于部分或所有HTTP请求的代理。你试过这个吗

<settings>
  .
  .
  <proxies>
   <proxy>
      <id>example-proxy</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.example.com</host>
      <port>8080</port>
      <username>proxyuser</username>
      <password>somepassword</password>
      <nonProxyHosts>www.google.com|*.example.com</nonProxyHosts>
    </proxy>
  </proxies>
  .
  .
</settings>