简体   繁体   中英

Maven cannot find JAR

Recently I tried to develop an interface for my group. My service runs and works well on my local machine, but when trying to use Maven Compile in IDEA, the compilation fails and tells me it cannot find my JAR package. The JAR package I use is JAVE (Java Audio Video Encoder), which was manually added into my CLASSPATH. I know Maven cannot find JAR package without adding dependency to pom, but I can't find the Maven dependency for JAVE, it seems that they only provide a JAR package for users. JAVE HomePage

So in this case, what should I do if I want to successfully compile my code using Maven? I need to deploy my service in the future, so manually adding JAR package to my CLASSPATH instead of adding dependency to pom is definitely not acceptable.

You can install a maven jar locally using:

mvn install:install-file
   -Dfile=<path-to-file>
   -DgroupId=<group-id>
   -DartifactId=<artifact-id>
   -Dversion=<version>
   -Dpackaging=<packaging>
   -DgeneratePom=true

您可以将人工制品安装到本地或远程Maven存储库中,也可以将其用作系统范围的依赖项(请参阅https://stackoverflow.com/a/2177417/9705485http://roufid.com/3 -将本地罐子添加到maven-project /的示例)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM