Изначально если выполнить mvn test, все проходит успешно и дальнейшие проверки тоже нормально ведут себя. Но как только выполняешь комманду Clean, все перестает работать. И только если удалить из проекта JavaSE-1.7 который я так понял ставится автоматом из-за maven-compiler-plugin и заново его включить в проект, то все заработает.
Ошибку компиляции:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mavenName 3.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ org-Framew
ork-A1 ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 7 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ org-Framework-A
1 ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 17 source files to D:\Admin\Test1\maven_Framework\target\classe
s
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[3,19] package com.sl.test does not exist
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[10,32] cannot find symbol
symbol: class FunctionalTest
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[20,25] package elements does not exist
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[21,25] package elements does not exist
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[22,25] package elements does not exist
[INFO] 5 errors
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.078s
[INFO] Finished at: Thu May 15 16:43:56 MSK 2014
[INFO] Final Memory: 12M/29M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.
1:compile (default-compile) on project org-Framework-A1: Compilation failure: Co
mpilation failure:
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[3,19] package com.sl.test does not exist
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[10,32] cannot find symbol
[ERROR] symbol: class FunctionalTest
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[20,25] package elements does not exist
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[21,25] package elements does not exist
[ERROR] /D:/Admin/Test1/maven_Framework/src/main/java/com/sl/pages/LoginPage.jav
a:[22,25] package elements does not exist
POM:
<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>org.Framework_G1</groupId>
<artifactId>org-Framework-A1</artifactId>
<version>3.0.1-SNAPSHOT</version>
<name>mavenName</name>
<description>mavenDescription</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<profiles>
<profile>
<id>BasicTest</id>
<properties>
<testcase.groups>com.sl.test</testcase.groups>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.17</version>
<configuration>
<argLine>-Dfile.encoding=UTF-8</argLine>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.41.0</version>
</dependency>
</dependencies>
</project>