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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T04:26:05+00:00 2026-06-15T04:26:05+00:00

I have a scala test class but when I attempt to run using the

  • 0

I have a scala test class but when I attempt to run using the Maven goal ‘test’
the tests are not being run. I receive the Maven message “There are no tests to run.” even though the tests are located in the scala test class. Do I need to add extra configuration ?

Here is my package setup :

enter image description here

Here is the output of the Maven “test” goal when run against the pom file :

[INFO] Scanning for projects… [INFO]
[INFO]
———————————————————————— [INFO] Building scala.maven.test 0.0.1-SNAPSHOT [INFO]
———————————————————————— [INFO] [INFO] — maven-resources-plugin:2.4.3:resources
(default-resources) @ scala.maven.test — [WARNING] Using platform
encoding (Cp1252 actually) to copy filtered resources, i.e. build is
platform dependent! [INFO] Copying 0 resource [INFO] [INFO] —
maven-scala-plugin:2.9.1:add-source (scala-compile-first) @
scala.maven.test — [INFO] Add Source directory:
C:\workspaces\29112012\scala.maven.test\src\main\scala [INFO] Add Test
Source directory:
C:\workspaces\29112012\scala.maven.test\src\test\scala [INFO] [INFO]
— maven-scala-plugin:2.9.1:compile (scala-compile-first) @ scala.maven.test — [ERROR]
C:\workspaces\29112012\scala.maven.test\src\main\java [ERROR]
C:\workspaces\29112012\scala.maven.test\src\main\scala [ERROR]
C:\workspaces\29112012\scala.maven.test\src\test\scala [INFO]
Compiling 2 source files to
C:\workspaces\29112012\scala.maven.test\target\classes [INFO] [INFO]
— maven-compiler-plugin:2.0.2:compile (default-compile) @ scala.maven.test — [INFO] Nothing to compile – all classes are up to
date [INFO] [INFO] — maven-compiler-plugin:2.0.2:compile (default)
@ scala.maven.test — [INFO] Nothing to compile – all classes are up
to date [INFO] [INFO] — maven-resources-plugin:2.4.3:testResources
(default-testResources) @ scala.maven.test — [WARNING] Using
platform encoding (Cp1252 actually) to copy filtered resources, i.e.
build is platform dependent! [INFO] Copying 0 resource [INFO] [INFO]
— maven-scala-plugin:2.9.1:testCompile (scala-test-compile) @ scala.maven.test — [ERROR]
C:\workspaces\29112012\scala.maven.test\src\test\java [ERROR]
C:\workspaces\29112012\scala.maven.test\src\test\java..\scala [INFO]
Compiling 1 source files to
C:\workspaces\29112012\scala.maven.test\target\test-classes [INFO]
[INFO] — maven-compiler-plugin:2.0.2:testCompile
(default-testCompile) @ scala.maven.test — [INFO] Nothing to compile
– all classes are up to date [INFO] [INFO] — maven-surefire-plugin:2.7.1:test (default-test) @ scala.maven.test —
[INFO] Surefire report directory:
C:\workspaces\29112012\scala.maven.test\target\surefire-reports

——————————————————- T E S T S
——————————————————- There are no tests to run.

Results :

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

[INFO]
———————————————————————— [INFO] BUILD SUCCESS [INFO]
———————————————————————— [INFO] Total time: 11.354s [INFO] Finished at: Fri Nov 30 16:57:05 GMT

2012 [INFO] Final Memory: 7M/17M [INFO]

Here is my pom.xml :

<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>scala.maven.test</groupId>
  <artifactId>scala.maven.test</artifactId>
  <version>0.0.1-SNAPSHOT</version>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.scala-tools</groupId>
                    <artifactId>maven-scala-plugin</artifactId>
                    <version>2.9.1</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>2.0.2</version>
                </plugin>
                <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>1.0.0</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>
                                            org.scala-tools
                                        </groupId>
                                        <artifactId>
                                            maven-scala-plugin
                                        </artifactId>
                                        <versionRange>
                                            [2.9.1,)
                                        </versionRange>
                                        <goals>
                                            <goal>add-source</goal>
                                            <goal>compile</goal>
                                            <goal>testCompile</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore></ignore>
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <executions>
                    <execution>
                        <id>scala-compile-first</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                            <goal>compile</goal>
                        </goals>
                    </execution>                                    
                    <execution>
                        <id>scala-test-compile</id>
                        <phase>process-test-resources</phase>
                        <goals>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

<dependencies>
  <dependency>
    <groupId>org.scalatest</groupId>
    <artifactId>scalatest_2.9.0-1</artifactId>
    <version>2.0.M5</version>
</dependency>
<dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
</dependency>
</dependencies>



</project>
  • 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-06-15T04:26:06+00:00Added an answer on June 15, 2026 at 4:26 am

    What’s your test class name? Maven can be pretty picky and by default I think it requires the class name to end in ‘Test’.

    See my previos post:
    Maven won't run tests

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

Sidebar

Related Questions

Does Scala have a version of Rubys' each_slice from the Array class?
I have the following Scala code: class X[T1 <: AnyRef] { var _x :
I am building a scala web project using scala test, lift, jpa, hibernate, mercurial
I am testing a parser I have written in Scala using ScalaTest. The parser
I'm writing an own container class and have run into a problem I can't
I have a Scala application using Akka that receives REST requests, makes some operations
I am writing my unit test cases for a Java project using Scala (JUnit
I have directory structure like this src main resources text.txt scala hello world.scala test
Consider following code in Scala: object Test { class A {} class B extends
I have written a function that sorts a big scale of data. To test

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.