Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8929441
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T08:40:22+00:00 2026-06-15T08:40:22+00:00

I have not been able to get a successful Maven pom.xml configuration to start

  • 0

I have not been able to get a successful Maven pom.xml configuration to start JBoss AS 7, deploy a war artifact, and have it wait until the artifact has been successfully deployed before starting to run integration tests.

I’ve already consulted…

  • http://navinpeiris.com/tag/jboss-as-7/
  • http://cargo.codehaus.org/Maven2+Plugin+Reference+Guide#Maven2PluginReferenceGuide-deployer

I want to use an installed (and pre-configured) JBoss AS 7 container. I do not want to have it up-and-running all the time. I want to start it, run some tests, and shut it down.

My environment:

  • cargo-maven2-plugin 1.3.1
  • jboss-as-7.1.1.Final
  • maven-failsafe-plugin 2.12.4

Here’s what I have for Failsafe config…

        <plugin>
            <artifactId>maven-failsafe-plugin</artifactId>
            <version>${maven-failsafe-plugin.version}</version>
            <configuration>
                <forkMode>once</forkMode>
                <argLine>-javaagent:"${settings.localRepository}/org/springframework/spring-instrument/${spring.framework.version}/spring-instrument-${spring.framework.version}.jar"</argLine>
                <useSystemClassLoader>true</useSystemClassLoader>
            </configuration>
            <executions>
                <execution>
                    <goals>
                        <goal>integration-test</goal>
                        <!-- Uncomment the line below if you want the build to fail when any integration test fails -->
                        <!-- <goal>verify</goal> -->
                    </goals>
                </execution>
            </executions>
        </plugin>

Here’s what I have for Cargo config…

                <plugin>
                    <groupId>org.codehaus.cargo</groupId>
                    <artifactId>cargo-maven2-plugin</artifactId>
                    <version>${cargo-maven2-plugin.version}</version>
                    <configuration>
                        <container>
                            <containerId>jboss71x</containerId>
                            <type>installed</type>
                            <home>${jboss71x.home}</home>
                            <output>${project.build.directory}/jboss71x/container.log</output>
                            <append>false</append>
                            <log>${project.build.directory}/jboss71x/cargo.log</log>
                        </container>
                        <configuration>
                            <type>standalone</type>
                            <home>${project.build.directory}/jboss71x/container</home>
                            <properties>
                                <cargo.jboss.configuration>default</cargo.jboss.configuration>
                                <cargo.rmi.port>1099</cargo.rmi.port>
                                <cargo.jvmargs>${servlet.container.jvmargs}</cargo.jvmargs>
                                <cargo.logging>high</cargo.logging>
                                <cargo.servlet.port>8080</cargo.servlet.port>
                            </properties>
                        </configuration>
                        <deployer>
                            <type>installed</type>
                            <deployables>
                                <deployable>
                                    <groupId>${project.groupId}</groupId>
                                    <artifactId>${project.artifactId}</artifactId>
                                    <type>war</type>
                                    <properties>
                                        <context>/ws</context>
                                    </properties>
                                    <pingURL>http://localhost:8080/ws/services</pingURL>
                                    <pingTimeout>30000</pingTimeout>
                                </deployable>
                            </deployables>
                        </deployer>
                    </configuration>
                    <!-- http://navinpeiris.com/2011/08/22/running-integrationacceptance-tests-in-jboss-7-using-cargo/ -->
                    <executions>
                        <execution>
                            <id>start-container</id>
                            <phase>pre-integration-test</phase>
                            <goals>
                                <goal>start</goal>
                                <goal>deploy</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>stop-container</id>
                            <phase>post-integration-test</phase>
                            <goals>
                                <goal>stop</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

The above config works great when I want to manually startup the container with mvn clean package cargo:run. But it does not achieve the desired effect during CI builds with mvn clean integration-test.

Hints? Suggestions welcomed.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T08:40:22+00:00Added an answer on June 15, 2026 at 8:40 am

    The configuration above does work!

    I had to restart my shell then re-build my project. I do get a deprecation warning on start and stop of the container, but that’s a small worry.

    [INFO] Building war: D:\workspaces\alstom-grid\Projects\SPP\SPP-MUI\spp-im-mui-ws\target\spp-im-mui-ws-1.0-SNAPSHOT.war
    [INFO]
    [INFO] --- cargo-maven2-plugin:1.3.1:start (start-container) @ spp-im-mui-ws ---
    [WARNING] The <deployables> element under the <deployer> element is deprecated. Please use <deployables> under the plugin <configuration> instead.
    [WARNING] The <deployables> element under the <deployer> element is deprecated. Please use <deployables> under the plugin <configuration> instead.
    [WARNING] The <deployables> element under the <deployer> element is deprecated. Please use <deployables> under the plugin <configuration> instead.
    [INFO]
    [INFO] --- maven-failsafe-plugin:2.12.4:integration-test (default) @ spp-im-mui-ws ---
    [INFO] Failsafe report directory: D:\workspaces\alstom-grid\Projects\SPP\SPP-MUI\spp-im-mui-ws\target\failsafe-reports
    
    -------------------------------------------------------
     T E S T S
    -------------------------------------------------------
    Running org.spp.im.mui.jaxws.client.test.VirtualWebServiceClientITCase
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.032 sec
    
    Results :
    
    Tests run: 1, Failures: 0, Errors: 0, Skipped: 1
    
    [INFO]
    [INFO] --- cargo-maven2-plugin:1.3.1:stop (stop-container) @ spp-im-mui-ws ---
    [WARNING] The <deployables> element under the <deployer> element is deprecated. Please use <deployables> under the plugin <configuration> instead.
    [INFO]
    [INFO] --- maven-install-plugin:2.4:install (default-install) @ spp-im-mui-ws ---
    [INFO] Installing D:\workspaces\alstom-grid\Projects\SPP\SPP-MUI\spp-im-mui-ws\target\spp-im-mui-ws-1.0-SNAPSHOT.war to C:\.m2\repository\org\spp\im\mui\spp-im-mui-ws\1.0-SNAPSHOT\spp-im-mui-ws-1.0-SNAPSHOT.war
    
    [INFO] Installing D:\workspaces\alstom-grid\Projects\SPP\SPP-MUI\spp-im-mui-ws\pom.xml to C:\.m2\repository\org\spp\im\mui\spp-im-mui-ws\1.0-SNAPSHOT\spp-im-mui-ws-1.0-SNAPSHOT.pom
    
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD SUCCESS
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 1:16.016s
    [INFO] Finished at: Wed Nov 28 11:51:39 PST 2012
    [INFO] Final Memory: 14M/256M
    [INFO] ------------------------------------------------------------------------
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have not been able to get model binding to work when doing a
I have not been able to find any definitive answers to this question: Can
I have a simple problem that I have not been able to find an
I have another weird problem which I have not been able to solve in
I have searched around and have not been able to find a solution for
So this is something that I have not been able to find any documentation
I have no code to really display here, since I have not been able
Following the standard instruction for using AES algorithm, I have not been able to
I'm working with a Ruby project for school, and have sadly not been able
I have tried a lot but not been able to understand the steps involved

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.