简体   繁体   中英

install 3rd party jar maven with resources

I have a jar file that reads a text file and gives some output. Text file is located where the jar file is located . I needed to load that jar to maven project as a 3rd party jar. So I used

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

And added the dependency accordingly. But when I run the maven project after building I get a File Not Found Exception when maven project try to call that 3rd party jar. Where should I place that text file in order to be referenced by 3rd party jar.

Thank You!!

below your resource tag in maven xml , try add

<includes>
  <include>**/*.txt</include>
</includes>

It may work

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