Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error while running maven

 
shriram iyer
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

i am getting following error while using mvn compile exec:java command

Failure to find javax.transaction:jta:jar:1.0.1B in http://repo1.maven.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


my pom.xml is as follows




i am using maven version 3.0.3

thanks
 
Peter Johnson
author
Bartender
Posts: 5852
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That error usually means that only some of the information for that artifact appears in your local repository. You can usually overcome that by either removing the artifact's directory from your local repository, or by running mvn with the -U parameter.

Another possibility is that the remote repository does not contain the full artifact information (it might have the pom or other metadata files, but not the jar itself). I looked a Maven Central and for version 1.0.1B, there is no JAR file, only a POM. There is a 1.1 version that does have a JAR. You will have to find out which of your dependencies is pulling in the 1.0.1B version, pass the -X option to mvn to get that information. Once you know that, there are several ways to proceed: switch to a different version of that dependency (usually the best course of action), or configure the dependency to ignore the JTA sub-depenendency.
 
shriram iyer
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Peter Johnson wrote:That error usually means that only some of the information for that artifact appears in your local repository. You can usually overcome that by either removing the artifact's directory from your local repository, or by running mvn with the -U parameter.

Another possibility is that the remote repository does not contain the full artifact information (it might have the pom or other metadata files, but not the jar itself). I looked a Maven Central and for version 1.0.1B, there is no JAR file, only a POM. There is a 1.1 version that does have a JAR. You will have to find out which of your dependencies is pulling in the 1.0.1B version, pass the -X option to mvn to get that information. Once you know that, there are several ways to proceed: switch to a different version of that dependency (usually the best course of action), or configure the dependency to ignore the JTA sub-depenendency.


i included below repository in my pom.xml,now it works fine



cheers
 
Hantsy Bai
Greenhorn
Posts: 4
Hibernate Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
jta 1.0.1B is not available in the public maven repository.

Download it from Oracle website and install it manually.



Or use the java.net repository above.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic