IDEA maven 项目找不到jar包
idea maven项目,明明包存在,且正确,但是却现实找不到
The POM for xxx:jar:1.0 is missing, no dependency information available
执行maven 命令
用maven工具运行一下下面的命令就行了,注意修改路径及包名
mvn install:install-file -Dfile=xxx -DgroupId=xxx -DartifactId=xxx -Dversion=xxx -Dpackaging=jar
说明
-Dfile:包的本地真实地址
-DgroupId:pom.xml中groupId
-DartifactId:pom.xml中artifactId
-Dversion:pom.xml中0.0.1-SNAPSHOT
-Dpackaging:jar或war,包的后缀名
-Dclassifier:包的别名
栗子
mvn install:install-file -Dfile=F:\Software\Maven\mavenrepo\QRCode\QRCode\1.0\QRCode-1.0.0.jar -DgroupId=QRCode -DartifactId=QRCode -Dversion=1.0 -Dpackaging=jar