"mvn test" is not doing anything

472 views
Skip to first unread message

John Arrowwood

unread,
Feb 3, 2017, 1:18:59 PM2/3/17
to scalatest-users
I'm coming back after about six months - make that 10 months - of working on other things, and all of a sudden, I can't run my tests from the command line any more.  When I type "mvn test" at the command line, I get:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building keystone-test 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ keystone-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 23 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ keystone-test ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ keystone-test ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ keystone-test ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] --- maven-surefire-plugin:2.7:test (default-test) @ keystone-test ---
[INFO] Tests are skipped.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.671 s
[INFO] Finished at: 2017-02-03T13:05:37-05:00
[INFO] Final Memory: 11M/309M
[INFO] ------------------------------------------------------------------------


I haven't changed my pom.xml, which still matches what is on the website for how to use ScalaTest with Maven:
<?xml version="1.0" encoding="UTF-8"?>
<project 
  <modelVersion>4.0.0</modelVersion>
  <groupId>***REDACTED***</groupId>
  <artifactId>project-test</artifactId>
  <version>1.0-SNAPSHOT</version>
  <packaging>jar</packaging>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <java.version>1.8</java.version>
    <scala.version>2.11.7</scala.version>
    <scala.version.tools>2.11</scala.version.tools>
  </properties>

  <repositories>

    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>releases</id>
      <name>releases</name>
      <url>***REDACTED***</url>
    </repository>

    <repository>
      <snapshots/>
      <id>snapshots</id>
      <name>snapshots</name>
      <url>***REDACTED***</url>
    </repository>

    <!-- for the Artima SuperSafe Scala Compiler -->
    <repository>
      <id>artima</id>
      <name>Artima Maven Repository</name>
    </repository>

  </repositories>

  <build>
    <pluginManagement>
    <plugins>

      <plugin>
        <groupId>net.alchim31.maven</groupId>
        <artifactId>scala-maven-plugin</artifactId>
        <!-- latest as of 2016-03-01 -->
        <version>3.2.2</version>
        <executions>
          <execution>
            <phase>process-sources</phase>
            <goals>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
            <configuration>
              <args>
                <arg>-deprecation</arg>
                <arg>-uniqid</arg>
                <arg>-explaintypes</arg>
              </args>
              <scalaCompatVersion>${scala.version.tools}</scalaCompatVersion>
              <scalaVersion>${scala.version}</scalaVersion>
              <compilerPlugins>
                <compilerPlugin>
                  <!-- Enable a safer subset of scala at compile time - www.artima.com/supersafe -->
                  <groupId>com.artima.supersafe</groupId>
                  <artifactId>supersafe_${scala.version}</artifactId>
                  <version>1.1.0-RC6</version>
                </compilerPlugin>
              </compilerPlugins>
              <!-- ADD IF NEEDED -->
              <!-- <mainSourceDir>${project.build.sourceDirectory}/../java</mainSourceDir> -->
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <!-- latest as of 2016-03-01 -->
        <version>3.5.1</version>
        <configuration>
          <source>${java.version}</source>
          <target>${java.version}</target>
        </configuration>
      </plugin>

      <!-- disable surefire -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
      </plugin>

      <!-- enable scalatest -->
      <plugin>
        <groupId>org.scalatest</groupId>
        <artifactId>scalatest-maven-plugin</artifactId>
        <version>1.0</version>
        <configuration>
          <reportsDirectory>${project.build.directory}/surefire-reports</reportsDirectory>
          <junitxml>.</junitxml>
          <filereports>WDF TestSuite.txt</filereports>
        </configuration>
        <executions>
          <execution>
            <id>test</id>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
    </pluginManagement>
  </build>

  <dependencies>

    <dependency>
      <groupId>org.scala-lang</groupId>
      <artifactId>scala-library</artifactId>
      <version>${scala.version}</version>
    </dependency>

    <dependency>
    <groupId>com.jayway.restassured</groupId>
    <artifactId>rest-assured</artifactId>
    <version>2.8.0</version>
    </dependency>
<!-- Add these pieces of rest-assured if we employ them directly in our tests -->
<!--
    <dependency>
    <groupId>com.jayway.restassured</groupId>
    <artifactId>json-path</artifactId>
    <version>2.8.0</version>
    </dependency>

    <dependency>
    <groupId>com.jayway.restassured</groupId>
    <artifactId>xml-path</artifactId>
    <version>2.8.0</version>
    </dependency>
    
    <dependency>
    <groupId>com.jayway.restassured</groupId>
    <artifactId>json-schema-validator</artifactId>
    <version>2.8.0</version>
    </dependency>
-->
    <dependency>
        <groupId>com.jayway.restassured</groupId>
        <artifactId>scala-support</artifactId>
        <version>2.8.0</version>
    </dependency>

<!--
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>org.scalacheck</groupId>
      <artifactId>scalacheck_${scala.version.tools}</artifactId>
      <version>1.11.4</version>
      <scope>test</scope>
    </dependency>
-->
    <dependency>
      <groupId>org.scalatest</groupId>
      <artifactId>scalatest_${scala.version.tools}</artifactId>
      <!-- latest as of 2016-03-01 -->
      <version>2.2.6</version>
      <scope>compile</scope>
    </dependency>

    <dependency>
      <groupId>com.typesafe</groupId>
      <artifactId>config</artifactId>
      <version>1.3.0</version>
    </dependency>
    
    <dependency>
      <groupId>org.json4s</groupId>
      <artifactId>json4s-native_${scala.version.tools}</artifactId>
      <version>3.3.0</version>
    </dependency>

    <dependency>
 <groupId>com.owlike</groupId>
 <artifactId>genson-scala_${scala.version.tools}</artifactId>
 <version>1.3</version>
    </dependency>

  </dependencies>
</project>


Any ideas why it is suddenly choosing not to work?  Would appreciate any advice on how to get it working again.  I'm a complete novice when it comes to Maven.

Thank you so much!
Reply all
Reply to author
Forward
0 new messages