Java Maven依赖错误

Java Maven依赖错误,java,eclipse,maven-3,Java,Eclipse,Maven 3,可能重复: 我正在使用maven 3和eclispe juno 在创建maven项目之后,我使用了eclipse插件 生成eclipse文件并将项目导入eclipse 我已经在maven项目中添加了一个我创建的jar jar文件安装到项目本地存储库中。 这是一个名为repo的文件,位于项目基目录中 install:install file命令用于将jar添加到repo文件中, 然后将jar依赖项添加到项目的Pom文件中 在EclipseIDE中,我可以将jar文件作为 任何其他图书馆进口 但是

可能重复:

我正在使用maven 3和eclispe juno

在创建maven项目之后,我使用了eclipse插件 生成eclipse文件并将项目导入eclipse

我已经在maven项目中添加了一个我创建的jar

jar文件安装到项目本地存储库中。 这是一个名为repo的文件,位于项目基目录中

install:install file命令用于将jar添加到repo文件中, 然后将jar依赖项添加到项目的Pom文件中

在EclipseIDE中,我可以将jar文件作为 任何其他图书馆进口

但是,当我运行mvn compile命令时, 我得到一个依赖错误,maven说了 找不到jar文件。我提供以下代码

his是POM回购配置

    <repository>
    <id>repo</id>
    <releases>
        <enabled>true</enabled>
        <checksumPolicy>ignore</checksumPolicy>
    </releases>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
    <url>file://${project.basedir}/repo</url>
</repository>
<dependency>
      <groupId>Com.RubineEngine.GesturePoints</groupId>
      <artifactId>Com-RubineEngine-GesturePoints</artifactId>
      <version>1.0-SNAPSHOT</version>
    </dependency> 

有人能帮我吗,因为我要迟到了

有些事情需要尝试/确认:

  • 机器是否可以访问internet。不要只说是的。通过ping远程对象来确认它。Maven不喜欢不能访问存储库
  • 在pom编辑器中,是否显示任何错误消息?是否可以删除依赖项并使用“添加依赖项”对话框添加它
  • 尝试将存储库放在Eclipse工作区之外。理论上,它应该在它所在的地方工作,但拥有一个存储库是一个奇怪的地方,maven不喜欢“奇怪”
  • 转到存储库根目录,确认文件夹名称与依赖项的组id、工件id和版本完全匹配

我必须问一个愚蠢的问题:您以前在工作区中成功构建过任何maven工件吗?在依赖项语句中使用快照版本似乎有些奇怪,但您试图从中获取快照的存储库已禁用快照。我找不到关于如何设置的具体说明,但我打赌这是不正确的。一个可能有用的资源是。
[DEBUG] ======================================================================= 
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for file://C:\U 
sers\FAISAL\Desktop\disaster\com-initialtheta-theta/repo 
Downloading: file://C:\Users\FAISAL\Desktop\disaster\com-initialtheta-theta/repo 
/Com/RubineEngine/GesturePoints/Com-RubineEngine-GesturePoints/1.0-SNAPSHOT/mave 
n-metadata.xml 
[DEBUG] Writing resolution tracking file C:\Users\FAISAL\.m2\repository\Com\Rubi 
neEngine\GesturePoints\Com-RubineEngine-GesturePoints\1.0-SNAPSHOT\resolver-stat 
us.properties 
[DEBUG] Using connector WagonRepositoryConnector with priority 0 for repo 
.typesafe.com/typesafe/releases/ 
Downloading: repo.typesafe.com/typesafe/… 
Points/Com-RubineEngine-GesturePoints/1.0-SNAPSHOT/maven-metadata.xml 
[DEBUG] Writing resolution tracking file C:\Users\FAISAL\.m2\repository\Com\Rubi 
neEngine\GesturePoints\Com-RubineEngine-GesturePoints\1.0-SNAPSHOT\resolver-stat 
us.properties 
[DEBUG] Could not find metadata Com.RubineEngine.GesturePoints:Com-RubineEngine- 
GesturePoints:1.0-SNAPSHOT/maven-metadata.xml in typesafe (repo.typesafe. 
com/typesafe/releases/) 
[DEBUG] Could not find metadata Com.RubineEngine.GesturePoints:Com-RubineEngine- 
GesturePoints:1.0-SNAPSHOT/maven-metadata.xml in lib (file://C:\Users\FAISAL\Des 
ktop\disaster\com-initialtheta-theta/repo) 
[DEBUG] Skipped remote update check for Com.RubineEngine.GesturePoints:Com-Rubin 
eEngine-GesturePoints:1.0-SNAPSHOT/maven-metadata.xml, already updated during th 
is session. 
[DEBUG] Failure to find Com.RubineEngine.GesturePoints:Com-RubineEngine-GestureP 
oints:1.0-SNAPSHOT/maven-metadata.xml in repo.typesafe.com/typesafe/… 
ses/ was cached in the local repository, resolution will not be reattempted unti 
l the update interval of typesafe has elapsed or updates are forced 
[DEBUG] Skipped remote update check for Com.RubineEngine.GesturePoints:Com-Rubin 
eEngine-GesturePoints:1.0-SNAPSHOT/maven-metadata.xml, already updated during th 
is session. 
[DEBUG] Failure to find Com.RubineEngine.GesturePoints:Com-RubineEngine-GestureP 
oints:1.0-SNAPSHOT/maven-metadata.xml in file://C:\Users\FAISAL\Desktop\disaster 
\com-initialtheta-theta/repo was cached in the local repository, resolution will 
not be reattempted until the update interval of lib has elapsed or updates are 
forced