--Environment - CentOS Linux release 7.6.1810 (Core) - Apache Maven 3.2.5 -(For Maven) Java1.8.0_242 (For project) Java1.6.0_41
[Problems]Tab error
Missing artifact javax.resource:connector:jar:1.0
Missing artifact javax.transaction:jta:jar:1.0.1B
Even if you grep the pom.xml of the project, there is no such definition ...
$ grep -rn connector --include=pom.xml
$ grep -rn jta --include=pom.xml
$
Open the project's pom.xml in Eclipse> Open the Dependency Hierarchy tab> Search for the jar name in Filter
"I found it!" It was a jar that had a dependency on jotm
...
If you check jotm
in pom.xml and search with Maven Repository: Search / Browse / Explore, it will be fine ...
pom.xml
...abridgement...
<dependency>
<groupId>jotm</groupId>
<artifactId>jotm</artifactId>
<version>2.0.10</version>
<scope>provided</scope>
<exclusions>
...abridgement...
Check the pom of jotm
$ cat ~/.m2/repository/jotm/jotm/2.0.10/jotm-2.0.10.pom
...abridgement...
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.0.1B</version>
</dependency>
...abridgement...
<dependency>
<groupId>javax.resource</groupId>
<artifactId>connector</artifactId>
<version>1.0</version>
</dependency>
Searching with Maven Repository: Search / Browse / Explore
For a while, I thought "Aruyan!", And when I pressed the [jar] link, I got a 404 Not Found
...
Both of the jars in error were in the same state.
If you search the jotm
defined in pom.xml again with Maven Repository: Search / Browse / Explore
It was Note: This artifact was moved to: org.ow2.jotm» jotm
.
I followed the link and decided to use the oldest version of 2.1.1
in ʻorg.ow2.jotm »jotm`.
Pom after change.xml
...abridgement...
<dependency>
<groupId>org.ow2.jotm</groupId>
<artifactId>jotm</artifactId>
<version>2.1.1</version>
<type>pom</type>
<exclusions>
...abridgement...
Reference: How to specify a library that is not in the Maven repository in pom.xml --grep Tips
How to say "The version cannot be changed!" Of jotm
Missing artifact
――I'll do my best to get it from the ~ / .m2 / repository
directory in someone's environment or somewhere on the Internet.WEB-INF / lib /
directory so you don't lose it-DgroupId``-DartifactId
-Dversion
with the pom of jotm
#Go to the jar location
$ cd path/to/WEB-INF/lib/
#Install jar with Maven
$ mvn install:install-file -Dfile=jta-1.0.1B.jar -DgroupId=javax.transaction -DartifactId=jta -Dversion=1.0.1B -Dpackaging=jar
[INFO] Scanning for projects...
...abridgement...
$ mvn install:install-file -Dfile=connector-1.0.jar -DgroupId=javax.resource -DartifactId=connector -Dversion=1.0 -Dpackaging=jar
[INFO] Scanning for projects...
...abridgement...
#Then maven with jar-metadata-local.xml is created
$ find ~/.m2/repository/javax/ -iname *.xml
/home/ponsuke/.m2/repository/javax/resource/connector/maven-metadata-local.xml
/home/ponsuke/.m2/repository/javax/transaction/jta/maven-metadata-local.xml
Recommended Posts