0

Can I use overlays in profile?

I have to build and package my web app such as it has to copy the resources from another project only for specified profile. So How can I achieve this, please suggest some solution.

milind_db
  • 1,274
  • 5
  • 34
  • 56
  • Linked to question: http://stackoverflow.com/questions/24385245/how-to-use-maven-profile-and-overlays-to-build-and-package-with-specified-projec/24401254#24401254 – milind_db Jun 25 '14 at 06:03

3 Answers3

1

You don't say what kind of project you're copying from.

If it's a WAR project, then depending on it will cause maven to overlay the resources automatically. So, all you need to do is have a dependencies section in your profile, and within that add a dependency on your other WAR, and maven will overlay it for you.

If it's a jar project, you can zip up your resources using the assembly plugin, and unzip into your war using the dependencies:unpack plugin. I probably can't do better than the accepted answers on these two questions:

Update: as an alternative to unpacking the zip, you can use the overlays part of the WAR plugin, see the last example on http://maven.apache.org/plugins/maven-war-plugin/overlays.html

Community
  • 1
  • 1
stripybadger
  • 4,539
  • 3
  • 19
  • 26
0

i don't think you can run it on com.sun.net.httpserver.HttpServer. because JAX-RS is a specification which have been implemented by various vendors like, Apche,jersey,jboss,spring etc. They provide there own server to run the web services which fulfill the desired criteria. Although restful web services runs over http but as per me they can't run on com.sun.net.httpserver.HttpServer. Hope it will help you

0

We can not use Overlays in Profile, but we can achieve this as shown here Use Overlay with Profile

Community
  • 1
  • 1
milind_db
  • 1,274
  • 5
  • 34
  • 56