3

I was trying to resolve jPOS:2.0.8 version but it is failing because not able to resolve dependency for com.sleepycat.je:je:7.0.6.

<dependency>
<groupId>com.sleepycat</groupId>
<artifactId>je</artifactId>
<version>7.0.6</version>
<scope>compile</scope>
</dependency>

I have check the maven repository and com.sleepycat.je lower version is available there.

http://repo.maven.apache.org/maven2/com/sleepycat/je/ http://repo.maven.apache.org/maven2/org/jpos/jpos/2.0.8/jpos-2.0.8.pom

Edit Even i have added maven { url 'download.oracle.com/maven'; } in build.gradle but still not resolving the dependency.

Edit : I am getting below error

Mayank Gupta
  • 93
  • 1
  • 11

4 Answers4

5

sleepycat version 7.0.6 is not in the main maven repo, you need to add oracle maven repo to your pom:

  <repositories>
    <repository>
      <id>oracleReleases</id>
      <name>Oracle Released Java Packages</name>
      <url>http://download.oracle.com/maven</url>
      <layout>default</layout>
    </repository>
  </repositories>

This goes outside the dependencies tag, directly under de project tag.

Andrés Alcarraz
  • 1,570
  • 1
  • 12
  • 21
  • http://download.oracle.com/maven I have tried to access above link and it is giving "404 : We're sorry, the page you requested was not found." – Mayank Gupta Apr 12 '17 at 08:20
  • Even i have added maven { url 'http://download.oracle.com/maven' } i build.gradle but still not resolving the dependency. – Mayank Gupta Apr 12 '17 at 11:22
  • I fail to reproduce your problem, can you shere your build.gradle or your pom.xm and the output it gives when you run it? – Andrés Alcarraz Apr 12 '17 at 17:14
  • when I run gradle jar in a jpos dependant project gradle is able to download the pom and the jar: :compileJava Download http://download.oracle.com/maven/com/sleepycat/je/7.0.6/je-7.0.6.pom Download http://download.oracle.com/maven/com/sleepycat/je/7.0.6/je-7.0.6.jar :compileJava UP-TO-DATE :processResources NO-SOURCE :classes UP-TO-DATE :jar UP-TO-DATE BUILD SUCCESSFUL – Andrés Alcarraz Apr 12 '17 at 17:21
  • The error 404 when opening the url is because the server doesn't allow access directly to the directory – Andrés Alcarraz Apr 12 '17 at 17:24
  • Build.gradle entry repositories { maven { url "repo.maven.apache.org/maven2"; } maven { url 'jpos.org/maven'; } maven { url 'download.oracle.com/maven'; } } dependencies { compile 'org.jpos:jpos:2.0.8' } – Mayank Gupta May 04 '17 at 09:10
  • Or for Gradle `maven { url 'http://download.oracle.com/maven' } // to resolve com.sleepycat:je dependency` – DaddyMoe Feb 02 '19 at 00:41
5

Add this code in pom.xml

<repositories>
  <repository>
  <id>oracle</id>
  <name>Oracle repo</name>
  <url>http://download.oracle.com/maven</url>
  </repository>
</repositories>
5

Or You could ignore sleepy cat dependency

<dependency>
<groupId>org.jpos</groupId>
<artifactId>jpos</artifactId>
<version>2.1.0</version>
<exclusions>
  <exclusion>
  <groupId>com.sleepycat</groupId>
  <artifactId>je</artifactId>
  </exclusion>
</exclusions>
</dependency>
SandOfTime
  • 692
  • 6
  • 15
-1

Just use jpos 1.9.2. Thats the last stable release eitherway