Adina Moldovan created MCOMPILER-212: ----------------------------------------
Summary: maven-compiler-plugin:3.1:testCompile throws compilation error for class org.junit.Assume Key: MCOMPILER-212 URL: https://jira.codehaus.org/browse/MCOMPILER-212 Project: Maven Compiler Plugin Issue Type: Bug Affects Versions: 3.1 Environment: mvn --version Apache Maven 3.0.3 (r1075438; 2011-02-28 19:31:09+0200) Maven home: /usr/share/maven Java version: 1.6.0_45, vendor: Apple Inc. Java home: /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Default locale: en_US, platform encoding: MacRoman OS name: "mac os x", version: "10.7.5", arch: "x86_64", family: "mac" Reporter: Adina Moldovan Steps: 1. Write the following class in your tests package: package com.adinnaplus.automation.tests; import org.junit.Assume; import org.junit.Test; public class MyTest { @Test public void failingTest() { boolean condition = false; Assume.assumeFalse(condition); // test follows here } } 2. Go to terminal and run "mvn clean test" in the path where your project's pom is Expected: compilation successful (junit Assume is a very important feature for our project) Actual: $ mvn clean test [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building Adinnaplus BDD Automation 1.1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-clean-plugin:2.4.1:clean (default-clean) @ AdinnaplusAutomation --- [INFO] Deleting /Users/adinamoldovan/Documents/git/Adinnaplus/AdinnaplusAutomation/target [INFO] [INFO] --- xmlbeans-maven-plugin:2.3.3:xmlbeans (default) @ AdinnaplusAutomation --- [INFO] [INFO] --- maven-resources-plugin:2.4.3:resources (default-resources) @ AdinnaplusAutomation --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 6 resources [INFO] Copying 37 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ AdinnaplusAutomation --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 53 source files to /Users/adinamoldovan/Documents/git/Adinnaplus/AdinnaplusAutomation/target/classes [WARNING] Note: /Users/adinamoldovan/Documents/git/Adinnaplus/AdinnaplusAutomation/src/main/java/com/tve/automation/services/helpers/CredentialLoader.java uses or overrides a deprecated API. [WARNING] Note: Recompile with -Xlint:deprecation for details. [WARNING] Note: Some input files use unchecked or unsafe operations. [WARNING] Note: Recompile with -Xlint:unchecked for details. [INFO] [INFO] --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ AdinnaplusAutomation --- [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 5 resources [INFO] [INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ AdinnaplusAutomation --- [INFO] Changes detected - recompiling the module! [INFO] Compiling 87 source files to /Users/adinamoldovan/Documents/git/Adinnaplus/AdinnaplusAutomation/target/test-classes [INFO] ------------------------------------------------------------- [WARNING] COMPILATION WARNING : [INFO] ------------------------------------------------------------- [WARNING] Note: /Users/adinamoldovan/Documents/git/Adinnaplus/AdinnaplusAutomation/src/test/java/com/tve/automation/steps/AssertionSteps.java uses unchecked or unsafe operations. [WARNING] Note: Recompile with -Xlint:unchecked for details. [INFO] 2 warnings [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------- [ERROR] COMPILATION ERROR : [INFO] ------------------------------------------------------------- [ERROR] /Users/adinamoldovan/Documents/git/Adinnaplus/AdinnaplusAutomation/src/test/java/com/tve/automation/tests/MyTest.java:[11,15] cannot find symbol symbol : method assumeFalse(boolean) location: class org.junit.Assume [INFO] 1 error [INFO] ------------------------------------------------------------- [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 58.111s [INFO] Finished at: Wed Aug 21 10:45:12 EEST 2013 [INFO] Final Memory: 22M/81M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:testCompile (default-testCompile) on project AdinnaplusAutomation: Compilation failure [ERROR] /Users/adinamoldovan/Documents/git/Adinnaplus/AdinnaplusAutomation/src/test/java/com/tve/automation/tests/MyTest.java:[11,15] cannot find symbol [ERROR] symbol : method assumeFalse(boolean) [ERROR] location: class org.junit.Assume [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira