quarkus-cucumber does not find step definitions - java

I'm trying to set up acceptance tests for a Quarkus app, using quarkus-cucumber 0.6.0 (on Quarkus platform version 2.15.2.Final), but it fails to find the step definitions.
My package structure looks as follows:
src
main
api
backend
gui
test
java
com.example.test
AcceptanceTest.java
steps
BlahSteps.java
BlubbSteps.java
specifications
blah.feature
blubb.feature
The AcceptanceTest.java specifies the package for the glue:
package com.example.test
#CucumberOptions(
features = "src/test/specifications",
glue = "com.example.test.steps"
)
public class AcceptanceTest extends CucumberQuarkusTest {
public static void main(String[] args) {
runMain(AcceptanceTest.class, args);
}
}
And the BlahSteps.java in that package contains methods for the steps in blah.feature. (It also ends up correctly in target/test-classes.)
Still, no matter whether I run mvn clean test in the terminal (or ./mvnw quarkus:test after annotating the AcceptanceTest with #QuarkusTest) or run the test in IntelliJ, it runs the blah feature and tells me:
You can implement missing steps with the snippets below:
...
Why is it not finding the glue? Am I missing something?

Configure surefire plugin like below
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<includes>
<include>**/AcceptanceTest*.java</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemPropertyVariables>
</configuration>
</plugin>
below you can see how cucumber triggered.
mintozzy#laptop:~/tmp/quarkus-cucumber-example$ mvn test
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.example:quarkus-cucumber-example:jar:1.0.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for io.quarkus.platform:quarkus-maven-plugin is missing. # line 56, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ----------------< com.example:quarkus-cucumber-example >----------------
[INFO] Building quarkus-cucumber-example 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # quarkus-cucumber-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/mintozzy/tmp/quarkus-cucumber-example/src/main/resources
[INFO]
[INFO] --- quarkus-maven-plugin:3.0.0.Alpha2:generate-code (default) # quarkus-cucumber-example ---
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) # quarkus-cucumber-example ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- quarkus-maven-plugin:3.0.0.Alpha2:generate-code-tests (default) # quarkus-cucumber-example ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # quarkus-cucumber-example ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) # quarkus-cucumber-example ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-surefire-plugin:3.0.0-M7:test (default-test) # quarkus-cucumber-example ---
[INFO] Using auto detected provider org.apache.maven.surefire.junitplatform.JUnitPlatformProvider
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running com.example.test.AcceptanceTestRunner
2023-01-16 20:05:56,769 INFO [io.quarkus] (main) quarkus-cucumber-example 1.0.0-SNAPSHOT on JVM (powered by Quarkus 2.15.2.Final) started in 2.091s. Listening on: http://localhost:8081
2023-01-16 20:05:56,771 INFO [io.quarkus] (main) Profile test activated.
2023-01-16 20:05:56,771 INFO [io.quarkus] (main) Installed features: [cdi, cucumber, resteasy, resteasy-jackson, smallrye-context-propagation, vertx]
Scenario: You're still alright # specifications/everything_is_fine.feature:9
Given you are having coffee # com.example.test.steps.EverythingIsFineSteps.you_are_having_coffee()
And there is a fire around you # com.example.test.steps.EverythingIsFineSteps.there_is_a_fire_around_you()
When you are still alright # com.example.test.steps.EverythingIsFineSteps.you_are_still_alright()
Then everything is fine # com.example.test.steps.EverythingIsFineSteps.everything_is_fine()
Scenario: You start to feel it # specifications/everything_is_fine.feature:14
Given you are having coffee # com.example.test.steps.EverythingIsFineSteps.you_are_having_coffee()
And there is a fire around you # com.example.test.steps.EverythingIsFineSteps.there_is_a_fire_around_you()
When you start to feel it # com.example.test.steps.EverythingIsFineSteps.you_start_to_feel_it()
Then panic # com.example.test.steps.EverythingIsFineSteps.panic()
2 Scenarios (2 passed)
8 Steps (8 passed)
0m0.893s
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 6.11 s - in com.example.test.AcceptanceTestRunner
2023-01-16 20:05:58,732 INFO [io.quarkus] (main) quarkus-cucumber-example stopped in 0.035s
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.311 s
[INFO] Finished at: 2023-01-16T20:05:58Z
[INFO] ------------------------------------------------------------------------
here is the full code.

Related

cygwin introduces spaces in the console output when running a maven build for a java project in windows 10

Check the following output fragment from a cygwin64 terminal on windows 10 64bit while running a maven 3 build using java 1.8:
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\proj\t020-domain\src\ test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # t020-domain ---
m
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source f iles to C:\proj\t020-domain\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) # t020-domain ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-jar-plugin:3.1.2:jar (default-jar) # t020-domain ---
[INFO] Building jar: C:\proj\t020-domain\target\t020-domain-80.1-SNAPSHOT.jar
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.4:prepare-agent-integration (default-prepare-agent-integration) #
36mt020-domain ---
[INFO] argLine set to -javaagent:C:\\Users\\VBO07\\.m2\\repository\\org\\jacoco\\org.jacoco.agent\\0.8.4\\org.jacoco.agent-0
.8.4-runtime.jar=destfile=C:\\proj\\t020-domain\\target\\jacoco-it.exec
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.2:integration-test (default) # t020-domain ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-failsafe-plugin:2.22.2:verify (default) # t020-domain ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.4:report (default- report) # t020-domain ---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.4:report-integration (def ault-report-integration) # t020-domain
---
[INFO] Skipping JaCoCo execution due to missing execution data file.
[INFO]
[INFO] --- jacoco-maven-plugin:0.8.4:check (default-check) # t020-domain ---
[INFO] Skipping JaCoCo execution due to mi ssing execution data file:C:\proj\t020-domain\target\jacoco.exec
You can see it clearly happening on the lines:
[INFO] skip non existing resourceDirectory C:\proj\t020-domain\src\ test\resources
and
[INFO] Compiling 2 source f iles to C:\proj\t020-domain\target\test-classes
and
[INFO] --- jacoco-maven-plugin:0.8.4:report (default- report) # t020-domain ---
and
[INFO] --- jacoco-maven-plugin:0.8.4:report-integration (def ault-report-integration) # t020-domain
and
[INFO] Skipping JaCoCo execution due to mi ssing execution data file:C:\proj\t020-domain\target\jacoco.exec
How can I fix this?
Thank you.
After posting this problem on cygwin's website, Marco Atzeri gave a solution that works for me: set in windows's environment variables:
CYGWIN="disable_pcon"
Then, obviously, restart cygwin.
EDIT:
The above solution has a big bad side-effect: if you need to run interactive commands with cmd /C, then the then above flag will kill the interactions (waiting for input for example will not work anymore). A better solution that does not have this problem was posted by Takashi Yano on cygwin as answer to my question: replace the jar jansi-1.17.1.jar in the lib folder of maven with jansi-2.1.1.jar. You can download the 2.1.1 version from https://mvnrepository.com/artifact/org.fusesource.jansi/jansi/2.1.1

Maven: 'mvn package' taking 30 seconds for one file change?

Apologies if this is an obvious issue but my primary background isn't Java and it seems like I am doing something wrong. When I make changes to my source code I run mvn package to update this and produce a .jar.
Currently this command takes an average of 25 seconds each time, the device compiling it has 8 cores with 16 GB of RAM, so I can't see it being the performance of the machine.
What can I change to speed up my build times?
I've tried using multiple threads with mvn package, it doesn't seem to make any difference.
Here is the output log
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.eu.habbo:Habbo:jar:2.4.0
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.google.code.gson:gson:jar -> duplicate declaration of version 2.8.6 # line 173, column 21
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] -------------------------< com.eu.habbo:Habbo >-------------------------
[INFO] Building Habbo 2.4.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # Habbo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) # Habbo ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1799 source files to C:\Users\ash\Documents\roleplay-emulator\target\classes
[WARNING] /C:/Users/ash/Documents/roleplay-emulator/src/main/java/com/eu/habbo/Emulator.java:[22,52] com.sun.org.apache.xpath.internal.operations.Bool is internal proprietary API and may be removed in a future release
[INFO] /C:/Users/ash/Documents/roleplay-emulator/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java: Some input files use or override a deprecated API.
[INFO] /C:/Users/ash/Documents/roleplay-emulator/src/main/java/com/eu/habbo/habbohotel/rooms/Room.java: Recompile with -Xlint:deprecation for details.
[INFO] /C:/Users/ash/Documents/roleplay-emulator/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java: Some input files use unchecked or unsafe operations.
[INFO] /C:/Users/ash/Documents/roleplay-emulator/src/main/java/com/eu/habbo/networking/rconserver/RCONServer.java: Recompile with -Xlint:unchecked for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # Habbo ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\ash\Documents\roleplay-emulator\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) # Habbo ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # Habbo ---
[INFO] No tests to run.
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) # Habbo ---
[INFO] Building jar: C:\Users\ash\Documents\roleplay-emulator\target\Habbo-2.4.0.jar
[INFO]
[INFO] --- maven-assembly-plugin:3.3.0:single (make-assembly) # Habbo ---
[INFO] Building jar: C:\Users\ash\Documents\roleplay-emulator\target\Habbo-2.4.0-jar-with-dependencies.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 29.837 s
[INFO] Finished at: 2020-10-26T06:15:39Z
[INFO] ------------------------------------------------------------------------
C:\Users\ash\Documents\roleplay-emulator>
The bottleneck seems to be in these lines here,
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1799 source files to C:\Users\ash\Documents\roleplay-emulator\target\classes
This is a normal amount of time.
I does not bother me a lot because why I work, Eclipse compiles the files in the background and I can see compile errors immediately. Also running JUnit tests through Eclipse works fine.
I only run Maven when I need the complete artifact.

How to debug springboot maven application in intellij

I want to start spring-boot maven application in debug mode in intellij Idea, but when I make breakpoints the application doesn't suspend and goes further. I've read a lot of topics but I still don't understand how to do it. Could you help me decide the best course of action.
Edit: I use spring-boot-maven-plugin and Maven Run/Debug configuration with spring-boot:run in command line.
Edit: So when I added Jvm Arguments to pom.xml I recieved such log:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building shop 0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) > test-compile # shop >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # shop ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # shop ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # shop ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\Валера\IdeaProjects\shop\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # shop ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) < test-compile # shop <<<
[INFO]
[INFO] --- spring-boot-maven-plugin:1.5.8.RELEASE:run (default-cli) # shop ---
[INFO] Attaching agents: []
Listening for transport dt_socket at address: 5005
But when requesting localhost:5005/myPage I recieve Error 101 (net: : ERR_CONNECTION_RESET). Seems like some maven arguments did not specify.
Here my maven plagin in pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<jvmArguments>
-Xdebug - Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</jvmArguments>
</configuration>
</plugin>
</plugins>
</build>
In your Run/Debug Configurations enter the following into your command line:
spring-boot:run -Dspring.profiles.active=local,<mine> -Dfork=false -f pom.xml
My Maven spring-boot:run configuration debugs just fine with the -D fork=false added.
You may use below command in the CLI:
export MAVEN_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,address=5005,server=y,suspend=n
Below is my project settings:
enter image description here

openshift eclipse publish stuck

I tried to publish my java /spring boot app to openshift cloud platform via eclipse openshift plugin and it stucks at 'Preparing build for deployment'. For to be sure I waited for all day but there were no changes.
restarting the app and cleaning it did not worked
Is there any way to solve this, or any other way to deploy my spring boot app to openshift by using ssh connection etc...
here is console output:
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # site ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1406 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # site ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 13 source files to /var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/target/classes
[WARNING] /var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/src/main/java/org/site/models/AnasayfaDuzen.java: /var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/src/main/java/org/site/models/AnasayfaDuzen.java uses or overrides a deprecated API.
[WARNING] /var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/src/main/java/org/site/models/AnasayfaDuzen.java: Recompile with -Xlint:deprecation for details.
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # site ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # site ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to /var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/target/test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.18.1:test (default-test) # site ---
[INFO] Tests are skipped.
[INFO]
[INFO] --- maven-war-plugin:2.4:war (default-war) # site ---
[INFO] Packaging webapp
[INFO] Assembling webapp [site] in [/var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/target/site]
[INFO] Processing war project
[INFO] Webapp assembled in [10915 msecs]
[INFO] Building war: /var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/webapps/ROOT.war
[INFO]
[INFO] --- spring-boot-maven-plugin:1.4.1.RELEASE:repackage (default) # site ---
[INFO] Replacing main artifact webapps/ROOT.war to /var/lib/openshift/581b33a789f5cf45fd000026/app-root/runtime/repo/target/site.war
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 44.136s
[INFO] Finished at: Thu Dec 15 01:22:27 EST 2016
[INFO] Final Memory: 25M/170M
[INFO] ------------------------------------------------------------------------
Preparing build for deployment
thanks for any help
Have you tried checking your log files for further information about the problem that you are having?
You can check your log files by using the rhc tail command, or by sshing into your application and looking in the ~/app-root/logs directory.
You can learn more about checking your log files in our Developer Portal

Why maven-surefire-plugin skip tests with log message "because it has already been run for this configuration"?

I can't understand why maven-surefire-plugin doesn't run jUnit4 test. My pom is (can't add it here because "it looks post is mostly code"): http://pastebin.com/Jj3iJZpY
When I execute mvn clean test cmd window shows:
C:\Users\maya\git\services>mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building services 1.0.18
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # services ---
[INFO] Deleting C:\Users\maya\git\services\target
[INFO]
[INFO] --- maven-mule-plugin:1.9:attach-test-resources (default-attach-test-resources) # services ---
[INFO] attaching test resource C:\Users\maya\git\services\src\main\app
[INFO]
[INFO] --- build-helper-maven-plugin:1.7:add-resource (add-resource) # services ---
[INFO]
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) # services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO] Copying 3 resources
[INFO] Copying 0 resource
[INFO]
[INFO] --- maven-mule-plugin:1.9:filter-resources (default-filter-resources) # services ---
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:compile (default-compile) # services ---
[INFO] Compiling 60 source files to C:\Users\maya\git\services\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) # services ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) # services ---
[INFO] Compiling 1 source file to C:\Users\maya\git\services\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default-test) # services ---
[INFO]
[INFO] --- maven-surefire-plugin:2.19:test (default) # services ---
[INFO] Skipping execution of surefire because it has already been run for this configuration
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.554 s
[INFO] Finished at: 2015-12-11T15:48:05+03:00
[INFO] Final Memory: 48M/312M
[INFO] ------------------------------------------------------------------------
Test class is:
package com.comp.utils.UtilsTest;
import static org.junit.Assert.assertTrue;
import org.apache.log4j.Logger;
import org.junit.Test;
public class UtilsTest {
private static final Logger LOG = Logger.getLogger(UtilsTest.class.getName());
#Test
public void testHasPersonSameProd() {
boolean hasSameProduct = false;
assertTrue("Should be True", hasSameProduct);
}
}
Why maven-surefire-plugin:2.19 runs twice and doesn't want to run my test class? How to run test in my case? Thank you.
Given the pom you linked (which should be included into the question actually, as the link may be broken in the future):
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.19</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>UtilTest.java</include>
</includes>
</configuration>
</plugin>
The Maven Surefire Plugin runs twice because you configured an additional execution of the plugin, without providing an id element and as such by default it is called default (maven-surefire-plugin:2.19:test (default)). This execution runs after the out-of-the-box Maven configuration for Surefire (maven-surefire-plugin:2.19:test (default-test)). So, as a consequence, you have two executions (default and default-test). Removing the executions section on the Surefire plugin configuration you would only have one execution (the default-test).
You also have a typo in the Surefire configuration, the <include>UtilTest.java</include> configuration points to the UtilTest.java class, while in your question it is named UtilsTest (note the additional 's').
If the test class is under src/test/java folder, then you don't need to configure its inclusion, since it also already follow the default convention of Surefire, "**/*Test.java".
The message you are having (Skipping execution of surefire because it has already been run for this configuration) is because your configuration element for the Surefire plugin is outside any executions element, which means is applied to all plugin executions, even the default one (default-test).
So you could probably remove the whole Surefire plugin section from your pom and the issue should be fixed.

Categories

Resources