Intellij 14 does not add pom dependencies to Classpath

I am using Intellij 14.0.3. I have imported some Maven modules that declare dependencies in their pom.xml files.

In the IDE, when I open a class that imports an object from these dependencies, the import is displayed as "on error", for example, any reference to this object in this class. When I click on the error and type alt + Enter, Intellij will ask me to add a dependency on Maven to the class path.

Example:

In my pom I have:

    <dependency>
        <groupId>joda-time</groupId>
        <artifactId>joda-time</artifactId>
        <version>${joda.version}</version>
    </dependency>

In my class, I have the following import on error:

import org.joda.time.DateTime;

When I press alt + type intellij, ask me:

Add library Maven: 'joda-time:joda-time:2.1' to classpath

Intellij Maven ? → Maven → Import, " Maven ", - . "" .

.

+4
2

- .

, maven.XML . maven, , , . , ? (intellij 14.0.3).

m'y, git Maven, , Maven.

+4

.m2. setting.xml maven .

<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">
  ...
  <proxies>
    <proxy>
      <id>myproxy</id>
      <active>true</active>
      <protocol>http</protocol>
      <host>proxy.somewhere.com</host>
      <port>8080</port>
      <username>proxyuser</username>
      <password>somepassword</password>
      <nonProxyHosts>*.google.com|ibiblio.org</nonProxyHosts>
    </proxy>
  </proxies>
  ...
</settings>
  • id: . -.
  • : true, . , .
  • , , : ://host: , .
  • , . , , -.
  • nonProxyHosts. , . -; - .

maven, ide alldependencies

+1

All Articles