9 Replies Latest reply on May 3, 2011 12:14 PM by Jim Dwyer

    How to deploy an ESB file using Maven?

    Mike Trzcianowski Newbie

      Is there any standard/easy way of deploying an ESB archive (exploded or not) using Maven?

      I have been searching over the net. I looked at cargo and jboss-maven-plugin but can't get any delpoyment working properly.

      Not sure, but Cargo seems to support only standard WAR, EAR packages.
      Jboss-Maven-Plugin keeps telling me that it cannot find the ESB file (keeps trying to get a "myesbpackage.jboss-esb" instead of "myesbpackage.esb")
      I'm using jboss-packaging-maven-plugin with packaging set to jboss-esb. That part works fine.

      Is anyone else using Maven with jboss-esb? Do you have any examples?

      Thank you!

        • 1. Re: How to deploy an ESB file using Maven?
          Mike Trzcianowski Newbie

          Actually, the problem with jboss-maven-plugin is that it does't support spaces in the file location so it errors out. Any suggestions on how to configure the pom.xml so that it will take spaces in the file path?

          • 2. Re: How to deploy an ESB file using Maven?
            Mike Trzcianowski Newbie

            Ok, I think I got it working using harddeploy. I just wish there was a way to do a "hardUNdeploy"

            • 3. Re: How to deploy an ESB file using Maven?
              Michael Martinsen Newbie

              Did you get this working the way you want? I use the jboss-packaging-maven-plugin from codehaus which works fine.

              /Michael

              • 4. Re: How to deploy an ESB file using Maven?
                Mike Trzcianowski Newbie

                I use jboss-packaging-maven-plugin for packaging the esb and then I use the jboss-maven-plugin:harddeploy for deployment.

                My only problem is that I cannot use jboss-maven-plugin
                deploy and undeploy (jmx deployment) goals because it does not handle the file paths properly. It would need to URL-Encode the path to work properly through JMX but it doesn't.

                There is already a bug filed (http://jira.codehaus.org/browse/MJBOSS-14)

                • 5. Re: How to deploy an ESB file using Maven?
                  Michael Martinsen Newbie

                  Ahh sorry I thought you had a problem with the packaging of the ESB file.
                  I don't use the jboss pluging to do deployment, so I don't know about that...

                  /Michael

                  • 6. Re: How to deploy an ESB file using Maven?
                    Jim Dwyer Novice

                    I am having the same problem as stated in the original post.  I have and .esb file.  When I run hard-deploy a failure occurs claiming that the file should end in jboss-esb.  What is the solution to this error?

                    • 7. Re: How to deploy an ESB file using Maven?
                      Jim Dwyer Novice

                      It appears that the jboss-maven-plugin is using the packaging type as the file extension.  It is not overriding the default value.

                      • 8. Re: How to deploy an ESB file using Maven?
                        Jim Dwyer Novice

                        Why does the following configuration not work? 

                         

                        <plugin>

                                        <groupId>org.codehaus.mojo</groupId>

                                        <artifactId>jboss-maven-plugin</artifactId>

                                        <version>1.5.0</version>

                                        <executions>

                                            <execution>

                                                <phase>pre-integration-test</phase>

                                                <goals>

                                                    <goal>hard-deploy</goal>

                                                </goals>

                                                <configuration>

                                                    <jbossHome>${JBOSS_HOME}</jbossHome>

                                                    <serverName>default</serverName>

                                                    <deploySubDir>deploy</deploySubDir>

                                                    <fileName>${project.build.directory}/${project.build.finalName}.esb</fileName>

                                                </configuration>

                                            </execution>

                                        </executions>

                                    </plugin>

                         

                        Here is the error: 

                         

                        Failed to execute goal org.codehaus.mojo:jboss-maven-plugin:1.5.0:hard-deploy (default-cli) on project ingest-esb: Mojo error occurred: /home/user/workspace/ingest-esb/target/ingest-esb-0.0.1-SNAPSHOT.jboss-esb (No such file or directory) -> [Help 1] 

                         

                        The file extension changed from .esb to .jboss-esb.  Why?

                        • 9. Re: How to deploy an ESB file using Maven?
                          Jim Dwyer Novice

                          OK figured it out.  Had 1.4 and 1.5 configurations mixed up.

                           

                          <plugin>

                                          <groupId>org.codehaus.mojo</groupId>

                                          <artifactId>jboss-maven-plugin</artifactId>

                                          <version>1.5.0</version>

                                              <configuration>

                                                  <fileName>${project.build.directory}/${project.build.finalName}.esb</fileName>

                                                  <jbossHome>${JBOSS_HOME}</jbossHome>

                                                  <serverName>default</serverName>

                                              </configuration>

                                      </plugin>

                           

                          This simplier version works.