我正在使用maven 3和eclispe juno。
创建maven项目后,我使用了eclipse插件 生成eclipse文件并将项目导入eclipse。
我已经为maven项目添加了一个jar。
将jar文件安装到项目本地存储库中。 这是项目基目录中名为repo的文件。
install:install-file命令用于将jar添加到repo文件中, 然后将jar依赖项添加到项目的Pom文件中。
在eclipse IDE中,我能够将jar文件导入为 任何其他图书馆进口。
但是当我运行mvn compile命令时, 我得到一个依赖性错误,maven说 找不到jar文件。我提供以下代码。
他是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>
使用U和X开关运行编译时,会出现以下错误
[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
任何人都可以帮助我,因为我迟到了
答案 0 :(得分:0)
尝试/确认的一些事情: