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 7638201
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T08:06:59+00:00 2026-05-31T08:06:59+00:00

I have two surefire executions in one profile – they need different config. When

  • 0

I have two surefire executions in one profile – they need different config.
When I run -Dtest=…, the matching test is running twice – once for each execution.

How can I make the test run only once?
Or better, how can I make surefire follow includes and excludes?
(One execution would run 0 tests; I’d use -DfailIfNoTest=false.)

    <profile>
        <id>clustering.integration.tests.profile</id>
        <activation>
            <property>
                <name>clustering.integration.tests</name>
                <value>true</value>
            </property>
        </activation>
        <build>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <executions combine.children="append">

                        <!-- Disable default-test execution. -->
                        <execution>
                            <id>default-test</id>
                            <goals><goal>test</goal></goals>
                            <phase>none</phase>
                        </execution>

                        <!-- Single node clustering tests. -->
                        <execution>
                            <id>tests-clustering-single-node.surefire</id>
                            <phase>test</phase>
                            <goals><goal>test</goal></goals>
                            <configuration>
                                <includes>
                                    <include>org/jboss/as/test/clustering/single/**/*TestCase.java</include>
                                </includes>
                            </configuration>
                        </execution>

                        <!-- Multi node clustering tests. -->
                        <execution>
                            <id>tests-clustering-multi-node.surefire</id>
                            <phase>test</phase>
                            <goals><goal>test</goal></goals>
                            <configuration>
                                <includes>
                                    <include>org/jboss/as/test/clustering/cluster/**/*TestCase.java</include>
                                </includes>
                            </configuration>
                        </execution>

                    </executions>
                </plugin>
            </plugins>
        </build>
    </profile>
  • 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-05-31T08:07:01+00:00Added an answer on May 31, 2026 at 8:07 am

    This sounds like a misuse of the maven-surefire-plugin, cause you seemed to have some kind of integration-tests which should be done by the maven-failsafe-plugin instead. By using them you automatically have different configurations for unit- and integration tests. The maven-surefire-plugin is intended to run unit tests where as the maven-failsafe-plugin is intended to run integration tests. Furthermore you configuration looks like you need different kind of integration-tests which means in other word to have several integration-tests modules.

     +-- pom.xml
     +-- module-1
     +-- module-2
     +-- integration-test-single-node
     +-- integration-test-multi-node
     ...
    

    And this will be the best thing to have different configurations for integration test runs.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two convex polygons in 3D. They are both flat on different planes,
I have two databases I need to work with, one oracle on a remote
Have two actionsheet buttons and one modalviewcontroller on mainviewcontroller in application. Now for two
I have two identical tables and need to copy rows from table to another.
I have two classes, and want to include a static instance of one class
I have two threads, one needs to poll a bunch of separate static resources
I have two spreadsheets... when one gets modified in a certain way I want
I have two set of integration tests in one maven project - automatic and
I have two tables inside a database. One stores unique userNames and a unique
I have two different Classes: class X { public int TX1 { get; set;

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.