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

  • Home
  • SEARCH
  • 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 7577655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:14:38+00:00 2026-05-30T17:14:38+00:00

After upgrading all my Maven plugins version for a project, I encountered the following

  • 0

After upgrading all my Maven plugins version for a project, I encountered the following problem: when I run the basic command mvn test -Dtest=SomeTest, the build finishes with no test executed at all. In fact, I am not able to run any test using -Dtest parameter (of course the test exist, and is run when I simply execute mvn test).

After some searches, it appears that the problem is due to the usage of surefire 2.12 plugin. I’ve tested several versions of Maven (2.2.1 / 3.0.2) and JUnit (4.7.x, 4.8, 4.10, or even 3.8.x), but they have no impact on my issue.

So maybe my project has some specific configurations that may have an impact on that? Anyway, I created a new project, using mvn archetype:generate (using the basic org.apache.maven.archetypes:maven-archetype-quickstart).

I modified only 2 things in the pom.xml: using JUnit 4.10 (but it didn’t change anything, I’ve tried with others versions), and defining the version of surefire:

<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>foo</groupId>
    <artifactId>bar</artifactId>
    <version>1.0-SNAPSHOT</version>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.11</version>
            </plugin>
        </plugins>
    </build>
</project>

I run mvn test -Dtest=AppTest (the default JUnit test created by the archetype):

-------------------------------------------------------  T E S T S
------------------------------------------------------- Running foo.AppTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time
elapsed: 0.031 sec

Results :

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0

[INFO]
------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO]

Now, I modify the pom.xml to use version 2.12 for Surefire and run the command again:

-------------------------------------------------------  T E S T S

Results :

Tests run: 0, Failures: 0, Errors: 0, Skipped: 0

[INFO]
------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
------------------------------------------------------------------------ [INFO] Total time: 0.907s [INFO] Finished at: Fri Mar 02 10:37:12 CET
2012 [INFO] Final Memory: 3M/15M [INFO]
------------------------------------------------------------------------ [ERROR] Failed to execute goal
org.apache.maven.plugins:maven-surefire-plugin:2.12:test
(default-test) on project bar: No tests were executed!  (Set -D
failIfNoTests=false to ignore this error.) -> [Help 1]

The test is not run this time 🙁

As far as I am concerned, I think it’s a regression, but that’s quite surprising. Indeed, a JIRA defect is logged on Surefire 2.12 version, and in this description, they succeed in using -Dtest parameter.

Am I doing something wrong? Or is it a real regression (in this case, I will create the JIRA)?

Thanks.

  • 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-30T17:14:40+00:00Added an answer on May 30, 2026 at 5:14 pm

    It’s a bug in 2.12 version – SUREFIRE-827.

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

Sidebar

Related Questions

I'm getting the following message after upgrading all my jars to Richfaces 4. The
After upgrading to Rails 3.1.0 and following David Rice's instructions , all of my
After upgrading to Windows 7 all seems to work in my Delphi 2007 version
After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no
After upgrading to OS X 10.6, I've had all kinds of peculiar issues relating
After upgrading Xcode to the 4.2, I'm going through and fixing all the new
After upgrading the NHibernate and FluentNHibernate DLLs in a project, I'm now getting a
After upgrading to Rails 3.1 any ActiveRecord call has the following result: ArgumentError: wrong
I am getting an error after upgrading to xcode 4, for all of the
Hey all, I'm having a strange issue today after upgrading to the latest jqueryui.

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.