0

Boss just came with an external Java project with a build.gradle file. When trying to build it with gradle, after downloading dozens of dependencies, it exited with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':compileClasspath'.
> Could not find jta.jar (javax.transaction:jta:1.0.1B).
  Searched in the following locations:
       https://repo1.maven.org/maven2/javax/transaction/jta/1.0.1B/jta-1.0.1B.jar

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

It is true that this file doesn't exist in the repository, but there is a pom file there.

Shouldn't gradle download the pom file? If not, how can I "force" it to do so?

Thanks!

Silas
  • 392
  • 1
  • 4
  • 15

2 Answers2

1

According to this answer and this other one, you should use org.hibernate:hibernate:3.3.2.ga, it has a recommended dependency for JTA 1.1, it shouls fix your issue.

ToYonos
  • 16,469
  • 2
  • 54
  • 70
0

It is a very old project (it was never updated) that was built with Gradle 2.4 and Sun JDK 1.6. My environment was configured to use OpenJDK 1.8. After downgrading it to Sun JDK 1.6 I could build the project.

(Upgrading Gradle doesn't make any difference).

Silas
  • 392
  • 1
  • 4
  • 15