我正在使用maven2来构建java项目。当我尝试使用mvn install构建时,我得到了编译错误,说一些包xya.abc.aaa不存在。这个包可以在本地磁盘上我自己的jar中找到。这个jar(比方说test.jar)是我创建的。
我怎样才能告诉maven使用这个本地jar来获取它在本地磁盘上查找的包呢?
发布于 2011-11-18 21:59:00
你需要使用install the dependencies to your local repository。
mvn install:install-file
-Dfile=<path-to-file>
-DgroupId=<group-id>
-DartifactId=<artifact-id>
-Dversion=<version>
-Dpackaging=<packaging>
-DgeneratePom=true
Where: <path-to-file> the path to the file to load
<group-id> the group that the file should be registered under
<artifact-id> the artifact name for the file
<version> the version of the file
<packaging> the packaging of the file e.g. jarhttps://stackoverflow.com/questions/8183561
复制相似问题