Maven finds artifact but cannot compile

会有一股神秘感。 提交于 2019-12-11 19:25:27

问题


When I run a mvn compile I get a list of errors from the compilation that all say a package is missing that I have as a dependency in my pom.xml.

Pom.xml

`<dependency>
        <groupId>com.fortysevendeg.android</groupId>
        <artifactId>swipelistview</artifactId>
        <version>1.0-SNAPSHOT</version>
        <type>apklib</type>
 </dependency>`

Error
error: package com.fortysevendeg.swipelistview does not exist

I would really appreciate some help on this one. I have been banging my head against this for a while now.


回答1:


Looks like MVN is not able to pull your package ( com.fortysevendeg.swipelistview ) from your repository. To figure out, I would check-out the package from code repository ( i.e SVN, GitHub ) to your work space. Recheck the pom.xml for exact name & do MVN install.

link: Read

Downloading from a Remote Repository

Downloading in Maven is triggered by a project declaring a dependency that is not present in the local repository (or for a SNAPSHOT, when the remote repository contains one that is newer). 

By default, Maven will download from the central repository.

During MVN compile it look first in your local workspace & if doesn't find then it will pull it from repository configured to.



来源:https://stackoverflow.com/questions/18598191/maven-finds-artifact-but-cannot-compile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!