
最近工程中需要用到JNotify Java包,可是在Maven公共仓库中没有找到该jar文件,下面是一个补救的办法。
以jnotify-0.94.jar为例:
需要用到Maven如下命令:
mvn install:install-file
-DgroupId=包名
-DartifactId=项目名
-Dversion=版本号
-Dpackaging=jar
-Dfile=jar文件所在路径
执行以下命令:
mvn install:install-file -Dfile=D:\lib\jnotify-0.94.jar -DgroupId=net.contentobjects -DartifactId=jnotify -Dversion=0.94 -Dpackaging=jar -DgeneratePom=true -DcreateChecksum=true
在pom.xml中添加如下内容:
<dependency>
<groupId>net.contentobjects</groupId>
<artifactId>jnotify</artifactId>
<version>0.94</version>
<<type>jar</type>
</dependency>