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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:20:06+00:00 2026-05-30T14:20:06+00:00

i exclude all tests in plugin except my test suite: <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.11</version>

  • 0

i exclude all tests in plugin except my test suite:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.11</version>
    <configuration>
        <!--
        <testFailureIgnore>true</testFailureIgnore>
        <skipTests>true</skipTests>
        -->
        <parallel>both</parallel>
        <threadCount>10</threadCount>
        <forkMode>once</forkMode>
        <configuration>
            <excludes>
                <exclude>**/Test*.java</exclude>
                <exclude>**/*Test.java</exclude>
                <exclude>**/*TestCase.java</exclude>
            </excludes>
            <includes>
                <include>ru.csbi.registry.CategorizedTestsSuite.java</include>
            </includes>
        </configuration>
        <!--
       <configuration>
           <groups>ru.csbi.registry.IntegrationTestsNotRequiringContainerCategory</groups>
           <groups>ru.csbi.registry.UnitTestsCategory</groups>
       </configuration>
        -->
    </configuration>
    <dependencies>
        <dependency>
            <groupId>org.apache.maven.surefire</groupId>
            <artifactId>surefire-junit47</artifactId>
            <version>2.12</version>
        </dependency>
    </dependencies>
</plugin>

but all tests are executed.

Even if i delete my the only include in config it still runs all tests:

<configuration>
    <excludes>
        <exclude>**/Test*.java</exclude>
        <exclude>**/*Test.java</exclude>
        <exclude>**/*TestCase.java</exclude>
    </excludes>
    <!--
   <includes>
       <include>ru.csbi.registry.CategorizedTestsSuite.java</include>
   </includes>
    -->
</configuration>

Here is the logs:

——————————————————- T E S T S
——————————————————- Concurrency config is parallel='both',perCoreThreadCount=true,
threadCount=10, useUnlimitedThreads=false

Running javalangtests.AnnotationTest

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Running ru.csbi.registry.services.JdbcServiceTest

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Running ru.csbi.registry.services.reflection.ClassServiceTest

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Running ru.csbi.registry.services.reflection.FieldServiceTest

Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

Running
ru.csbi.registry.services.reflection.hibernate.relation.RelationServiceTest

Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016
sec

Effective pom:

  <plugin>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.12</version>
    <executions>
      <execution>
        <id>default-test</id>
        <phase>test</phase>
        <goals>
          <goal>test</goal>
        </goals>
        <configuration>
          <configuration>
            <includes>
              <include>ru.csbi.registry.CategorizedTestsSuite.java</include>
            </includes>
          </configuration>
        </configuration>
      </execution>
    </executions>
    <configuration>
      <configuration>
        <includes>
          <include>ru.csbi.registry.CategorizedTestsSuite.java</include>
        </includes>
      </configuration>
    </configuration>
  </plugin>
  • 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-30T14:20:07+00:00Added an answer on May 30, 2026 at 2:20 pm

    You need to remove configuration block from configuration block.

    Like this:

    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.11</version>
        <configuration>
            <!--
            <testFailureIgnore>true</testFailureIgnore>
            <skipTests>true</skipTests>
            -->
            <parallel>both</parallel>
            <threadCount>10</threadCount>
            <forkMode>once</forkMode>
            <excludes>
                <exclude>**/Test*.java</exclude>
                <exclude>**/*Test.java</exclude>
                <exclude>**/*TestCase.java</exclude>
            </excludes>
            <includes>
                <include>ru.csbi.registry.CategorizedTestsSuite.java</include>
            </includes>
        </configuration>
        <dependencies>
            <dependency>
                <groupId>org.apache.maven.surefire</groupId>
                <artifactId>surefire-junit47</artifactId>
                <version>2.12</version>
            </dependency>
        </dependencies>
    </plugin>
    

    Nested configuration element makes no sense. As well as package name in your include (ru.csbi.registry.CategorizedTestsSuite.java).

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

Sidebar

Related Questions

I'm trying to use Maven Failsafe Plugin to run my functional/integration tests, according to
So I have issues running all the tests in my Maven project with Intellij.
Is there a way to exclude all svn externals when doing a recursive update?
When using cfdirectory, how could I exclude all cfm files and list all others
How can I construct a MSBuild ItemGroup to exclude .svn directories and all files
I would like my Maven builds to run most unit tests. But there are
I want to run Junit test suites that contain various test classes. Of all
I'm using M2E for maven integration with eclipse. My unit tests reference property files
When building my WAR file I want to exclude all files that have the
EDIT 1 I do not exclude at all this might be caused by something

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.