Reputation: 11
The Dependency:
<dependency>
<groupId>org.apache.ibatis</groupId>
<artifactId>ibatis-common</artifactId>
<version>2.0</version>
<scope>main</scope>
</dependency>
and I am getting the following error. It says: Unable to find resource 'org.apache.ibatis:ibatis-common:jar:2.0' in repository central (http://repo1.maven.org/maven2)
So I tried to install it using the command but still I am getting the following error.
Can any body help me out?
1) org.apache.ibatis:ibatis-common:jar:2.0
Try downloading the file manually from the project website.
Then, install it using the command:
mvn install:install-file -DgroupId=org.apache.ibatis -DartifactId=ibatis-common -Dversion=2.0 -Dpackaging=jar -Dfile=/path/to/file
Alternatively, if you host your own repository you can deploy the file there:
mvn deploy:deploy-file -DgroupId=org.apache.ibatis -DartifactId=ibatis-common -Dversion=2.0 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
Path to dependency:
1) sonatype:Struts2OfficeExpenses:war:1.0-SNAPSHOT
2) org.apache.ibatis:ibatis-common:jar:2.0
----------
1 required artifact is missing.
for artifact:
sonatype:Struts2OfficeExpenses:war:1.0-SNAPSHOT
from the specified remote repositories:
central (http://repo1.maven.org/maven2)
Upvotes: 0
Views: 1641
Reputation: 30678
This happens because of the dependency you have specified is not found by maven.
You can specify the repository to get the jars.
<dependency>
<groupId>com.ibatis</groupId>
<artifactId>ibatis2-common</artifactId>
<version>2.1.7.597</version>
</dependency>
<repositories>
<repository>
<id>appfuse-releases</id>
<name>AppFuse Releases</name>
<url>https://oss.sonatype.org/content/repositories/appfuse-releases</url>
</repository>
</repositories>
Upvotes: 1