我是這個maven的新手,我在本地存儲庫遇到很大問題。Maven本地存儲庫根本無法用於第三方罐子
我想添加一個第三方罐子,這個交易是,我有這樣的:
<dependency>
<groupId>com.thirdParty</groupId>
<artifactId>thirdParty</artifactId>
<version>4.0.2</version>
<scope>system</scope>
<systemPath>${basedir}/lib/thirdParty_4_0_2/thirdParty.jar</systemPath>
</dependency>
,它的工作真棒,但我得到了一些警告,我想刪除這個警告。
[WARNING] Some problems were encountered while building the effective model for com.thirdParty.connector:thirdParty:mule-module:1.0
[WARNING] 'dependencies.dependency.systemPath' for com.thirdParty:thirdParty:jar should not point at files within the project directory, ${basedir}/lib/thirdParty_java_client_4_0_2/thirdParty.jar will be unresolvable by dependent projects @ line 239, column 20
所以不是這樣做,我聽說,我可以有一個Maven的本地倉庫,並添加我的所有第三方罐那裏,然後在我的XML添加存儲庫,然後就打電話給他們。
所以我有這樣的:
<repository>
<id>local-maven-repository</id>
<name>local-maven-repository</name>
<releases>
<enabled>true</enabled>
<checksumPolicy>ignore</checksumPolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<url>file://${project.basedir}/../../local-maven-repository</url>
</repository>
而且裏面的本地Maven的資源庫中我有這樣的:
local-maven-repository
|-- com
| |-- thirdparty
| |-- sdk
| | -- 4.0.0
| | thirdParty-4.0.0.jar
| | thirdParty-4.0.0.pom
而且我得到這個錯誤。
[ERROR] Failed to execute goal on project thirdParty: Could not resolve dependencies for project com.thirdParty.connector:thirdParty:mule-module:1.0: Failure to find com.thirdParty:thirdParty:jar:4.0.2 in file:///Users/moises.vega/Developer/Telstra/telstra-thunder/connectors/thirdParty/../../local-maven-repository was cached in the local repository, resolution will not be reattempted until the update interval of local-maven-repository has elapsed or updates are forced -> [Help 1]
有人能指點我正確的方向來解決這個問題嗎?
謝謝。