How to configure BDD for microservice using cucumber and serenity - maven

Folder Structure for BDD automation.
src
-test
-java
-MainTestSuit.java
-resource
-feature
-stubs
- files
- mapping
- bootstrap.yaml
- test-application.properties
- data.sql
- serenity.conf
pom.xml
sample 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>app-ms-parent</artifactId>
<groupId>com.app</groupId>
<version>1.000-SNAPSHOT</version>
</parent>
<artifactId>app-acceptance</artifactId>
<name>app-acceptance</name>
<packaging>jar</packaging>
<properties>
<tags />
<webdriver.base.url />
<parallel.tests>4</parallel.tests>
<serenity.version>2.2.9</serenity.version>
<cucumber.version>5.5.0</cucumber.version>
<serenity.cucumber5.version>2.2.5</serenity.cucumber5.version>
</properties>
<dependencies>
<dependency>
<groupId>com.app</groupId>
<artifactId>app-ms</artifactId>
<version>${project.version}</version>
<scope>test</scope>
<classifier>jar-with-dependencies</classifier>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j-impl</artifactId>
<version>${log4j2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
<version>${log4j2.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-cucumber5</artifactId>
<version>${serenity.cucumber5.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-rest-assured</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-spring</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-contract-wiremock</artifactId>
<version>3.0.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>spring-boot-starter-logging</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<artifactId>spring-boot-starter-logging</artifactId>
<groupId>org.springframework.boot</groupId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>3.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fatboyindustrial.gson-javatime-serialisers</groupId>
<artifactId>gson-javatime-serialisers</artifactId>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.8</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.1</version>
<configuration>
<skip>false</skip>
<includes>
<include>**/*TestSuite.java</include>
</includes>
<systemPropertyVariables>
<webdriver.base.url>${webdriver.base.url}</webdriver.base.url>
</systemPropertyVariables>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>${serenity.version}</version>
<dependencies>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-single-page-report</artifactId>
<version>${serenity.version}</version>
</dependency>
</dependencies>
<configuration>
<tags>${tags}</tags>
<reports>single-page-html</reports>
</configuration>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
We can add annotation for running MainTestSuit.java, This is main class which will boot test application.
import org.junit.runner.RunWith;
import net.serenitybdd.cucumber.CucumberWithSerenity;
import io.cucumber.junit.CucumberOptions;
#RunWith(CucumberWithSerenity.class)
#CucumberOptions(strict = true, plugin = {"pretty", "html:target/cucumber/html", "json:target/cucumber/json"},
features = {"classpath:features"},
glue = "com.step", tags = "not #ignore")
public class DocumentSourcingServiceAcceptanceTestSuite {
//DO Nothing.
}
Sample dependencies management for having BDD in application.

Related

Upgraded Spring-boot-starter parent to 2.5.12 from 2.5.6. Some junit assertions are failing with NullPointerException

failing cases:
After upgrading to 2.5.12 from 2.5.6, Some junit tests for asserting DataIntegrityViolationException were failing with NullPointerException.
this is my pom.xml file. Do I need to upgrade any other dependency? I read it somewhere that i need to update spring-cloud.version to 2020.0.5, but it's not working
currently i'm suing spring-cloud.version - 2020.0.3 and resilience4j-springboot2 version as 1.7.1.
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.5.12</version>
</parent>
<properties>
<ims.events.model.version>0.0.32</ims.events.model.version>
<ims-commons.version>1.0.94</ims-commons.version>
<jackson-modules-version>2.13.0</jackson-modules-version>
<jacoco.version>0.8.5</jacoco.version>
<java.version>1.8</java.version>
<javax.interceptor>1.2.2</javax.interceptor>
<jvm.options>-Xss3M</jvm.options>
<kafka.version>2.7.1</kafka.version>
<logback.contrib.version>0.1.5</logback.contrib.version>
<lombok.version>1.18.20</lombok.version>
<maven.chekstyle.version>3.0.0</maven.chekstyle.version>
<mssql.version>9.2.0.jre8</mssql.version>
<okhttp3.version>4.1.1</okhttp3.version>
<store-iro-util.version>1.1.60</store-iro-util.version>
<packaging.type>jar</packaging.type>
<resilience4j-spring-boot2.version>1.7.1</resilience4j-spring-boot2.version>
<!-- resilience4j-spring-boot2.version must be co ordinated manually with the spring.cloud-version -->
<shedlock.jdbc.version>2.1.0</shedlock.jdbc.version>
<shedlock.version>2.5.0</shedlock.version>
<simple-spring-memcached.version>4.1.3</simple-spring-memcached.version>
<spring.cloud-version>2020.0.3</spring.cloud-version>
<spring-kafka-test.version>2.7.1</spring-kafka-test.version>
<spring-kafka.version>2.7.1</spring-kafka.version>
<spring-starter.version>3.4.1</spring-starter.version>
<springdoc-openapi-ui.version>1.3.9</springdoc-openapi-ui.version>
<testcontainers-version>1.16.0</testcontainers-version>
<wiremock.version>2.27.2</wiremock.version>
<xmemcached.version>2.4.7</xmemcached.version>
<liquibase.version>3.7.0</liquibase.version>
<spring-cloud-gcp.version>1.2.0.RELEASE</spring-cloud-gcp.version>
<features-planavro.version>0.0.15-RELEASE</features-planavro.version>
<spring-cloud-starter.version>3.0.4</spring-cloud-starter.version>
<spring-cloud-starter-circuitbreaker.version>2.0.2</spring-cloud-starter-circuitbreaker.version>
<maven-release-plugin.version>3.0.0-M4</maven-release-plugin.version>
<dockerfile-maven-plugin.version>1.4.10</dockerfile-maven-plugin.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring.cloud-version}</version>
<type>pom</type>
<scope>runtime</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-gcp-starter-bigquery</artifactId>
<version>${spring-cloud-gcp.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
<version>${spring-cloud-starter.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-sleuth</artifactId>
<version>${spring-cloud-starter.version}</version>
</dependency>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>${liquibase.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>io.strati.ioc</groupId>
<artifactId>strati-af-ccm-spring-boot-starter</artifactId>
<version>${spring-starter.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<version>${spring-kafka.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-circuitbreaker-reactor-resilience4j</artifactId>
<version>${spring-cloud-starter-circuitbreaker.version}</version>
</dependency>
<dependency>
<groupId>io.github.resilience4j</groupId>
<artifactId>resilience4j-spring-boot2</artifactId>
<version>${resilience4j-spring-boot2.version}</version>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-core</artifactId>
</dependency>
<dependency>
<groupId>io.micrometer</groupId>
<artifactId>micrometer-registry-prometheus</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-actuator-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-cache</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache</artifactId>
</dependency>
<dependency>
<groupId>org.ehcache</groupId>
<artifactId>ehcache-transactions</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jcache</artifactId>
</dependency>
<dependency>
<groupId>com.google.code.simple-spring-memcached</groupId>
<artifactId>xmemcached-provider</artifactId>
<version>${simple-spring-memcached.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.simple-spring-memcached</groupId>
<artifactId>spring-cache</artifactId>
<version>${simple-spring-memcached.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.xmemcached</groupId>
<artifactId>xmemcached</artifactId>
<version>${xmemcached.version}</version>
</dependency>
<dependency>
<groupId>com.microsoft.sqlserver</groupId>
<artifactId>mssql-jdbc</artifactId>
<version>${mssql.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>${springdoc-openapi-ui.version}</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-spring</artifactId>
<version>${shedlock.version}</version>
</dependency>
<dependency>
<groupId>net.javacrumbs.shedlock</groupId>
<artifactId>shedlock-provider-jdbc-template</artifactId>
<version>${shedlock.jdbc.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-afterburner</artifactId>
<version>${jackson-modules-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson-modules-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.module</groupId>
<artifactId>jackson-module-mrbean</artifactId>
<version>${jackson-modules-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback.contrib</groupId>
<artifactId>logback-json-classic</artifactId>
<version>${logback.contrib.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback.contrib</groupId>
<artifactId>logback-jackson</artifactId>
<version>${logback.contrib.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
<version>${jackson-modules-version}</version>
</dependency>
<!-- testing dependencies -->
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>mockwebserver</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>junit-jupiter</artifactId>
<version>${testcontainers-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-launcher</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>mssqlserver</artifactId>
<version>${testcontainers-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testcontainers</groupId>
<artifactId>kafka</artifactId>
<version>${testcontainers-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka-test</artifactId>
<version>${spring-kafka-test.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.11</artifactId>
</exclusion>
</exclusions>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>${kafka.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.apache.kafka</groupId>
<artifactId>kafka_2.13</artifactId>
<version>${kafka.version}</version>
<classifier>test</classifier>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.avro</groupId>
<artifactId>avro-maven-plugin</artifactId>
<version>1.8.2</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>schema</goal>
</goals>
<configuration>
<sourceDirectory>${project.basedir}/src/main/resources/avro</sourceDirectory>
<outputDirectory>${project.basedir}/src/main/java/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<argLine>#{argLine} ${jvm.options}</argLine>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>${maven.chekstyle.version}</version>
<executions>
<execution>
<goals>
<goal>check</goal>
</goals>
<configuration>
<configLocation>checkstyle/checkstyle.rules.xml</configLocation>
<suppressionsLocation>checkstyle/checkstyle-suppressions.xml</suppressionsLocation>
<includeTestSourceDirectory>false</includeTestSourceDirectory>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<excludes>${checkstyle.excludes}</excludes>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<id>jacoco-initialize</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>jacoco-site</id>
<phase>package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin.version}</version>
<configuration>
<localCheckout>true</localCheckout>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dockerdev</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<packaging.type>jar</packaging.type>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>package</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>${dockerfile-maven-plugin.version}</version>
<configuration>
<repository>ims/${project.artifactId}</repository>
<pullNewerImage>false</pullNewerImage>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Try using this: With the version changed if you use SpringToolSuite4, forcing the Update Maven Project should work: Project > Update Maven Project > Force Update of Snapshots/Releases

Caused by: java.lang.NoClassDefFoundError: org/springframework/data/convert/CustomConversions

I am using MongoDB 4.2 and trying to upgrade my spring boot version from 1.5.9.RELEASE to 2.0.3.RELEASE.
The maven surefire plugin version is 2.22.0.
I am getting following error while doing maven clean install -U,
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
at java.lang.Class.getMethod0(Class.java:3018)
at java.lang.Class.getMethod(Class.java:1784)
at org.apache.maven.surefire.util.ReflectionUtils.tryGetMethod(ReflectionUtils.java:60)
at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isSuiteOnly(JUnit3TestChecker.java:66)
at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.isValidJUnit3Test(JUnit3TestChecker.java:61)
at org.apache.maven.surefire.common.junit3.JUnit3TestChecker.accept(JUnit3TestChecker.java:56)
at org.apache.maven.surefire.common.junit4.JUnit4TestChecker.accept(JUnit4TestChecker.java:53)
at org.apache.maven.surefire.util.DefaultScanResult.applyFilter(DefaultScanResult.java:102)
at org.apache.maven.surefire.junit4.JUnit4Provider.scanClassPath(JUnit4Provider.java:309)
at org.apache.maven.surefire.junit4.JUnit4Provider.setTestsToRun(JUnit4Provider.java:189)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:132)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
Caused by: java.lang.ClassNotFoundException: org.springframework.data.convert.CustomConversions
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 18 more
I am guessing about compatibility issues. Any hints?
NOTE : The issue is when executing test cases. The CustomConversions class seems to be not available resuting in the issue.
The pom.xml is as follows,
<?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>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
</parent>
<groupId>*********</groupId>
<artifactId>*********</artifactId>
<packaging>pom</packaging>
<version>*********</version>
<name>${project.groupId}-${project.artifactId}</name>
<prerequisites>
<maven>3.0.0</maven>
</prerequisites>
<modules>
<module>*</module>
<module>*</module>
</modules>
<distributionManagement>
<repository>
<id>>******</</id>
<name>>******</</name>
<url>localhost</url>
</repository>
<snapshotRepository>
<id>******</id>
<name>******</name>
<url>loaclhost</url>
</snapshotRepository>
</distributionManagement>
<properties>
<xmlbeans-version>2.2.0</xmlbeans-version>
<freemarker-version>2.3.21</freemarker-version>
<maven-surefire-plugin-version>2.22.0</maven-surefire-plugin-version>
<maven.project.artifactId>${project.artifactId}</maven.project.artifactId>
<commons-validator-version>1.5.0</commons-validator-version>
<maven-site-plugin-version>3.4</maven-site-plugin-version>
<maven-source-plugin-version>2.4</maven-source-plugin-version>
<maven-compiler-plugin-version>3.3</maven-compiler-plugin-version>
<slf4j-version>1.7.10</slf4j-version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.project.groupId>${project.groupId}</maven.project.groupId>
<lombok.version>1.16.18</lombok.version>
<maven-resources-plugin-version>2.7</maven-resources-plugin-version>
<apache-tika-core-version>1.5</apache-tika-core-version>
<logback-core-version>1.2.3</logback-core-version>
<dozer-version>5.5.1</dozer-version>
<json-version>20160810</json-version>
<commons-io-version>2.4</commons-io-version>
<maven-release-plugin-version>2.5.1</maven-release-plugin-version>
<dom4j-version>1.6.1</dom4j-version>
<poi-version>3.10.1</poi-version>
<commons-lang3-version>3.3.2</commons-lang3-version>
<commons-collections4>4.1</commons-collections4>
<jackson-version>2.6.0</jackson-version>
<hamcrest-version>1.3</hamcrest-version>
<junit-version>4.12</junit-version>
<maven-clean-plugin-version>2.6.1</maven-clean-plugin-version>
<jacoco-maven-plugin-version>0.7.4.201502262128</jacoco-maven-plugin-version>
<commons-fileupload-version>1.3.1</commons-fileupload-version>
<javax.inject-version>1</javax.inject-version>
<jta-api-jboss-version>1.0.0.Final</jta-api-jboss-version>
<mockito-version>1.9.5</mockito-version>
<source-code-level>1.8</source-code-level>
<javax-validation-version>2.0.1.Final</javax-validation-version>
<maven-deploy-plugin-version>2.8.2</maven-deploy-plugin-version>
<httpcomponent.version>4.3.6</httpcomponent.version>
<maven-javadoc-plugin-version>2.10.1</maven-javadoc-plugin-version>
<maven-install-plugin-version>2.5.2</maven-install-plugin-version>
<maven.project.version>${project.version}</maven.project.version>
<maven-shade-plugin-version>2.4.1</maven-shade-plugin-version>
<mongobee-version>0.10</mongobee-version>
<joda-time-version>2.7</joda-time-version>
<google-guava-version>18.0</google-guava-version>
<bcprov-jdk15on-version>1.54</bcprov-jdk15on-version>
<maven-jar-plugin-version>2.5</maven-jar-plugin-version>
<fongo-version>2.0.6</fongo-version>
<timestamp>${maven.build.timestamp}</timestamp>
<maven.build.timestamp.format>yyyy-MM-dd HH:mm:ss</maven.build.timestamp.format>
<commons-net-version>3.6</commons-net-version>
<mock-ftp-server>2.3</mock-ftp-server>
<spring-cloud.version>Finchley.RELEASE</spring-cloud.version>
<common-plugin.version>0.0.1</common-plugin.version>
<java-string-similarity-version>1.1.0</java-string-similarity-version>
<feign-form>2.2.0</feign-form>
<tomakehurst-wiremock>2.5.1</tomakehurst-wiremock>
<spring-webmvc>4.3.13.RELEASE</spring-webmvc>
<spring-rabbit-version>1.5.0.RELEASE</spring-rabbit-version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>2.0.3.RELEASE</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
<version>2.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-properties-migrator</artifactId>
</dependency>
<dependency>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
<version>${commons-validator-version}</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>${bcprov-jdk15on-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>net.sf.dozer</groupId>
<artifactId>dozer</artifactId>
<version>${dozer-version}</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>${freemarker-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${logback-core-version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback-core-version}</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>${javax.inject-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j-version}</version>
</dependency>
<dependency>
<groupId>org.apache.tika</groupId>
<artifactId>tika-core</artifactId>
<version>${apache-tika-core-version}</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>${commons-io-version}</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>${commons-fileupload-version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson-version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>${commons-lang3-version}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>${commons-collections4}</version>
</dependency>
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
<version>${joda-time-version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>${google-guava-version}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava-testlib</artifactId>
<version>${google-guava-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<version>${hamcrest-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>${hamcrest-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>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
<version>${jta-api-jboss-version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>${poi-version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>${poi-version}</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>${poi-version}</version>
</dependency>
<dependency>
<groupId>xmlbeans</groupId>
<artifactId>xbean</artifactId>
<version>${xmlbeans-version}</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>${dom4j-version}</version>
</dependency>
<dependency>
<groupId>com.github.fakemongo</groupId>
<artifactId>fongo</artifactId>
<version>${fongo-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpcomponent.version}</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>${httpcomponent.version}</version>
</dependency>
<dependency>
<groupId>com.github.mongobee</groupId>
<artifactId>mongobee</artifactId>
<version>${mongobee-version}</version>
<exclusions>
<exclusion>
<artifactId>mongo-java-driver</artifactId>
<groupId>org.mongodb</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>1.13.7.RELEASE</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>${commons-net-version}</version>
</dependency>
<dependency>
<groupId>org.mockftpserver</groupId>
<artifactId>MockFtpServer</artifactId>
<version>${mock-ftp-server}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>${javax-validation-version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>info.debatty</groupId>
<artifactId>java-string-similarity</artifactId>
<version>${java-string-similarity-version}</version>
</dependency>
<dependency>
<groupId>io.github.openfeign.form</groupId>
<artifactId>feign-form</artifactId>
<version>${feign-form}</version>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>${tomakehurst-wiremock}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
<version>1.1.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit</artifactId>
<version>${spring-rabbit-version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-shade-plugin</artifactId>
<version>${maven-shade-plugin-version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources/</schemaDirectory>
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
<clearOutputDir>false</clearOutputDir>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin-version}</version>
<configuration>
<source>${source-code-level}</source>
<target>${source-code-level}</target>
<compilerArgument>-Xlint:all</compilerArgument>
</configuration>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>${maven-source-plugin-version}</version>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin-version}</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin-version}</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin-version}</version>
<configuration>
<includes>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
<excludes>
<exclude>**/Abstract*.java</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>${maven-site-plugin-version}</version>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin-version}</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin-version}</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>${maven-install-plugin-version}</version>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>${maven-deploy-plugin-version}</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>${maven-release-plugin-version}</version>
<configuration>
<checkModificationExcludes>
<checkModificationExclude>client-java-sdk/dependency-reduced-pom.xml</checkModificationExclude>
</checkModificationExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco-maven-plugin-version}</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
What version of spring-data-mongodb are you using? I assume that the newer version of spring boot is not backward compatible with spring-data-mongodb.
Seems like you might be missing a needed dependency. Could you try to add this to your pom and see if it helps?
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>2.3.0.RELEASE</version>
</dependency>
If one is stuck with spring-boot version 1.x then as mentioned in other answers - Spring Data 2.x is not compatible with Spring Boot 1.x then we need to update the configuration like below
public #Bean MongoDbFactory mongoDbFactory() throws UnknownHostException {
MongoClientURI mongoClientURI = new MongoClientURI(uri);
return new SimpleMongoDbFactory(mongoClientURI);
}
Have tested this with spring boot 1.5.6.RELEASE
and spring-data-mongodb version 1.5.22.RELEASE
refer spring data docs for more.

Java -jar main-jar.jar throwing "Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger" [duplicate]

This question already has answers here:
Why am I getting a NoClassDefFoundError in Java?
(31 answers)
How can I solve "java.lang.NoClassDefFoundError"?
(34 answers)
Closed 5 years ago.
xml its throwing different errors when I am trying to execute like"java -jar main-jar.jar UAT"it is throwing error logger error(Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logger).
And also find the logger java file line number.
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/log4j/Logg
er
at com.middleoffice.webservices.DriverScript.<clinit>(DriverScript.java:
47)
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 1 more
<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>com.MOAPITestAutomation1.com</groupId>
<artifactId>ODHESTestAutomation</artifactId>
<version>0.0.1-SNAPSHOT</version>
<properties>
<jar_path>${basedir}\lib\</jar_path>
<exec_dir>C:\Users\XBBNK9F\MO-Automation-APITest-V1-Execution\</exec_dir>
<output_dir>${basedir}\BUILD\</output_dir>
</properties>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<classpathPrefix>ODHESTestAutomation_lib/</classpathPrefix>
<mainClass>com.middleoffice.webservices.DriverScript</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>auto-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
<configuration>
<filesets>
<fileset>
<directory>BUILD</directory>
<includes>
<include>**/*</include>
</includes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<executions>
<execution>
<id>copy-resources</id>
<!--here the phase you need-->
<phase>initialize</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${output_dir}</outputDirectory>
<resources>
<resource>
<directory>${exec_dir}ext</directory>
<targetPath>${output_dir}ext</targetPath>
<filtering>true</filtering>
</resource>
<resource>
<directory>${exec_dir}InputData</directory>
<targetPath>${output_dir}InputData</targetPath>
<filtering>true</filtering>
</resource>
<resource>
<directory>${basedir}\target</directory>
<targetPath>${output_dir}TestOutputFiles</targetPath>
<includes>
<include>*.jar</include>
<filtering>true</filtering>
</includes>
</resource>
<resource>
<directory>${basedir}</directory>
<targetPath>${output_dir}</targetPath>
<includes>
<include>log4j.properties</include>
<filtering>true</filtering>
</includes>
</resource>
<resource>
<directory>${exec_dir}</directory>
<targetPath>${output_dir}</targetPath>
<includes>
<include>Execute.Bat</include>
<filtering>true</filtering>
</includes>
</resource>
</resources>
</configuration>
</execution>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${output_dir}\ODHESTestAutomation_lib</outputDirectory>
<resources>
<resource>
<directory>lib</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>install:com.oracle:ojdbc6:11g</id>
<phase>test</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<file>${jar_path}ojdbc14.jar</file>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>14</version>
<packaging>jar</packaging>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib-nodep</artifactId>
<version>3.2.4</version>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>com.ibm.mq</artifactId>
<version>5.3.07</version>
</dependency>
<dependency>
<groupId>net.sourceforge.cssparser</groupId>
<artifactId>cssparser</artifactId>
<version>0.9.22</version>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpmime</artifactId>
<version>4.5.3</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.3</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.54</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.python</groupId>
<artifactId>jython</artifactId>
<version>2.5.0</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>poi</groupId>
<artifactId>poi</artifactId>
<version>3.14</version>
<scope>system</scope>
<systemPath>${jar_path}poi-3.14.jar</systemPath>
</dependency>
<dependency>
<groupId>poi-3.8-sources</groupId>
<artifactId>poi-3.8-sources</artifactId>
<version>3.8</version>
<scope>system</scope>
<systemPath>${jar_path}poi-3.8-sources.jar</systemPath>
</dependency>
<dependency>
<groupId>poi-ooxml3.14</groupId>
<artifactId>poi-ooxml3.14</artifactId>
<version>3.14</version>
<scope>system</scope>
<systemPath>${jar_path}poi-ooxml-3.14.jar</systemPath>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.5-beta5</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml-schemas</artifactId>
<version>3.14</version>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>selenium-java</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
<scope>system</scope>
<systemPath>${jar_path}selenium-java-3.4.0.jar</systemPath>
</dependency>
<dependency>
<groupId>selenium-ie-driver</groupId>
<artifactId>selenium-ie-driver</artifactId>
<version>3.4.0</version>
<scope>system</scope>
<systemPath>${jar_path}selenium-ie-driver-3.4.0.jar</systemPath>
</dependency>
<dependency>
<groupId>selenium-support</groupId>
<artifactId>selenium-support</artifactId>
<version>3.4.0</version>
<scope>system</scope>
<systemPath>${jar_path}selenium-support-3.4.0.jar</systemPath>
</dependency>
<dependency>
<groupId>selenium-chrome-driver</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.4.0</version>
<scope>system</scope>
<systemPath>${jar_path}selenium-chrome-driver-3.4.0.jar</systemPath>
</dependency>
<dependency>
<groupId>selenium-server-standalone</groupId>
<artifactId>selenium-server-standalone</artifactId>
<version>3.4.0</version>
<scope>system</scope>
<systemPath>${jar_path}selenium-server-standalone-3.4.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>14</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.4</version>
<scope>system</scope>
<systemPath>${jar_path}commons-discovery-0.4.jar</systemPath>
</dependency>
<dependency>
<groupId>rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>2.3.2</version>
<scope>system</scope>
<systemPath>${jar_path}rest-assured-2.3.2.jar</systemPath>
</dependency>
<dependency>
<groupId>jackson-databind</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.3</version>
<scope>system</scope>
<systemPath>${jar_path}jackson-databind-2.8.3.jar</systemPath>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>javax.jms</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${jar_path}javax.jms.jar</systemPath>
</dependency>
<dependency>
<groupId>opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>3.9</version>
<scope>system</scope>
<systemPath>${jar_path}opencsv-3.9.jar</systemPath>
</dependency>
<dependency>
<groupId>jira-rest-java-client-core</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>4.0.0</version>
<scope>system</scope>
<systemPath>${jar_path}jira-rest-java-client-core-4.0.0.jar</systemPath>
</dependency>
<dependency>
<groupId>jython</groupId>
<artifactId>jython</artifactId>
<version>2.5.0</version>
<scope>system</scope>
<systemPath>${jar_path}jython-2.5.0.jar</systemPath>
</dependency>
<dependency>
<groupId>confluence</groupId>
<artifactId>confluence</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${jar_path}confluence-1.0.0.jar</systemPath>
</dependency>
<dependency>
<groupId>confluence-api</groupId>
<artifactId>confluence-api</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${jar_path}confluence-api-1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.ibm</groupId>
<artifactId>com.ibm.mqjms</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${jar_path}com.ibm.mqjms.jar</systemPath>
</dependency>
<dependency>
<groupId>xmlbeans-2.3.0</groupId>
<artifactId>xmlbeans</artifactId>
<version>2.3.0</version>
<scope>system</scope>
<systemPath>${jar_path}xmlbeans-2.3.0.jar</systemPath>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javax</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${jar_path}javax.jar</systemPath>
</dependency>
<dependency>
<groupId>jaxrpc-api</groupId>
<artifactId>jaxrpc-api</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${jar_path}jaxrpc-api.jar</systemPath>
</dependency>
<dependency>
<groupId>javax.resource</groupId>
<artifactId>javax.resource</artifactId>
<version>1</version>
<scope>system</scope>
<systemPath>${jar_path}javax.resource.jar</systemPath>
</dependency>
<dependency>
<groupId>javax.servlet-api</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>system</scope>
<systemPath>${jar_path}javax.servlet-api-3.1.0.jar</systemPath>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
<scope>system</scope>
<systemPath>${jar_path}commons-io-2.5.jar</systemPath>
</dependency>
<dependency>
<groupId>websocket-common</groupId>
<artifactId>websocket-common</artifactId>
<version>9.4.3.v20170317</version>
<scope>system</scope>
<systemPath>${jar_path}websocket-common-9.4.3.v20170317.jar</systemPath>
</dependency>
<dependency>
<groupId>jetty-http</groupId>
<artifactId>jetty-http</artifactId>
<version>9.4.3.v20170317</version>
<scope>system</scope>
<systemPath>${jar_path}jetty-http-9.4.3.v20170317.jar</systemPath>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.5.1</version>
<scope>system</scope>
<systemPath>${jar_path}wsdl4j-1.5.1.jar</systemPath>
</dependency>
<dependency>
<groupId>jetty-io</groupId>
<artifactId>jetty-io</artifactId>
<version>9.4.1.v20170120</version>
<scope>system</scope>
<systemPath>${jar_path}jetty-io-9.4.1.v20170120.jar</systemPath>
</dependency>
<dependency>
<groupId>neko-htmlunit</groupId>
<artifactId>neko-htmlunit</artifactId>
<version>2.25</version>
<scope>system</scope>
<systemPath>${jar_path}neko-htmlunit-2.25.jar</systemPath>
</dependency>
<dependency>
<groupId>tagsoup</groupId>
<artifactId>tagsoup</artifactId>
<version>1.2.1</version>
<scope>system</scope>
<systemPath>${jar_path}tagsoup-1.2.1.jar</systemPath>
</dependency>
<dependency>
<groupId>slf4j-api</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.6</version>
<scope>system</scope>
<systemPath>${jar_path}slf4j-api-1.7.6.jar</systemPath>
</dependency>
<dependency>
<groupId>websocket-api</groupId>
<artifactId>websocket-api</artifactId>
<version>9.4.3.v20170317</version>
<scope>system</scope>
<systemPath>${jar_path}websocket-api-9.4.3.v20170317.jar</systemPath>
</dependency>
<dependency>
<groupId>websocket-client</groupId>
<artifactId>websocket-client</artifactId>
<version>9.4.3.v20170317</version>
<scope>system</scope>
<systemPath>${jar_path}websocket-client-9.4.3.v20170317.jar</systemPath>
</dependency>
<dependency>
<groupId>stax-api</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
<scope>system</scope>
<systemPath>${jar_path}stax-api-1.0.1.jar</systemPath>
</dependency>
<dependency>
<groupId>sac</groupId>
<artifactId>sac</artifactId>
<version>1.3</version>
<scope>system</scope>
<systemPath>${jar_path}sac-1.3.jar</systemPath>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-edge-driver</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-ie-driver</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-opera-driver</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-safari-driver</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>2.7.2</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<dependency>
<groupId>com.atlassian.confluence.plugins</groupId>
<artifactId>confluence-api</artifactId>
<version>5.9.1-issue-CONF-38693-m2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>0.9.29</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>21.0</version>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-http</artifactId>
<version>9.4.3.v20170317</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-io</artifactId>
<version>9.4.1.v20170120</version>
</dependency>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.5</version>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit-core-js</artifactId>
<version>2.26</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-json</artifactId>
<version>2.3.2</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-xml</artifactId>
<version>2.4.4</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.26</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>htmlunit-driver</artifactId>
<version>2.26</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.8.3</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-exec</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>1.3</version>
<!-- <scope>test</scope> -->
</dependency>
<dependency>
<groupId>com.codeborne</groupId>
<artifactId>phantomjsdriver</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>1.2</version>
</dependency>
</dependencies>
</project>
You have many log4j dependencies with different version:
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.9.0</version>
</dependency>
All you need is one log4j. You can leave only apache log4j-api and log4j-core.
Try this:
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>${log4j2.version}</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>${log4j2.version}</version>
</dependency>
Hope this helps!

Issue with generating Serenity reports with Appium and Jbehave

I am new to Serenity and JBehave and I am facing issues in generating reports with Serenity. Please find below my POM.xml file.
I am getting blank reports and results.csv file also doesn't show any information about the ran tests, however, we are getting results in Jbehave's report.
4.0.0
SmokeTest
SmokeTest
0.0.1-SNAPSHOT
<properties>
<serenity.version>1.2.2</serenity.version>
</properties>
<dependencies>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>2.1.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.freemarker/freemarker -->
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.25-incubating</version>
</dependency>
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.4</version>
</dependency>
<!-- http://mvnrepository.com/artifact/com.relevantcodes/extentreports -->
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.0</version>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity-dep</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.52.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.0</version>
</dependency>
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-core</artifactId>
<version>4.0.5</version>
</dependency>
<dependency>
<groupId>org.jbehave</groupId>
<artifactId>jbehave-gherkin</artifactId>
<version>4.0.5</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>jbehave-junit-runner</artifactId>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-junit</artifactId>
<version>${serenity.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-jbehave</artifactId>
<version>1.20.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-core</artifactId>
<version>${serenity.version}</version>
<exclusions>
<exclusion>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>net.serenity-bdd</groupId>
<artifactId>serenity-rest-assured</artifactId>
<version>${serenity.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-all</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>1.7.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.15-beta2</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<includes>
<include>/ONE20SmokeTest/src/test/java/*/*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.shared</groupId>
<artifactId>maven-filtering</artifactId>
<version>1.3</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>net.serenity-bdd.maven.plugins</groupId>
<artifactId>serenity-maven-plugin</artifactId>
<version>1.0.6</version>
<dependencies>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-utils</artifactId>
<version>3.0.15</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>serenity-reports</id>
<phase>post-integration-test</phase>
<goals>
<goal>aggregate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
I think this is an issue with the Surefire/Failsafe configuration, and no tests are actually being run: see http://maven.apache.org/surefire/maven-failsafe-plugin/examples/inclusion-exclusion.html and http://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html

Compiling nativetoascii maven plugin

When i m compiling my project, i got those problem:
Failed to execute goal org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1:native2ascii (default) on project ViewController: Execution default of goal org.codehaus.mojo:native2ascii-maven-plugin:1.0-alpha-1:native2ascii failed: Error starting Sun's native2ascii: sun.tools.native2ascii.Main -> [Help 1]
using netbeans 7.2 and jdk 1.7.07 , but!! if i using jdk 1.6 it works!
How can i compile this when im using jdk 1.7 ??
Tnx for HELP!!
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>
<groupId>${project.parent.groupId}</groupId>
<artifactId>ViewController</artifactId>
<packaging>war</packaging>
<version>${project.parent.version}</version>
<name>ViewController</name>
<url>${project.parent.url}</url>
<organization>
<name>kMicro</name>
</organization>
<parent>
<groupId>com.km.eFarmer</groupId>
<artifactId>eFarmer</artifactId>
<version>1.0.1-alpha1-SNAPSHOT</version>
</parent>
<dependencies>
<dependency>
<groupId>org.glassfish.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>DataModel</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>SOAPClient</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.cache</groupId>
<artifactId>jbosscache-core</artifactId>
<version>3.2.7.GA</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-common-core</artifactId>
<version>2.2.14.GA</version>
</dependency>
<dependency>
<groupId>jgroups</groupId>
<artifactId>jgroups</artifactId>
<version>2.6.13.GA</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>8.4-701.jdbc4</version>
<scope>test</scope>
</dependency>
<!--dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-openid</artifactId>
<version>3.0.2.RELEASE</version>
<scope>compile</scope>
</dependency-->
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
<version>2.0.3-FCS</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.0.3-FCS</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.openfaces</groupId>
<artifactId>openfaces</artifactId>
<version>3.0.2-KM</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces-mobile</artifactId>
<version>0.9.3</version>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>redmond</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.7.0</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>cssparser</groupId>
<artifactId>cssparser</artifactId>
<version>0.9.5</version>
</dependency>
<dependency>
<groupId>milyn</groupId>
<artifactId>sac</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>jfree</groupId>
<artifactId>jcommon</artifactId>
<version>1.0.16</version>
</dependency>
<dependency>
<groupId>jexcelapi</groupId>
<artifactId>jxl</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>it.eng.spago</groupId>
<artifactId>sbi-utils</artifactId>
<version>3.3.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jettison</groupId>
<artifactId>jettison</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.9</version>
</dependency>
</dependencies>
<build>
<plugins>
<!--plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
<version>1.0-alpha-1</version>
<configuration>
<dest>${project.build.directory}/classes</dest>
<src>src/main/resources/locale</src>
</configuration>
<executions>
<execution>
<goals>
<goal>native2ascii</goal>
</goals>
<configuration>
<encoding>UTF8</encoding>
</configuration>
</execution>
</executions>
</plugin-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jasperreports-maven-plugin</artifactId>
<configuration>
<compiler>net.sf.jasperreports.compilers.JRGroovyCompiler</compiler>
<sourceDirectory>src/main/resources/jasperReportSources</sourceDirectory>
<outputDirectory>src/main/webapp/reports</outputDirectory>
<xmlValidation>true</xmlValidation>
</configuration>
<executions>
<execution>
<goals>
<goal>compile-reports</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.7.5</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1-alpha-1</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude>resources/**</exclude>
</excludes>
</resource>
<resource>
<directory>src/main/resources/font</directory>
</resource>
</resources>
</build>
<properties>
<netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
<jdk.version>1.6</jdk.version>
</properties>
Update the version of the native2ascii-maven-plugin to the newest version.
adding this works for me:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>native2ascii-maven-plugin</artifactId>
...
<!-- added for java 7 compilation -->
<dependencies>
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies> ...

Resources