1 2 3 Previous Next 32 Replies Latest reply on Dec 4, 2008 8:18 AM by olivierb Go to original post
      • 15. Re: Maven ESB plugin
        tobysaville

        Hello,

        has this plugin moved recently? should it not be in the following location:

        http://snapshots.jboss.org/maven2/org/jboss/maven/plugins/maven-jboss-esb-plugin/1.0-SNAPSHOT/

        cheers, toby

        • 16. Re: Maven ESB plugin
          kconner

          Hiya Toby.

          That is where I would expect it to be located but I am getting a '301 Moved Permanently' response from the subversion repository. I'll check up on this and get back to you.

          • 17. Re: Maven ESB plugin
            kconner

            Hiya Toby.

            It turns out that snapshots are 'expired' from our repository after a period and this is the reason why the plugin has disappeared.

            I have an outstanding update for the plugin so I will check that in over the weekend and push a full release out.

            Apologies for the disruption.

            Kev

            • 18. Re: Maven ESB plugin

              Hello

              I've applied the patch on the jboss packaging Mojo and deployed a new Snapshot (jboss-packaging-maven-plugin-2.0-20080130.110241-9)

              Nico.

              • 19. Re: Maven ESB plugin
                mkol

                Hello,

                I work with Jboss ESB 4.2.1.GA and Maven 2.0.8.
                I'm trying to package an esb archive with maven build wich will be deployed on a Jboss Application Server 4.0.5.

                I did these following steps, can you tell me if it's good :

                1) I create a simple project :

                mvn archetype:create -DgroupId=fr.monGroupId -DartifactId=monesb -Dpackagena
                me=fr.monGroupId

                2) Then, I modified the pom.xml using the jboss-packaging-maven-plugin of org.codehaus.mojo. I tried to use your maven esb plugin but I failed (if you can explain how to modify my pom.xml to use your plugin, it will help me). (you can read the source of the pom.xml at the end of my message)

                3) I do : mvn install. I've got an error because the jboss-esb.xml is missing.

                4) I put a jboss-esb.xml in monesb\target\monesb-1.0-SNAPSHOT\META-INF

                5) I do : mvn install.
                I obtained the file monesb-1.0-SNAPSHOT.esb which does nothing for the moment.

                Do you agree with my steps?
                Now, I want to create a real esb archive which works. To do this, I need some jar which are in jbossesb.sar\lib like jbossesb-rosetta.jar etc.
                But I don't find them in a maven repository. How can I get them during maven build?

                The parent pom.xml :
                <?xml version="1.0" encoding="UTF-8"?>
                <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
                4.0.0
                all-projects
                all-projects
                pom
                1.0-SNAPSHOT
                All Projects
                http://maven.apache.org


                monesb



                Codehaus Snapshots
                http://snapshots.repository.codehaus.org/

                true


                false





                The pom.xml of my esb project :
                <?xml version="1.0"?>


                all-projects
                all-projects
                1.0-SNAPSHOT


                4.0.0
                fr.monGroupId
                monesb
                monesb
                1.0-SNAPSHOT
                jboss-esb
                http://maven.apache.org



                junit
                junit
                3.8.1
                test







                org.codehaus.mojo
                jboss-packaging-maven-plugin
                2.0-SNAPSHOT

                true






                Codehaus Snapshots
                http://snapshots.repository.codehaus.org/

                true


                false




                • 20. Re: Maven ESB plugin
                  mkol

                  Sorry, this is the parent pom.xml :

                  <?xml version="1.0" encoding="UTF-8"?>
                  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
                   <modelVersion>4.0.0</modelVersion>
                   <groupId>all-projects</groupId>
                   <artifactId>all-projects</artifactId>
                   <packaging>pom</packaging>
                   <version>1.0-SNAPSHOT</version>
                   <name>LTOBOA All Projects</name>
                   <url>http://maven.apache.org</url>
                  
                   <modules>
                   <module>monesb</module>
                   </modules>
                   <repositories>
                   <repository>
                   <id>Codehaus Snapshots</id>
                   <url>http://snapshots.repository.codehaus.org/</url>
                   <snapshots>
                   <enabled>true</enabled>
                   </snapshots>
                   <releases>
                   <enabled>false</enabled>
                   </releases>
                   </repository>
                   </repositories>
                  
                  </project>
                  


                  This is the pom.xml of my esb project :

                  <?xml version="1.0"?>
                  <project>
                   <parent>
                   <artifactId>all-projects</artifactId>
                   <groupId>all-projects</groupId>
                   <version>1.0-SNAPSHOT</version>
                   </parent>
                  
                   <modelVersion>4.0.0</modelVersion>
                   <groupId>fr.monGroupId</groupId>
                   <artifactId>monesb</artifactId>
                   <name>monesb</name>
                   <version>1.0-SNAPSHOT</version>
                   <packaging>jboss-esb</packaging>
                   <url>http://maven.apache.org</url>
                  
                   <dependencies>
                   <dependency>
                   <groupId>junit</groupId>
                   <artifactId>junit</artifactId>
                   <version>3.8.1</version>
                   <scope>test</scope>
                   </dependency>
                   </dependencies>
                  
                   <build>
                   <plugins>
                   <plugin>
                  
                   <groupId>org.codehaus.mojo</groupId>
                   <artifactId>jboss-packaging-maven-plugin</artifactId>
                   <version>2.0-SNAPSHOT</version>
                  
                   <extensions>true</extensions>
                   </plugin>
                   </plugins>
                   </build>
                  
                   <pluginRepositories>
                   <pluginRepository>
                   <id>Codehaus Snapshots</id>
                   <url>http://snapshots.repository.codehaus.org/</url>
                   <snapshots>
                   <enabled>true</enabled>
                   </snapshots>
                   <releases>
                   <enabled>false</enabled>
                   </releases>
                   </pluginRepository>
                  
                   </pluginRepositories>
                  </project>
                  


                  • 21. Re: Maven ESB plugin
                    beve

                    Hi,

                    I had some trouble getting everything working and thought I'd share a solution here.

                    I used "jboss-esb" as the packaging type:

                    <packaging>jboss-esb</packaging>
                    


                    I used the following plugin configuration:
                    <plugin>
                     <groupId>org.codehaus.mojo</groupId>
                     <artifactId>jboss-packaging-maven-plugin</artifactId>
                     <version>2.0-20080130.110241-9</version>
                     <extensions>true</extensions>
                    </plugin>
                    


                    And the following plugin repository:
                    <pluginRepository>
                     <releases>
                     <enabled>false</enabled>
                     </releases>
                     <snapshots />
                     <id>jboss-snapshots</id>
                     <name>JBoss Snapshot Plugin Repository</name>
                     <url>http://snapshots.repository.codehaus.org</url>
                    </pluginRepository>
                    


                    Source directory structure:
                    src/main/resources/META-INF/jboss-esb.xml
                    src/main/resources/META-INF/deployment.xml
                    src/main/resources/jbm-queue-service.xml
                    


                    Regards,

                    Daniel

                    • 22. Re: Maven ESB plugin
                      andre1001

                      Hi beve,

                      I did exactly what you told and it generates a "lib" directory inside my package with jbossesb-rosetta.jar. Is it the recommended approach? If not, is there a Maven parameter in order to generate a package whitout "lib"!?

                      Thanks.

                      • 23. Re: Maven ESB plugin
                        beve

                        Hi,

                        do you have a dependency setup in your pom for jbossesb-rosetta?
                        Could you post it if you do?

                        Thanks,

                        Daniel

                        • 24. Re: Maven ESB plugin
                          kconner

                          Try specifying a scope of 'provided'.

                          • 25. Re: Maven ESB plugin
                            andre1001

                             

                            "beve" wrote:
                            Hi,

                            do you have a dependency setup in your pom for jbossesb-rosetta?
                            Could you post it if you do?

                            Thanks,

                            Daniel


                            Yes, I do. Now, I've changed to "provided" and the lib directory persists (without jbossesb-rosetta).




                            JBoss
                            jbossesb-rosetta
                            4.2.1
                            provided



                            Thanks.

                            • 26. Re: Maven ESB plugin
                              andre1001


                              Following the correct XML:

                              <dependencies>
                               <dependency>
                               <groupId>JBoss</groupId>
                               <artifactId>jbossesb-rosetta</artifactId>
                               <version>4.2.1</version>
                               <scope>provided</scope>
                               </dependency>
                               </dependencies>



                              • 27. Re: Maven ESB plugin
                                andre1001

                                Hi Tom/Beve,

                                I've been trying to automate some ESB tests with Maven.

                                Questions:

                                - There seems to be two Maven plugins which package .esb files (jboss-maven-plugin and jboss-packaging-maven-plugin). Which one is the "official"?

                                - How do you guys automate deploy and undeploy by JMX? I've been trying with the following pom, but without sucess. Harddeploy works, but just copy the package to /deploy directory.

                                pom.xml

                                <plugin>
                                 <groupId>org.codehaus.mojo</groupId>
                                 <artifactId>jboss-maven-plugin</artifactId>
                                 <version>1.3.1</version>
                                 <executions>
                                 <execution>
                                 <id>undeploy</id>
                                 <phase>clean</phase>
                                 <goals>
                                 <goal>undeploy</goal>
                                 </goals>
                                 </execution>
                                 <execution>
                                 <id>harddeploy</id>
                                 <phase>package</phase>
                                 <goals>
                                 <goal>harddeploy</goal>
                                 </goals>
                                 </execution>
                                 </executions>
                                 <configuration>
                                 <jbossHome>${user.home}/java/jboss-4.2.0.GA</jbossHome>
                                 <serverName>default</serverName>
                                 <hostName>localhost</hostName>
                                 <port>8080</port>
                                 <deployUrlPath>
                                 <![CDATA[/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=deploy&argType=java.net.URL&arg0=]]>
                                 </deployUrlPath>
                                 <undeployUrlPath>
                                 <![CDATA[/jmx-console/HtmlAdaptor?action=invokeOpByName&name=jboss.system:service%3DMainDeployer&methodName=undeploy&argType=java.net.URL&arg0=]]>
                                 </undeployUrlPath>
                                 <fileName>${project.build.directory}/${project.build.finalName}.esb</fileName>
                                 </configuration>
                                 </plugin>


                                terminal

                                [asalvati@localhost EntradaNotas]$ mvn -e jboss:undeploy
                                + Error stacktraces are turned on.
                                [INFO] Scanning for projects...
                                [INFO] Searching repository for plugin with prefix: 'jboss'.
                                [INFO] ------------------------------------------------------------------------
                                [INFO] Building EntradaNotas
                                [INFO] task-segment: [jboss:undeploy]
                                [INFO] ------------------------------------------------------------------------
                                [INFO] [jboss:undeploy]
                                [INFO] Undeploying /home/asalvati/java/workspace/EntradaNotas/target/EntradaNotas-1.0-SNAPSHOT.esb from JBoss.
                                [INFO] No server specified for authentication - using defaults
                                [INFO] ------------------------------------------------------------------------
                                [INFO] BUILD SUCCESSFUL
                                [INFO] ------------------------------------------------------------------------
                                [INFO] Total time: < 1 second
                                [INFO] Finished at: Wed Apr 30 17:58:46 GMT-05:00 2008
                                [INFO] Final Memory: 4M/53M
                                [INFO] ------------------------------------------------------------------------
                                [asalvati@localhost EntradaNotas]$
                                
                                


                                Thanks.

                                • 28. Re: Maven ESB plugin
                                  andre1001

                                   

                                  "Andre1001" wrote:


                                  - There seems to be two Maven plugins which package .esb files (jboss-maven-plugin and jboss-packaging-maven-plugin). Which one is the "official"?



                                  Now I understand. Both are useful in some way:

                                  jboss-maven-plugin - to start/stop/deploy applications
                                  jboss-packaging-maven-plugin - to package applications


                                  "Andre1001" wrote:


                                  - How do you guys automate deploy and undeploy by JMX? I've been trying with the following pom, but without sucess. Harddeploy works, but just copy the package to /deploy directory.



                                  This is undeploying/deploying:

                                   <plugin>
                                   <groupId>org.codehaus.mojo</groupId>
                                   <artifactId>jboss-maven-plugin</artifactId>
                                   <version>1.3.1</version>
                                   <executions>
                                   <execution>
                                   <id>jboss-undeploy</id>
                                   <phase>clean</phase>
                                   <goals>
                                   <goal>undeploy</goal>
                                   </goals>
                                   </execution>
                                   <execution>
                                   <id>jboss-deploy</id>
                                   <phase>pre-integration-test</phase>
                                   <goals>
                                   <goal>deploy</goal>
                                   </goals>
                                   </execution>
                                   </executions>
                                   <configuration>
                                   <jbossHome>${user.home}/java/jboss-4.2.0.GA</jbossHome>
                                   <fileName>${project.build.directory}/${project.build.finalName}.esb</fileName>
                                   </configuration>
                                   </plugin>


                                  • 29. Re: Maven ESB plugin
                                    andre1001

                                    Just one more question...

                                    I coundn't manage to find jbossesb-rosetta.jar on http://repository.jboss.com/maven2.

                                    Is it already there?