@Dennis Roberts: You were absolutely right: My test class was located in src/main/java. Also the value of the “scope” element in the POM for JUnit was “test”, although that is how it is supposed to be. The problem was that I had been sloppy when creating the test class in Eclipse, resulting in it being created in src/main/java insted of src/test/java. This became easier to see in Eclipse’s Project Explorer view after running “mvn eclipse:eclipse”, but your comment was what made me see it first. Thanks.
Related Posts:
- Getting “Skipping JaCoCo execution due to missing execution data file” upon executing JaCoCo
- Maven Could not resolve dependencies, artifacts could not be resolved
- Maven skip tests
- How is “mvn clean install” different from “mvn install”?
- Maven Install on Mac OS X
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing in Intellij
- maven error: package org.junit does not exist
- How to force maven update?
- How to use VisibleForTesting for pure JUnit tests
- Connecting to Git team provider failed
- Deploying Maven project throws java.util.zip.ZipException: invalid LOC header (bad signature)
- how to run the command mvn eclipse:eclipse
- A fatal error has been detected by the Java Runtime Environment. EXCEPTION_ACCESS_VIOLATION
- mvn command is not recognized as an internal or external command
- java.lang.VerifyError: Inconsistent stackmap frames at branch target 421
- Eclipse/Maven error: “No compiler is provided in this environment”
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- The superclass “javax.servlet.http.HttpServlet” was not found on the Java Build Path
- ‘mvn’ is not recognized as an internal or external command, operable program or batch file
- ‘react-scripts’ is not recognized as an internal or external command
- SLF4J: Class path contains multiple SLF4J bindings
- ‘mvn’ is not recognized as an internal or external command, operable program or batch file
- Lombok and Maven
- mvn command not found in OSX Mavrerick
- java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
- Java Project: Failed to load ApplicationContext
- Why Maven project is tied to J2SE-1.5 by default?
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- JUnit 5: How to assert an exception is thrown?
- Unable to create requested service [org.hibernate .engine.jdbc.env.spi.JdbcEnvironment]-MySQL
- org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- web.xml is missing and
is set to true - org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when ‘hibernate.dialect’ not set
- mvn command not found in OSX Mavrerick
- unused import statement for used ones in IntelliJ IDEA
- Maven: Non-resolvable parent POM
- Failed to load ApplicationContext from Unit Test: FileNotFound
- java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet
- Maven: Failed to read artifact descriptor
- org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms
- ERROR: Error cloning remote repo ‘origin’
- Failed to load ApplicationContext from Unit Test: FileNotFound
- What exactly is a Maven Snapshot and why do we need it?
- Cannot change version of project facet Dynamic Web Module to 3.0?
- Spring Maven clean error – The requested profile “pom.xml” could not be activated because it does not exist
- web.xml is missing and
is set to true – web.xml is there and can’t edit deployment assembly - Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher
- How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds
- Error: JAVA_HOME is not defined correctly executing maven
- Eclipse No tests found using JUnit 5 caused by NoClassDefFoundError for LauncherFactory
- JAVA_HOME should point to a JDK not a JRE
- Error “The goal you specified requires a project to execute but there is no POM in this directory” after executing maven command
- No compiler is provided in this environment. Perhaps you are running on a JRE rather than a JDK?
- MOCKITO: What is it and how is it different from Junit
- web.xml is missing and
is set to true - Warning: The method assertEquals from the type Assert is deprecated
- “webxml attribute is required” error in Maven
- How are “mvn clean package” and “mvn clean install” different?
- How do I test a class that has private methods, fields or inner classes?
- How to resolve Unable to load authentication plugin ‘caching_sha2_password’ issue
- “The import org.springframework cannot be resolved.”
- How to verify a method is called two times with mockito verify()
- What is the proper annotation since @SpringApplicationConfiguration, @WebIntegration, is deprecated in Spring Boot Framework?
- “Source folder is not a Java project” error in eclipse
- ‘No JUnit tests found’ in Eclipse
- Configure active profile in SpringBoot via Maven
- Maven build Compilation error : Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project Maven
- Maven: Command to update repository after adding dependency to POM
- Maven dependency update on commandline
- Could not transfer artifact org.apache.maven.plugins:maven-surefire-plugin:pom:2.7.1 from/to central (http://repo1.maven.org/maven2)
- How do I enable index downloads in Eclipse for Maven dependency search?