I've a base project 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?
views:
344answers:
2the 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).
Thanks Pascal,
JETTY-1027 does indeed take resolve my query. However, I'm stuck with Jetty 6.1.26 for now. I wish they did a backport to release 6 too inaddition to fixing it on Jetty 7.