문제

this is similar to this question but with a twist.

I have a jar in a remote maven repository. This jar is actually a applet that gets run in the web browser. So it needs to get copied into webapp/resources/ directory.

I'm trying to use the maven-war-plugin to copy it and I'm so close but I can't seem to get the syntax quite right since the jar is just in the local m2 directory and not really inside the build directory at all (although I believe it is in the resulting war.)

도움이 되었습니까?

해결책

The dependency plugin can copy artifacts by maven coordinate from a repository (local or remote) to arbitrary directories. Just add an execution of it somewhere before your war is built to copy the jar to an appropriate place.

다른 팁

Try the copy task of the maven resources plugin. This will let you call out your jar just like you do a dependency, but it will copy it wherever you like so that it can be included in your war.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top