This content has been marked as final.
Show 1 reply
-
1. Re: Transform a web or ejb project to Openshift
adietish Sep 18, 2014 6:16 AM (in response to nat.gross)Hi Nat
Publishing to OpenShift works in a slightly different manner: There are actually 2 options at hand: there's a source and a war based based approach.
- To do the source based approach you'd need a single module maven project (multi-module project dont work correctly out of the box yet. Manual intervention is required). Select "Configure->New/Import OpenShift application" and create a new OpenShift application for your project. Once the wizard is finished you'd have your local project ready to get published to OpenShift. The wizard created a server adapter for your project that you can use to publish your project to OpenShift.
- To do the binary approach you create a new OpenShift application (New->OpenShift->OpenShift Application) which clones and imports the OpenShift application to your workspace. This new project will hold a deployments folder that you can put wars into. The simples way to achieve that is to drag and drop your ejb project to the OpenShift server adapter. You'll notice a war showing up in the deployments folder of the OpenShift project (the one that was imported from OpenShift when you created a the new application) in your workspace. To have this war deployed you need to turn the source build off on OpenShift (OpenShift builds the source upon publishing). To achieve this you pick OpenShift->Configure Markers in the context menu of your server adapter (or context menu of your OpenShift project in the Project Explorer) and check "Skip Maven Build". When you now publish the OpenShift project to OpenShift the war in the deployments folder will get pushed and deployed. It will show up on a url that matches the project (maven configured) name <openshift-url>/<project-name> (watch the OpenShift logs via OpenShift Server Adapter->OpenShift->Tail Files to pick the details.
Cheers
André
- To do the source based approach you'd need a single module maven project (multi-module project dont work correctly out of the box yet. Manual intervention is required). Select "Configure->New/Import OpenShift application" and create a new OpenShift application for your project. Once the wizard is finished you'd have your local project ready to get published to OpenShift. The wizard created a server adapter for your project that you can use to publish your project to OpenShift.