1

I am building Hadoop project using Maven. I am facing below error

[ERROR] Failed to execute goal on project hadoop-minikdc: Could not resolve dependencies for project org.apache.hadoop:hadoop-minikdc:jar:3.0.0-SNAPSHOT: Failure to find org.apache.directory.jdbm:apacheds-jdbm1:bundle:2.0.0-M2 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced

pom.xml

<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">
  <parent>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-project</artifactId>
<version>3.0.0-SNAPSHOT</version>
<relativePath>../../hadoop-project</relativePath>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.hadoop</groupId>
  <artifactId>hadoop-minikdc</artifactId>
  <version>3.0.0-SNAPSHOT</version>
  <description>Apache Hadoop MiniKDC</description>
  <name>Apache Hadoop MiniKDC</name>
  <packaging>jar</packaging>
<dependencies>
<dependency>
  <groupId>commons-io</groupId>
  <artifactId>commons-io</artifactId>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>org.apache.directory.server</groupId>
  <artifactId>apacheds-core-api</artifactId>
  <version>2.0.0-M15</version>
  <scope>compile</scope>
  <exclusions>
    <exclusion>
      <groupId>org.apache.directory.api</groupId>
      <artifactId>api-ldap-schema-data</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.apache.directory.server</groupId>
  <artifactId>apacheds-interceptor-kerberos</artifactId>
  <version>2.0.0-M15</version>
  <scope>compile</scope>
  <exclusions>
    <exclusion>
      <groupId>org.apache.directory.api</groupId>
      <artifactId>api-ldap-schema-data</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.apache.directory.server</groupId>
  <artifactId>apacheds-protocol-shared</artifactId>
  <version>2.0.0-M15</version>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>org.apache.directory.server</groupId>
  <artifactId>apacheds-protocol-kerberos</artifactId>
  <version>2.0.0-M15</version>
  <scope>compile</scope>
  <exclusions>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.apache.directory.server</groupId>
  <artifactId>apacheds-ldif-partition</artifactId>
  <version>2.0.0-M15</version>
  <scope>compile</scope>
  <exclusions>
    <exclusion>
      <groupId>org.apache.directory.api</groupId>
      <artifactId>api-ldap-schema-data</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.apache.directory.server</groupId>
  <artifactId>apacheds-mavibot-partition</artifactId>
  <version>2.0.0-M15</version>
  <scope>compile</scope>
  <exclusions>
    <exclusion>
      <groupId>org.apache.directory.api</groupId>
      <artifactId>api-ldap-schema-data</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.apache.directory.api</groupId>
  <artifactId>api-all</artifactId>
  <version>1.0.0-M20</version>
  <scope>compile</scope>
  <exclusions>
    <exclusion>
      <groupId>xml-apis</groupId>
      <artifactId>xml-apis</artifactId>
    </exclusion>
    <exclusion>
      <groupId>xpp3</groupId>
      <artifactId>xpp3</artifactId>
    </exclusion>
    <exclusion>
      <groupId>dom4j</groupId>
      <artifactId>dom4j</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.apache.directory.server</groupId>
  <artifactId>apacheds-jdbm-partition</artifactId>
  <version>2.0.0-M15</version>
  <scope>compile</scope>
  <exclusions>
    <exclusion>
      <groupId>org.apache.directory.api</groupId>
      <artifactId>api-ldap-schema-data</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.apache.directory.server</groupId>
  <artifactId>apacheds-protocol-ldap</artifactId>
  <version>2.0.0-M15</version>
  <scope>compile</scope>
  <exclusions>
    <exclusion>
      <groupId>org.apache.directory.api</groupId>
      <artifactId>api-ldap-schema-data</artifactId>
    </exclusion>
  </exclusions>
</dependency>
<dependency>
  <groupId>org.slf4j</groupId>
  <artifactId>slf4j-log4j12</artifactId>
  <scope>compile</scope>
</dependency>
<dependency>
  <groupId>junit</groupId>
  <artifactId>junit</artifactId>
  <scope>compile</scope>
</dependency>
 </dependencies>
</project>

Can anyone help me out?

Jigar
  • 300
  • 4
  • 13
  • Please post your pom.xml, moreover as the error says, the dependency that you are looking for is not there in specified url location. – ajay.patel Nov 08 '14 at 16:59
  • I have pasted pom.xml. Please let me know what is the problem – Jigar Nov 08 '14 at 17:33
  • Duplicate problem, see:[http://stackoverflow.com/questions/9932923/why-cant-maven-find-an-osgi-bundle-dependency?lq=1](http://stackoverflow.com/questions/9932923/why-cant-maven-find-an-osgi-bundle-dependency?lq=1) This problem is also known as a bug: [https://issues.apache.org/jira/browse/HADOOP-12839](https://issues.apache.org/jira/browse/HADOOP-12839) – vtslab Nov 02 '16 at 08:46

3 Answers3

0

This is related to the update policy that Maven uses to update the dependencies in your local repository. One solution is to try to manually delete the directory containing the dependency org.apache.directory.jdbm:apacheds-jdbm1:bundle:2.0.0-M2 in your local repo, and re-launch the build.

You can also force updating all dependencies by passing -U to Maven, e.g.:

mvn clean install -U

Community
  • 1
  • 1
M A
  • 71,713
  • 13
  • 134
  • 174
0

If this dependency is private, you need to add related information to you maven setting file in ~/.m2/settings.xml

0

From your statement, you say you could not resolve dependencies for project org.apache.hadoop:hadoop-minikdc:jar:3.0.0-SNAPSHOT. Ok, I think it's your wrong proxy of maven, and your cannot download this jar. Please check your proxy and again it. Please go to the dir. of ~/.m2/settings.xml to revice your setting.

like this

<proxy>
  <id>optional</id>
  <active>true</active>
  <protocol>http</protocol>
  <username></username>
  <password></password>
  <host>child-prc.intel.com</host>
  <port>913</port>
  <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
</proxy>

hash-X
  • 99
  • 1
  • 2
  • 9