Reputation: 73
I don't understand following error I am getting while executing : mvn install
I have the javax.transaction:jta:jar:1.0.1B
artifact in my m2 repository and I did make sure that the maven is looking at the right repository (By running mvn -X
)
Has anybody ever experienced and resolved this kind of error.
Failure to find javax.transaction:jta:jar:1.0.1B 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
Upvotes: 2
Views: 5758
Reputation: 41
Go to the folder contains javax.transaction:jta:jar:1.0.1B
in your .m2 and then delete this file _remote.repositories
Upvotes: 0
Reputation: 41
I had this same problem. The jar was installed in my local .m2 directory.
I decided to try running with sudo on the mvn install and this made the difference (I am on a mac if that matters):
sudo mvn install:install-file -DgroupId=com.nav.abc - DartifactId=xy.abc -Dversion=1.0.0 -Dpackaging=jar - Dfile=abcAdapter/xy.abc.jar
And now it seems to be working! I don't see any difference in the access authorities on the directories so I'm not sure how this made any difference... but it does work
Upvotes: 1
Reputation: 604
Since you say the jar is in your local .m2, it is strange that Maven still goes to the central repo to find it, ideally it should not. I am thinking it might be related to a different dependency, for example like in this thread. Could you check if yours if the same scenario?
The other thing you could do is look for a repository where this version of JTA exists and add that repository to your settings.xml or pom.xml, however you have that configured. One another option is you could try with a different version of JTA jar and see if you run in to the same issue.
Upvotes: 0