开发者

Deploying war internals in webapp directory in Maven

I've a base pr开发者_运维百科oject which has a dependency on a custom war to be downloaded from a remote repository.

I'm able to download and run the war, however the custom war has some html & js files which i need to get extracted in my base project's webapp directory.

How do I specify a location for the custom.war to explode at a specified directory?


the custom war has some html & js files which i need to get extracted in my base project's webapp directory.

I'm not sure to understand what location this is.

How do I specify a location for the custom.war to explode at a specified directory?

If you are using overlays, then you can use the targetPath in the overlay element:

  • targetPath - sets the target relative path in the webapp structure, which is only available for war types. By default, the content of the overlay is added in the root structure of the webapp.

But as I said, I'm not sure to understand where you want to extract the mentioned files so I don't know if this will suit your needs. If it doesn't, I think you'll have to use the antrun plugin (in a second step).

Update: According to the comments of JETTY-1027, you should be able to use mvn jetty:run with a webapp project that uses overlays with jetty 6.1.19 (this comment of JETTY-1095 mentions jetty 6.1.20).

If this doesn't work, a workaround is to use mvn jetty:run-war. Another option would be to use the fix of JETTY-1027 (available in the trunk of the jetty-maven-plugin and to be released in version 7.0.2).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜