Dũng Nguyễn Văn
Dũng Nguyễn Văn

Reputation: 1

Unable to find artifact when install maven

When I install maven for a project was clone in bitbucket website and config server tomcat then I has error bellow.

    [INFO] --- maven-dependency-plugin:2.10:copy (default) @ authconfig 
    [INFO] Configured Artifact: ch.smartlink:authconfig:0.0.1-SNAPSHOT:jar
    Downloading: http://central.maven.org/maven2/ [...private link]
    Downloading: http://central.maven.org/maven2/ [...private link]
   [INFO] BUILD FAILURE
   [ERROR] Failed to execute goal org.apache.maven.plugins:maven-
   dependency-plugin:2.10:copy (default) on project authconfig: Unable to 
   find artifact. Could not find artifact 
   ch.smartlink:authconfig:jar:0.0.1-SNAPSHOT in nexus 
   (http://central.maven.org/maven2/)
   [ERROR] Try downloading the file manually from the project website.
   [ERROR] Then, install it using the command:
   [ERROR] mvn install:install-file -DgroupId=ch.smartlink -
   DartifactId=authconfig -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar -
   Dfile=/path/to/file
   [ERROR] Alternatively, if you host your own repository you can deploy 
   the file there:
   [ERROR] mvn deploy:deploy-file -DgroupId=... -DartifactId=authconfig -
   Dversion=0.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/path/to/file -Durl=
   [url] -DrepositoryId=[id]
   [ERROR] ...:authconfig:jar:0.0.1-SNAPSHOT
   [ERROR] from the specified remote repositories:
   [ERROR] nexus (http://central.maven.org/maven2/, releases=true, 
  snapshots=true)

How can fix it?

Upvotes: 0

Views: 6401

Answers (1)

gdegani
gdegani

Reputation: 856

as explained by the error message, maven could not find the artifact in the official maven repository. You need to install it in your local repository ( ~/.m2/repository ) using "mvn install:install-file" or, better, tell maven where to find it adding a repository tag in your pom file.

See: https://maven.apache.org/guides/introduction/introduction-to-repositories.html

Upvotes: 1

Related Questions