7 Replies Latest reply on Jan 24, 2013 5:16 AM by Max Rydahl Andersen

    Cannot deploy ear or war using JBT

    Michael Angelo Newbie

      I have tried deploying an ear and war file to OpenShift using JBoss Tools Openshift Plugin to no avail. I was getting the dreaded "Failed to execute goal org.apache.maven.plugins:maven-war-plugin" for the ear deployment until I made the necessary changes. The publish says its successful, but I see nothing on the app homepage and actually I see no code deployed as well.

       

      I created a quick Seam Web project and just tried to deploy to OpenShift. This time, I did get the dreaded maven-war-plugin error.

       

      Has anyone gotten this stuff to work?

       

      Very frustrating!

        • 1. Re: Cannot deploy ear or war using JBT
          Max Rydahl Andersen Master

          Yes, it works for me so I need to get some more information.

           

          A) does the maven build work locally for you ?

           

          B) what is the exact error  ? "failed to execute goal ..." could mean alot of things.

           

          C) Are you using the examples we provide in central or is it your own war/ear project ?

           

          D) Seam Web Project's aren't configured to work outofthebox on openshift so this would not be expected to work.

          • 2. Re: Cannot deploy ear or war using JBT
            Michael Angelo Newbie

            A) The maven build does NOT work for me. Here is the significant part of my console: (I am running a maven install)

             

            [INFO] ------------------------------------------------------------------------

            [INFO] BUILD FAILURE

            [INFO] ------------------------------------------------------------------------

            [INFO] Total time: 3.354s

            [INFO] Finished at: Tue Jan 22 22:02:47 EST 2013

            [INFO] Final Memory: 6M/239M

            [INFO] ------------------------------------------------------------------------

            [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.1.1:war (default-war) on project openshifttest: Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode) -> [Help 1]

            [ERROR]

            [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

            [ERROR] Re-run Maven using the -X switch to enable full debug logging.

            [ERROR]

            [ERROR] For more information about the errors and possible solutions, please read the following articles:

            [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

             

            B) See above

             

            C) This is just a Seam Web project with zero code added. I used the wizard that comes with the latest JBoss Tools

            D) Help!

            • 3. Re: Cannot deploy ear or war using JBT
              Alexey Kazakov Master

              C) This is just a Seam Web project with zero code added. I used the wizard that comes with the latest JBoss Tools

               

              Do you mean File->New->Project->Seam->Seam Web Project?

              • 4. Re: Cannot deploy ear or war using JBT
                Michael Angelo Newbie

                Yes. That is what I'm trying to test. I had no success creating the application as an EAR so I'm trying to just create the Seam Web Project as a WAR and deploy it and I still get the error message above.

                • 5. Re: Cannot deploy ear or war using JBT
                  Alexey Kazakov Master

                  This wizard creates a non-maven project. But the structure of the project expects to be the maven-like by OpenShift tools. web.xml is expected to be placed in src/main/webapp/WEB-INF/web.xml (not in WebContent/WEB-INF/web.xml). Java sources in src/main/java etc.

                  So you have to configure pom.xml (this pom.xml file is added by OpenShift tools and it's used to build/deploy the app onto OpenShift) for your project manually if you want to publish the project created by New Seam Web Project wizard.

                  • 6. Re: Cannot deploy ear or war using JBT
                    Michael Angelo Newbie

                    Well, that certainly makes sense. Maybe I'll try converting to a Maven project and see what happens. I'll post my findings here

                     

                    Thanks for the help everyone!

                    • 7. Re: Cannot deploy ear or war using JBT
                      Max Rydahl Andersen Master

                      Note, if you don't want to use/setup maven project you can deploy any existing war or ear project to openshift by just dragging it to the openshift server.

                       

                      Then it will be deployed as a binary into the /deployments folder.