How to package XXX-production module?

I use Maven to download the archetype “vaadin-archetype-application-example”. I made changes to the ui and backend modules. In Eclipse, I use the command Run As → Maven install and Run As → Run On Server to build/test my application. It created a WAR file in the target directory of the ui module.

Now I’m done developing/testing and ready to deploy my web application to OpenShift hosting service from Red Hat.

There’s a XXX-production module. What do I do with it? Do I use the WAR file generated above or I have to package the XXX-production module into a WAR file? How can I generate the final WAR file to deploy to the cloud please?

Thanks

Hi,

You can view the instructions in the README.md file created by the archetype you have used. Hope it helps.

Yes. Here is the relevant part from the README.md:

So you building just as you normally do in the parent folder but you inform maven to use the production profile. This will make it not skip that part of the build.

Hi…I ran the “mvn -Pproduction package” command in the parent module. Then I got the WAR file in the XXX-Production → Target directory. But I don’t see the classes that I have in the XXX-backend module.

I don’t see the backend module in the dependencies section of XXX-Production. Is that why it does not include the backend classes in the WAR file?

Thanks

Anyone knows why I don’t have the classes in the backend module and how to fix it please?

Thanks