Can’t find my tests with GitLab CI in kotlin - maven

why gitlab-ci can't find my tests? locally in IntelliJ IDEA my tests works, but when i push into repo, gitlab-ci cant find my tests
Maybe the problem is that he can not find the directory of my tests? tests in:
project\src\test\kotlin\group\common\UObject\UObjectTest.kt
here is my pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>group</groupId>
<artifactId>project-group</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>project</name>
<properties>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<kotlin.version>1.3.50</kotlin.version>
<kotlin.code.style>official</kotlin.code.style>
<junit.version>4.12</junit.version>
</properties>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test-junit</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<sourceDirectory>src/main/kotlin</sourceDirectory>
<testSourceDirectory>src/test/kotlin/group/common</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.8.1</version>
<configuration>
<includes>
<include>**/*Spec.*</include>
<include>**/*Test.*</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.2.0-M1</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.2.0-M1</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>ktlint</id>
<phase>verify</phase>
<configuration>
<target name="ktlint">
<java taskname="ktlint" dir="${basedir}" fork="true" failonerror="true"
classname="com.pinterest.ktlint.Main" classpathref="maven.plugin.classpath">
<arg value="src/**/*.kt"/>
<arg value="--reporter=plain"/>
<arg value="--reporter=checkstyle,output=${project.build.directory}/ktlint.xml"/>
</java>
</target>
</configuration>
<goals><goal>run</goal></goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>com.pinterest</groupId>
<artifactId>ktlint</artifactId>
<version>0.34.2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>test-compile</goal>
</goals>
</execution>
</executions>
<configuration>
<jvmTarget>1.8</jvmTarget>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
i modified <testSourceDirectory>src/test/kotlin/group/common</testSourceDirectory> but it still not works, i tried to use //Test. instead of **/Test. but it also doesn`t work, I think also problem could be in dependencies but i dont know them right, hope anyone could help me.
gitlab-ci just in case
image: maven:latest
stages:
- build
- ktlint
- test
variables:
MAVEN_CLI_OPTS: "-s settings.xml --batch-mode"
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS compile
ktlint:
stage: ktlint
script:
- mvn antrun:run#ktlint
test unit:
stage: test
script:
- mvn $MAVEN_CLI_OPTS test
results
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 40.340 s
[INFO] Finished at: 2019-10-03T05:56:03Z
[INFO] ------------------------------------------------------------------------

Usually, GitLab CI, can't find the tests when you have placed them at a directory level that is not correct. Also, make sure that what you have in your pom.xml matches the actual directory hierarchy. In this case,
<testSourceDirectory>src/test/kotlin/group/common</testSourceDirectory>
Another example, from the Java world,
<testResources>
<testResource>
<filtering>false</filtering>
<directory>src/test/resources</directory>
</testResource>
<testResource>
<filtering>false</filtering>
<directory>src/test/java</directory>
<includes>
<include>**</include>
</includes>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>

Related

How to configure the maven plugins to run spock and junit5 tests

I want to run run spock and junit5 tests in the same project. So I have made an example project with nothing under src/main but two tests under src/test/java/a/package/. One of the test is a junit5 and the other one is a spock test.
But after issuing mvn test verify only the JUnit test is executed but the spock test is not. They run nicely together in Intellij via "run all tests" so there is clearly some configuration issue I can not find.
Here is my maven pom:
<?xml version="1.0" encoding="UTF-8"?>
<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>maven.spock.junit</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<poi.version>3.17</poi.version>
</properties>
<dependencies>
<!-- test dependencies -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.2</version>
<scope>test</scope>
</dependency>
<!-- spock testing framework -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>1.0-groovy-2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>2.4.4</version>
<scope>test</scope>
</dependency>
<!-- hamcrest matcher -->
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass></mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
<plugin>
<!-- mvn test - exclude integration tests -->
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<argLine>-Xms2g -Xmx2g -XX:MaxPermSize=500m -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US</argLine>
<excludes>
<exclude>%regex[.*Fixme.*]</exclude>
<exclude>%regex[.*(Regression|Integration)Test.*]</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<!-- mvn verify - execute integration tests only -->
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<argLine>-Xms2g -Xmx2g -XX:MaxPermSize=500m -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -Duser.timezone=UTC</argLine>
<includes>
<include>%regex[.*(Regression|Integration)Test.*]</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<configuration>
<sources>
<source>
<directory>src/test/java</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</source>
<source>
<directory>src/test/groovy</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</source>
</sources>
</configuration>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>skip-unit-tests</id>
<activation>
<property>
<name>skipUnitTests</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skipTests>true</skipTests>
<argLine>-Duser.timezone=UTC</argLine>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
If I use the following surefire configuration it executes the spock test but not the junit one.
<plugin>
<!-- mvn test - exclude integration tests -->
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<useFile>false</useFile>
<argLine>-Xms2g -Xmx2g -XX:MaxPermSize=500m -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US</argLine>
<includes>
<include>**/*</include>
</includes>
</configuration>
</plugin>
It seems that maven gets confused with the dependencies so the junit dependencies need to go from the /project/dependencies into the surefire and failsafe plugin like so:
<?xml version="1.0" encoding="UTF-8"?>
<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>maven.spock.junit</groupId>
<artifactId>test</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
<groovy.version>2.5.2</groovy.version>
<junit-platform.version>1.2.0</junit-platform.version>
<jupiter.version>5.2.0</jupiter.version>
<spock.version>1.2-groovy-2.5</spock.version>
</properties>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
<type>pom</type> <!-- required JUST since Groovy 2.5.0 -->
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>${spock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>${jupiter.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<defaultGoal>verify</defaultGoal>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.6.1</version>
<configuration>
<testSources>
<testSource>
<directory>src/test/java</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</testSource>
<testSource>
<directory>src/test/groovy</directory>
<directory>src/test</directory>
<includes>
<include>**/*.groovy</include>
</includes>
</testSource>
</testSources>
</configuration>
<executions>
<execution>
<goals>
<goal>addTestSources</goal>
<goal>generateTestStubs</goal>
<goal>compileTests</goal>
<goal>removeTestStubs</goal>
<goal>removeStubs</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit-platform.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${jupiter.version}</version>
</dependency>
</dependencies>
<configuration>
<detail>true</detail>
<argLine>-Xms2g -Xmx2g -XX:MaxPermSize=500m -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US</argLine>
<includes>
<include>%regex[.*]</include>
</includes>
<excludes>
<exclude>%regex[.*Fixme.*]</exclude>
<exclude>%regex[.*(Regression|Integration)Test.*]</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit-platform.version}</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>${jupiter.version}</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>${jupiter.version}</version>
</dependency>
</dependencies>
<configuration>
<argLine>-Xms2g -Xmx2g -XX:MaxPermSize=500m -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -Duser.timezone=UTC</argLine>
<includes>
<include>%regex[.*(Regression|Integration)Test.*]</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
All the credit belong to SanderSmee - Thanks!! I was just so lucky that I have found your repo! https://github.com/SanderSmee/spock-jupiter/blob/master/pom.xml
You have to help Surefire to pick the right provider, here the surefire-junit-platform provider:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit-platform</artifactId>
<version>3.0.0-M1</version>
</dependency>
</dependencies>
</plugin>
For details see https://maven.apache.org/surefire/maven-surefire-plugin/examples/providers.html
Spock 2.0 uses Junit 5, rather than JUnit 4. So, now, it just works without any special effort to get the dependencies correct.

Cannot attach spring cloud contract maven plugin to lifecycle phase

I could not manage to run spring-cloud-contract:generateTests to run without explicitly specifying the goal in maven command line. Here is the plugin configuration of pom.xml:
<!-- Contract Driven Testing -->
<plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
<version>${spring-cloud-contract.version}</version>
<!-- Don't forget about this value !! -->
<extensions>true</extensions>
<configuration>
<!-- Provide the base class for your auto-generated tests -->
<packageWithBaseClasses>cdc</packageWithBaseClasses>
</configuration>
<executions>
<execution>
<id>spring-cloud-generateTests</id>
<goals>
<goal>generateTests</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-verifier</artifactId>
<version>${spring-cloud-contract.version}</version>
</dependency>
</dependencies>
</plugin>
When I run mvn clean install the tests are not generated, although explicitly specifying the goal fulfills the goal.
Here is the full 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.1.RELEASE</version>
</parent>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>maliye-muhasebeislemleri</artifactId>
<packaging>jar</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>maliye-muhasebeislemleri Maven Webapp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Database Dependencies -->
<h2.version>1.4.190</h2.version>
<!-- Testing Dependencies -->
<postgresql.version>9.4.1207</postgresql.version>
<start-class>tr.gov.tubitak.bilgem.yte.maliye.Application</start-class>
<spring-cloud-contract.version>1.0.4.BUILD-SNAPSHOT</spring-cloud-contract.version>
</properties>
<distributionManagement>
<repository>
<id>nexus</id>
<name>Internal Releases</name>
<url>http://yte-nexus:8081/nexus/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>nexus</id>
<name>Internal Releases</name>
<url>http://yte-nexus:8081/nexus/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<!-- If you're adding this dependency explicitly you have to add it *BEFORE*
the Release Train BOM -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-dependencies</artifactId>
<version>${spring-cloud-contract.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Testing Dependencies -->
<dependency>
<groupId>org.powermock</groupId>
<artifactId>powermock-api-mockito</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-testutils</artifactId>
<version>0.1.6-RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-verifier</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-wiremock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
<scope>test</scope>
</dependency>
<!-- Required by contract tests -->
<dependency>
<groupId>org.apache.maven</groupId>
<artifactId>maven-model</artifactId>
<version>3.3.9</version>
<scope>test</scope>
</dependency>
<!-- MGM-CORE Dependencies -->
<dependency>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-core</artifactId>
<version>0.10.2-RELEASE</version>
</dependency>
<!-- Database Dependencies -->
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>${h2.version}</version>
<scope>test</scope>
</dependency>
<!-- POSTGRES -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
<dependency>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>maliye-muhasebeislemleri</finalName>
<resources>
<resource>
<directory>${basedir}/src/main/java</directory>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<testResources>
<testResource>
<directory>${project.basedir}/src/test/java</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
</testResource>
<testResource>
<directory>${project.basedir}/target/generated-test-sources</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>${spring-loaded.version}</version>
</dependency>
</dependencies>
<configuration>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-automatic-file-creator</artifactId>
<version>0.0.1-RELEASE</version>
<dependencies>
<dependency>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-automatic-file-creator</artifactId>
<version>0.0.1-RELEASE</version>
</dependency>
</dependencies>
<configuration>
<fName>${packageName}</fName>
<directory>${directory}</directory>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<plugin>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>mb-veriaktarim-maven-plugin</artifactId>
<version>0.2.8-SNAPSHOT</version>
<configuration>
<driver>${db.driver}</driver>
<datasetDir>db-changelog/veri/</datasetDir>
<jdbcUrl>${db.url}</jdbcUrl>
<dbUser>${db.username}</dbUser>
<dbPass>${db.password}</dbPass>
<schema>${db.schema}</schema>
<ignoredTables>
<table>databasechangelog</table>
<table>databasechangeloglock</table>
<table>cerceve_hesap_kodu</table>
<table>hesap_grubu</table>
</ignoredTables>
<noTruncateTables>
<table>kamu_idaresi</table>
<table>harcama_birimi</table>
<table>muhasebe_birimi</table>
<table>muhasebe_fisi</table>
<table>ortak_hesap_plani</table>
<table>ortak_hesap_kodu</table>
<table>kurum_hesap_plani</table>
<table>kurum_hesap_kodu</table>
<table>son_fis_bilgisi</table>
<table>harcama_birimi_devir_bilgisi</table>
<table>kurum_hesap_plani_devir_bakiye_bilgisi</table>
<table>kurum_hesap_kodu_devir_bakiye_bilgisi</table>
<table>ortak_hesap_kodu_grubu_kod</table>
<table>ortak_hesap_kodu_grubu</table>
<table>ortak_hesap_kodu_iliskisi</table>
</noTruncateTables>
</configuration>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgresql.version}</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>cleanAndTransferData</id>
<phase>prepare-package</phase>
<goals>
<goal>cleanAndTransferData</goal>
</goals>
</execution>
<execution>
<id>exportData</id>
<phase>prepare-package</phase>
<goals>
<goal>exportData</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.15</version>
<configuration>
<properties>
<argLine>-Dfile.encoding=UTF-8</argLine>
</properties>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
<include>**/Test*.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>3.3.2</version>
<configuration>
<promptOnNonLocalDatabase>false</promptOnNonLocalDatabase>
<changeLogFile>db-changelog/db.changelog-master.xml</changeLogFile>
<driver>${db.driver}</driver>
<url>${db.url}</url>
<username>${db.username}</username>
<password>${db.password}</password>
<defaultSchemaName>${db.schema}</defaultSchemaName>
<contexts>${db.context}</contexts>
<migrationSqlOutputFile>db-setting/muhasebe.sql</migrationSqlOutputFile>
</configuration>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>update</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- JACOCO -->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.6.201602180812</version>
<configuration>
<sourceEncoding>UTF-8</sourceEncoding>
<outputEncoding>UTF-8</outputEncoding>
</configuration>
<executions>
<execution>
<id>jacoco-prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-prepare-package</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- JACOCO -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.14</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
<execution>
<id>verify</id>
<goals>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>tr.gov.tubitak.bilgem.yte.maliye</groupId>
<artifactId>maliye-kullaniciaktarim-maven-plugin</artifactId>
<version>0.2.2-RELEASE</version>
<configuration>
<securityUrl>${kullaniciAktarim.url}</securityUrl>
<mnemonicCode>MHS</mnemonicCode>
<clientServicePath>${kullaniciAktarim.istemciUrl}</clientServicePath>
<serviceName>muhasebe_islemleri</serviceName>
<userRoleFile>src/main/resources/security/UserRole.xml</userRoleFile>
<rolePermissionFile>src/main/resources/security/RolePermission.xml</rolePermissionFile>
<sqlOutFile>db-setting/kullanici.sql</sqlOutFile>
</configuration>
</plugin>
<!-- Contract Driven Testing -->
<plugin>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-maven-plugin</artifactId>
<version>${spring-cloud-contract.version}</version>
<!-- Don't forget about this value !! -->
<extensions>true</extensions>
<configuration>
<!-- Provide the base class for your auto-generated tests -->
<packageWithBaseClasses>cdc</packageWithBaseClasses>
</configuration>
<executions>
<execution>
<id>spring-cloud-generateTests</id>
<phase>compile</phase>
<goals>
<goal>generateTests</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-verifier</artifactId>
<version>${spring-cloud-contract.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>development</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<spring.profiles.active>development</spring.profiles.active>
<build.profile.id>dev</build.profile.id>
<db.url>jdbc:postgresql://localhost:5432/maliye_muhasebeislemleri</db.url>
<db.driver>org.postgresql.Driver</db.driver>
<db.username>maliye_muhasebeislemleri</db.username>
<db.password>Aa123456</db.password>
<db.schema>public</db.schema>
<db.context>development</db.context>
<kullaniciAktarim.url>http://localhost:8080/maliye-kullanici/kullanici/kullanicilariGuncelle</kullaniciAktarim.url>
<kullaniciAktarim.istemciUrl>http://localhost:8080/muhasebe</kullaniciAktarim.istemciUrl>
</properties>
</profile>
<profile>
<id>test</id>
<properties>
<spring.profiles.active>test</spring.profiles.active>
<build.profile.id>test</build.profile.id>
<db.url>jdbc:postgresql://mgm-01:5432/maliye?current=maliye_muhasebeislemleri</db.url>
<db.driver>org.postgresql.Driver</db.driver>
<db.username>maliye_muhasebeislemleri</db.username>
<db.password>Aa123456</db.password>
<db.schema>maliye_muhasebeislemleri</db.schema>
<db.context>test</db.context>
<kullaniciAktarim.url>http://mgm-10:8080/maliye-kullanici/kullanici/kullanicilariGuncelle</kullaniciAktarim.url>
<kullaniciAktarim.istemciUrl>http://mgm-09:80/muhasebe</kullaniciAktarim.istemciUrl>
</properties>
</profile>
</profiles>
I tried to run your example but it fails to compile due to missing dependencies. Anyways what #khmarbaise said is perfectly valid. With Maven you have to set a plugin in the <build><plugins> section. If you have it only in the <pluginManagement> section then it won't work. You can check out the Spring Cloud Contract Samples where everything works fine and is well setup - https://github.com/spring-cloud-samples/spring-cloud-contract-samples/blob/master/producer/pom.xml#L73-L103

Report is not generated, If I run my test cases(JUnit) through Maven?

I am New to JUnit and Maven. I am running my JUnit testcases through maven. Build is getting succeed but index.html is not generated. How can I generate the index.html?
This is my project structure after build succeeded.
And My POM.xml is as follows,
<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>MyGroup</groupId>
<artifactId>TestCodeCoverage</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>MyMavenProject</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.6.3.201306030806</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.14.1</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire-junit47</artifactId>
<version>2.12</version>
</dependency>
</dependencies>
<configuration>
<includes>
<include>**/*.class</include>
</includes>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.41.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.41.0</version>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.opera</groupId>
<artifactId>operadriver</artifactId>
<version>1.5</version>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
</dependencyManagement>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.17</version>
<reportSets>
<reportSet>
<id>integration-tests</id>
<reports>
<report>failsafe-report-only</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugins>
</reporting>
</project>
If you are expecting maven-surefire-report-plugin to generate the report, then it will do so, only if you run the site goal (mvn site). Otherwise, as you can see, the reports are available in target\surefire-reports folder.
You should navigate to the directory where you pom.xml exist.Using this command cd E:/TestProject and then run the site goal. For e.g. mvn site

Unable to download Alfresco Artifacts using Maven

I have been trying to build a project (Alfresco 4.1.2), and I keep getting a Build Failure.
I am a little bit lost...
I have configured setting.xml correctly (with credentials for the repository)
here's my pom.xml
Does anybody have a clue??
<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>xxx</groupId>
<artifactId>xxx</artifactId>
<version>0.1</version>
<name>Project</name>
<properties>
<alfresco.version>4.1.2</alfresco.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Alfresco dependencies -->
<dependency>
<groupId>org.alfresco.enterprise</groupId>
<artifactId>alfresco-core</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.alfresco.enterprise</groupId>
<artifactId>alfresco-data-model</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.alfresco.enterprise</groupId>
<artifactId>alfresco-repository</artifactId>
<version>${alfresco.version}</version>
<scope>provided</scope>
</dependency>
<!-- Junit -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<!-- MOCKITO -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.0</version>
<scope>test</scope>
</dependency>
<!-- DUMBSTER -->
<dependency>
<groupId>dumbster</groupId>
<artifactId>dumbster</artifactId>
<version>1.6</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Gson: Java to Json conversion -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2</version>
</dependency>
<dependency>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.3</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>jtidy</groupId>
<artifactId>jtidy</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- DOCX4J dependencies -->
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>docx4j</artifactId>
<version>2.8.1</version>
</dependency>
<dependency>
<groupId>org.docx4j</groupId>
<artifactId>xhtmlrenderer</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>xmlgraphics-commons</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>fop</artifactId>
<version>0.93</version>
</dependency>
<dependency>
<groupId>org.plutext</groupId>
<artifactId>jaxb-xmldsig-core</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.plutext</groupId>
<artifactId>jaxb-xslfo</artifactId>
<version>1.0.1</version>
</dependency>
<!-- JODA TIME -->
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>1.2.1</version>
</dependency>
<!-- JOD CONVERTER -->
<dependency>
<groupId>com.artofsolving</groupId>
<artifactId>jodconverter-core</artifactId>
<version>3.0-alfresco-patched-20120820</version>
<scope>provided</scope>
</dependency>
<!-- JTIDY -->
<dependency>
<groupId>net.sf.jtidy</groupId>
<artifactId>jtidy</artifactId>
<version>r938</version>
</dependency>
</dependencies>
<!-- Repositories to download Alfresco dependencies -->
<repositories>
<repository>
<id>alfresco-private</id>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</repository>
<repository>
<id>alfresco-thirdparty</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/thirdparty</url>
</repository>
<repository>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public-snapshots</url>
</repository>
</repositories>
<!-- Build lifecycle -->
<build>
<plugins>
<!-- Load properties from build.properties file (in order to get Tomcat location) -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.0-alpha-2</version>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>${basedir}/build.properties</file>
</files>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<!-- on "install" copy generated JAR to Alfresco Tomcat -->
<executions>
<execution>
<id>copy-jar-to-alfresco</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${tomcat.alfresco.webapps.alfresco}/WEB-INF/lib</outputDirectory>
<resources>
<resource>
<directory>${basedir}/target/</directory>
<includes>
<include>${project.build.finalName}.jar</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<encoding>UTF-8</encoding>
<showWarnings>true</showWarnings>
</configuration>
</plugin>
<!-- Disable default "install" phase (which copies the JAR into the local repository) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
<executions>
<execution>
<id>default-install</id>
<phase>none</phase>
</execution>
</executions>
</plugin>
<!-- copy dependencies to alfresco tomcat -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>install</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<outputDirectory>${tomcat.alfresco.lib}</outputDirectory>
<overWriteReleases>false</overWriteReleases>
<overWriteSnapshots>false</overWriteSnapshots>
<overWriteIfNewer>true</overWriteIfNewer>
<excludeTransitive>true</excludeTransitive> <!-- you have to be careful about jars copied in alfresco. Check that each jar does not exist already before copying them -->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--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.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>[2.6,)</versionRange>
<goals>
<goal>copy-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
I get this error when I try to build:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8:57.331s
[INFO] Finished at: Fri Jan 17 16:41:56 EET 2014
[INFO] Final Memory: 11M/185M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project xxx: Could not resolve dependencies for project com.genia.alfresco.xxx:xxx-alfresco:jar:0.1: The following artifacts could not be resolved: jaxen:jaxen:jar:1.1.3, org.apache.chemistry.opencmis:chemistry-opencmis-commons-impl:jar:0.7.0, org.apache.httpcomponents:httpclient-cache:jar:4.1.1, org.codehaus.jackson:jackson-mapper-asl:jar:1.8.3, com.googlecode.mp4parser:isoparser:jar:1.0-RC-1, com.drewnoakes:metadata-extractor:jar:2.6.2, asm:asm-util:jar:3.2, edu.ucar:netcdf:jar:4.2, org.apache.chemistry.opencmis:chemistry-opencmis-server-bindings:jar:classes:0.7.0, org.apache.maven:maven-core:jar:2.0.6, org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-2, classworlds:classworlds:jar:1.1, org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1, net.arnx:wmf2svg:jar:0.9.0, batik:batik-dom:jar:1.6-1, batik:batik-css:jar:1.6-1, batik:batik-xml:jar:1.6-1, batik:batik-parser:jar:1.6-1, batik:batik-bridge:jar:1.6-1, batik:batik-script:jar:1.6-1, batik:batik-awt-util:jar:1.6-1, batik:batik-util:jar:1.6-1, batik:batik-gui-util:jar:1.6-1, batik:batik-gvt:jar:1.6-1, batik:batik-transcoder:jar:1.6-1, batik:batik-extension:jar:1.6-1, batik:batik-ext:jar:1.6-1, xml-apis:xmlParserAPIs:jar:2.0.2, org.apache.avalon.framework:avalon-framework-api:jar:4.3.1, org.apache.avalon.framework:avalon-framework-impl:jar:4.3.1, org.plutext:jaxb-xmldsig-core:jar:1.0.0, org.plutext:jaxb-xslfo:jar:1.0.1, joda-time:joda-time:jar:1.2.1, net.sf.jtidy:jtidy:jar:r938: Could not transfer artifact jaxen:jaxen:jar:1.1.3 from/to central (http://repo1.maven.org/maven2): No response received after 60000 -> [Help 1]

Error in Maven building

I'm new in Maven
this errors appeared when Maven building
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J:
See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details. [INFO] Scanning for projects
[INFO] BUILD FAILURE [INFO]
[INFO] Total time: 4.973s [INFO] Finished at: Sun Jan 19 08:17:30 EET 2014
[INFO] Final Memory: 3M/7M
[INFO][ERROR] No goals have been specified for this build. You must specify
a valid lifecycle phase or a goal in the format <plugin-prefix>:<goal>
or <plugin-group-id>:<plugin-artifact-id>[:<plugin-version>]:<goal>.
Available lifecycle phases are: validate, initialize,
generate-sources
any help ?
here's my pom.xml
<pre>
<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>storm.starter</groupId>
<artifactId>storm-starter</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>storm-starter</name>
<url>https://github.com/nathanmarz/storm-starter</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<repositories>
<repository>
<id>github-releases</id>
<url>http://oss.sonatype.org/content/repositories/github-releases/</url>
</repository>
<repository>
<id>clojars.org</id>
<url>http://clojars.org/repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert-core</artifactId>
<version>2.0M8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmock</groupId>
<artifactId>jmock</artifactId>
<version>2.6.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>storm</groupId>
<artifactId>storm</artifactId>
<version>0.9.0.1</version> <!-- keep storm out of the jar-with-dependencies -->
<scope>provided</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>15.0</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.6</version>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<sourceDirectory>src/jvm</sourceDirectory>
<testSourceDirectory>test/jvm</testSourceDirectory>
<resources>
<resource>
<directory>${basedir}/multilang</directory>
</resource>
</resources>
<plugins> <!-- Bind the maven-assembly-plugin to the package phase this will create
a jar file without the storm dependencies suitable for deployment to a cluster. -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass></mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.theoryinpractise</groupId>
<artifactId>clojure-maven-plugin</artifactId>
<version>1.3.12</version>
<extensions>true</extensions>
<configuration>
<sourceDirectories>
<sourceDirectory>src/clj</sourceDirectory>
</sourceDirectories>
</configuration>
<executions>
<execution>
<id>compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>java</executable>
<includeProjectDependencies>true</includeProjectDependencies>
<includePluginDependencies>false</includePluginDependencies>
<classpathScope>compile</classpathScope>
<mainClass>${storm.topology}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
</pre>
If you are using Run as->Maven Build then you have to specify a specific goal like install or package to the Goals field in the dialog box and run.
If it doesn't solve your problem, try running it in the command line once giving mvn clean install command and see the results.
More here

Resources