I am building a website using Spring MVC. Now I am trying to deploy the project using Docker. By deploying the jar file.
I have try this in my terminal:
sudo docker build -t springmvc:1.0 .
And this is the result:
Sending build context to Docker daemon 44.25MB
Step 1/3 : FROM java:8
---> d23bdf5b1b1b
Step 2/3 : COPY mavenspringmvc.jar /home/mavenspringmvc.jar
---> Using cache
---> d82a8a4083b2
Step 3/3 : CMD ["java", "-jar", "/home/mavenspringmvc.jar"]
---> Using cache
---> 280a69737e48
Successfully built 280a69737e48
Successfully tagged springmvc:1.0
And this is the content of Dockerfile:
FROM java:8
COPY mavenspringmvc.jar /home/mavenspringmvc.jar
CMD ["java", "-jar", "/home/mavenspringmvc.jar"]
I tried this syntax:
sudo docker run -it -p8080:8080 springmvc:1.0
And the error appeared:
no main manifest attribute, in /home/mavenspringmvc.jar
This is my pom.xml file:
<?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>com.converter</groupId>
<artifactId>maven-springmvc</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>maven-springmvc Maven Webapp</name>
<!-- FIXME change it to the project's website -->
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<java-version>1.7</java-version>
<org.springframework-version>4.1.1.RELEASE</org.springframework-version>
</properties>
<dependencies>
<!--dependency-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.21</version>
</dependency>
<!--j2ee, servlet、jsp、jstl-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!--mysql-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.35</version>
</dependency>
<!--springframework-->
<!-- Spring Framework -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.0.4.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.0.4.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-orm -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>5.0.7.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.hibernate/hibernate-core -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.3.2.Final</version>
</dependency>
<!--apache.commons-->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.4</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<!--Servlet-Api -->
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.0</version>
<scope>provided</scope>
</dependency>
<!--additional for uplaod-->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>javax.servlet.jsp-api</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
</dependency>
<!-- File Upload Dependencies -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.8.4</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
</dependencies>
<build>
<finalName>maven-springmvc</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>8</source>
<target>8</target>
</configuration>
</plugin>
<plugin>
<!-- Build an executable JAR -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.converter</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>1.2.5.RELEASE</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
<execution>
<id>docker-build</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<!--Said that the java directory under the relevant xml file, properties file compile / package when placed in the resource directory-->
<resource>
<directory>${basedir}/src/main/java</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
</resource>
<resource>
<directory>${basedir}/src/main/resources</directory>
</resource>
</resources>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!--Servlet container jetty plugin-->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>9.3.10.v20160621</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>false</executable>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
The question is how to solve this problem? So that, I can deploy the project using Docker?
Related
``
<?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>############<</groupId>
<artifactId>############</artifactId>
<version>1.0.16-SNAPSHOT</version>
<name>############</name>
<properties>
<!--Plugin Config-->
<allure.html.report.output>${project.basedir}/target/results/allure-html</allure.html.report.output>
<allure.json.results.output>${project.basedir}/allure-results</allure.json.results.output>
<slf4j.version>2.0.3</slf4j.version>
<logback.version>1.4.4</logback.version>
<selenium.version>4.5.3</selenium.version>
<testng.version>7.5</testng.version>
<assertj.version>3.23.1</assertj.version>
<wdm.version>5.1.0</wdm.version>
<awaitility.version>4.2.0</awaitility.version>
<browsermob.version>2.1.5</browsermob.version>
<zapclient.version>1.10.0</zapclient.version>
<axel.version>4.4.2</axel.version>
<javafaker.version>1.0.2</javafaker.version>
<extentreports.version>5.0.9</extentreports.version>
<allure.version>2.19.0</allure.version>
<allure-maven.version>2.11.2</allure-maven.version>
<cucumber.version>7.9.0</cucumber.version>
<java-client.version>8.2.0</java-client.version>
<rest-assured.version>5.2.0</rest-assured.version>
<lombok.version>1.18.24</lombok.version>
<selenium-support.version>4.5.3</selenium-support.version>
<webdrivermanager.version>5.3.0</webdrivermanager.version>
<selenium-chrome-driver.version>4.5.3</selenium-chrome-driver.version>
<maven-clean-plugin.version>3.2.0</maven-clean-plugin.version>
<maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
<maven-compiler-plugin.version>3.10.1</maven-compiler-plugin.version>
<maven-cucumber-reporting.version>7.9.0</maven-cucumber-reporting.version>
<maven-jar-plugin.version>3.2.2</maven-jar-plugin.version>
<maven-install-plugin.version>2.5.2</maven-install-plugin.version>
<maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
<maven-site-plugin.version>3.12.0</maven-site-plugin.version>
<maven-project-info-reports-plugin.version>3.3.0</maven-project-info-reports-plugin.version>
<maven-surefire-plugin.version>3.0.0-M7</maven-surefire-plugin.version>
<java.version>17</java.version>
<maven.compiler.target>${java.version}</maven.compiler.target>
<maven.compiler.source>${java.version}</maven.compiler.source>
<spotless-maven-plugin.version>2.22.8</spotless-maven-plugin.version>
<browserstack-local-java.version>1.0.6</browserstack-local-java.version>
<project.encondig>UTF-8</project.encondig>
<project.build.sourceEncoding>${project.encondig}</project.build.sourceEncoding>
<project.reporting.outputEncoding>${project.encondig}</project.reporting.outputEncoding>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<commons-codec.version>1.15</commons-codec.version>
<aspectj.version>1.9.7</aspectj.version>
</properties>
<profiles>
<!-- Vendor profiles-->
<profile>
<id>browserstack</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testrunner/AdminTestng.xml</suiteXmlFile>
</suiteXmlFiles>
<systemProperties>
<property>
<name>cucumber.plugin</name>
<value>json:target/cucumber.json,io.qameta.allure.cucumber5jvm.AllureCucumber5Jvm</value>
</property>
<property>
<name>cucumber.filter.tags</name>
<value>#test</value>
</property>
</systemProperties>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${logback.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>${assertj.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-grid</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.awaitility</groupId>
<artifactId>awaitility</artifactId>
<version>${awaitility.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.lightbody.bmp</groupId>
<artifactId>browsermob-core</artifactId>
<version>${browsermob.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.zaproxy</groupId>
<artifactId>zap-clientapi</artifactId>
<version>${zapclient.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.deque.html.axe-core</groupId>
<artifactId>selenium</artifactId>
<version>${axel.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.javafaker</groupId>
<artifactId>javafaker</artifactId>
<version>${javafaker.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>${extentreports.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>${java-client.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>*</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<version>${rest-assured.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>${selenium-support.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>${webdrivermanager.version}</version>
<exclusions>
<exclusion>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>com.browserstack</groupId>
<artifactId>browserstack-local-java</artifactId>
<version>${browserstack-local-java.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>${selenium-chrome-driver.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-testng</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-core</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>${cucumber.version}</version>
</dependency>
<!-- jackson-databind: Work around for security vulnerability on io.github.bonigarcia:webdrivermanager#5.2.0 (current latest) -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.14.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/io.cucumber/datatable -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>datatable</artifactId>
<version>7.9.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jdk8 -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jdk8</artifactId>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-cucumber5-jvm</artifactId>
<version>2.20.1</version>
<exclusions>
<exclusion>
<groupId>io.cucumber</groupId>
<artifactId>gherkin</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-spring</artifactId>
<version>${cucumber.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>6.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>6.0.0</version>
</dependency>
</dependencies>
<build>
<pluginManagement><!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
<!-- clean lifecycle, see https://maven.apache.org/ref/current/maven-core/lifecycles.html#clean_Lifecycle -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>${maven-clean-plugin.version}</version>
</plugin>
<!-- default lifecycle, jar packaging: see https://maven.apache.org/ref/current/maven-core/default-bindings.html#Plugin_bindings_for_jar_packaging -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>${maven-resources-plugin.version}</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<release>${java.version}</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>3.0.0-M7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.4.1</version>
</plugin>
<!-- Source code linting using Spotless -->
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>${spotless-maven-plugin.version}</version>
<configuration>
<java>
<removeUnusedImports/>
<googleJavaFormat>
<style>GOOGLE</style>
<reflowLongStrings>true</reflowLongStrings> <!-- optional (requires at least 1.8) -->
<!-- optional: custom group artifact (you probably don't need this) -->
<groupArtifact>com.google.googlejavaformat:google-java-format</groupArtifact>
</googleJavaFormat>
</java>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<executions>
<execution>
<id>test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<threadCount>4</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
<forkCount>4</forkCount>
<reuseForks>false</reuseForks>
<argLine>-Duser.language=en</argLine>
<argLine>-Xmx1024m</argLine>
<argLine>-XX:MaxPermSize=256m</argLine>
<argLine>-Dfile.encoding=UTF-8</argLine>
<useFile>false</useFile>
<testFailureIgnore>false</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
-Dcucumber.options="--plugin io.qameta.allure.cucumber5jvm.AllureCucumber5Jvm"
</argLine>
</configuration>
</execution>
<execution>
<id>cucumberJsonParser</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<threadCount>1</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
<forkCount>1</forkCount>
<reuseForks>false</reuseForks>
<useFile>false</useFile>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.6.0</version>
<configuration>
<mainClass>com.test.automation.cucumber.allure.Beautify</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>io.qameta.allure</groupId>
<artifactId>allure-maven</artifactId>
<version>2.10.0</version>
<configuration>
<reportVersion>2.10.0</reportVersion>
</configuration>
</plugin>
<plugin>
<groupId>net.masterthought</groupId>
<artifactId>maven-cucumber-reporting</artifactId>
<version>${maven-cucumber-reporting.version}</version>
<executions>
<execution>
<id>execution</id>
<phase>verify</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<skip>true</skip>
<projectName>cucumbertests</projectName>
<checkBuildResult>false</checkBuildResult>
<outputDirectory>target/report</outputDirectory>
<jsonFiles>
<param>cucumber.json</param>
</jsonFiles>
<!--enableFlashCharts>false</enableFlashCharts-->
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
``
I am running my cucumber selenium project with mvn clean test -P <profile_name>
When I run the test I get the below error:
[ERROR] TestRunner>AbstractTestNGCucumberTests.setUpClass:27 ? Cucumber java.lang.NoClassDefFoundError: gherkin/ParserException
I have attached my dependency tree pic and also attached the gherkin/parserexception class in my libraries
I am running my cucumber selenium project with mvn clean test -P <profile_name>
When I run the test I get the below error:
[ERROR] TestRunner>AbstractTestNGCucumberTests.setUpClass:27 ? Cucumber java.lang.NoClassDefFoundError: gherkin/ParserException
I have attached my dependency tree pic and also attached the gherkin/parserexception class in my libraries
Thanks os much for your time in reaidng my question and trying to attempt Mr. M.P. Korstanje
I managed to come over the problem. I have changed the cucumber versin to 7 and allurecucumberjvm version to 7 as well and luckily dont get the error any more. Though I get a stepdef error message as below which i will try to solve.
threw exception with message: Input must be set
Thanks again for your time
I am trying to execute an open source apache project
i am stopped at an error
Error:(34, 37) java: package org.springframework.jdbc.core does not exist
I tried to load this library but could not find it anywhere
I checked this link
Can't import org.springframework.jdbc.core with maven
they talk about another libarary spring-jdbc !!
where can i find the needed library
I have been working on this for 5 days and no luck
POM.xml
<?xml version="1.0" encoding="UTF-8"?>
<!--
http://www.apache.org/licenses/LICENSE-2.0
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes</artifactId>
<version>4.0.0</version>
<packaging>pom</packaging>
<name>Apache cTAKES</name>
<url>http://ctakes.apache.org</url>
<inceptionYear>2012</inceptionYear>
<scm>
<!-- In child modules, Maven will append ${artifactId} to the following
URLs -->
<connection>scm:svn:https://svn.apache.org/repos/asf/ctakes/tags/ctakes-4.0.0-rc3</connection>
<developerConnection>scm:svn:https://svn.apache.org/repos/asf/ctakes/tags/ctakes-4.0.0-rc3</developerConnection>
<url>https://svn.apache.org/repos/asf/ctakes/tags/ctakes-4.0.0-rc3</url>
</scm>
<issueManagement>
<system>jira</system>
<url>https://issues.apache.org/jira/browse/ctakes</url>
</issueManagement>
<ciManagement>
<system>jenkins</system>
<url>https://builds.apache.org/job/ctakes-trunk/</url>
</ciManagement>
<mailingLists>
<mailingList>
<name>Apache cTAKES Users</name>
<subscribe>user-subscribe#ctakes.apache.org</subscribe>
<unsubscribe>user-unsubscribe#ctakes.apache.org</unsubscribe>
<post>user#ctakes.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/ctakes-user/</archive>
</mailingList>
<mailingList>
<name>Apache cTAKES Developers</name>
<subscribe>dev-subscribe#ctakes.apache.org</subscribe>
<unsubscribe>dev-unsubscribe#ctakes.apache.org</unsubscribe>
<post>dev#ctakes.apache.org</post>
<archive>http://mail-archives.apache.org/mod_mbox/ctakes-dev/</archive>
</mailingList>
<mailingList>
<name>Apache cTAKES Commits</name>
<subscribe>commits-subscribe#ctakes.apache.org</subscribe>
<unsubscribe>commits-unsubscribe#ctakes.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/ctakes-commits/</archive>
</mailingList>
<mailingList>
<name>Apache cTAKES Notifications</name>
<subscribe>notifications-subscribe#ctakes.apache.org</subscribe>
<unsubscribe>notifications-unsubscribe#ctakes.apache.org</unsubscribe>
<archive>http://mail-archives.apache.org/mod_mbox/ctakes-notifications/</archive>
</mailingList>
</mailingLists>
<properties>
<ctakes.version>4.0.0</ctakes.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<parent>
<groupId>org.apache</groupId>
<artifactId>apache</artifactId>
<version>13</version>
</parent>
<modules>
<module>ctakes-gui</module>
<module>ctakes-gui-res</module>
<module>ctakes-utils</module>
<module>ctakes-core</module>
<module>ctakes-type-system</module>
<module>ctakes-pos-tagger</module>
<module>ctakes-chunker</module>
<module>ctakes-preprocessor</module>
<module>ctakes-dictionary-lookup</module>
<module>ctakes-context-tokenizer</module>
<module>ctakes-lvg</module>
<module>ctakes-ne-contexts</module>
<module>ctakes-constituency-parser</module>
<module>ctakes-coreference</module>
<module>ctakes-drug-ner</module>
<module>ctakes-side-effect</module>
<module>ctakes-smoking-status</module>
<module>ctakes-dependency-parser</module>
<module>ctakes-relation-extractor</module>
<module>ctakes-assertion</module>
<module>ctakes-assertion-zoner</module>
<module>ctakes-temporal</module>
<module>ctakes-clinical-pipeline</module>
<module>ctakes-clinical-pipeline-res</module>
<module>ctakes-distribution</module>
<module>ctakes-regression-test</module>
<module>ctakes-assertion-res</module>
<module>ctakes-chunker-res</module>
<module>ctakes-constituency-parser-res</module>
<module>ctakes-core-res</module>
<module>ctakes-coreference-res</module>
<module>ctakes-dependency-parser-res</module>
<module>ctakes-dictionary-lookup-res</module>
<module>ctakes-lvg-res</module>
<module>ctakes-pos-tagger-res</module>
<module>ctakes-relation-extractor-res</module>
<module>ctakes-side-effect-res</module>
<module>ctakes-smoking-status-res</module>
<module>ctakes-temporal-res</module>
<module>ctakes-assertion-zoner-res</module>
<module>ctakes-drug-ner-res</module>
<module>ctakes-ne-contexts-res</module>
<module>ctakes-template-filler</module>
<module>ctakes-examples</module>
<module>ctakes-examples-res</module>
<module>ctakes-ytex-res</module>
<module>ctakes-ytex</module>
<module>ctakes-ytex-uima</module>
<module>ctakes-ytex-web</module>
<module>ctakes-dictionary-lookup-fast</module>
<module>ctakes-dictionary-lookup-fast-res</module>
</modules>
<dependencyManagement>
<dependencies>
<!-- cTAKES third party dependency versions -->
<!-- <dependency> <groupId>jama</groupId> <artifactId>jama</artifactId>
<version>1.0.2</version> </dependency> -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.2.0.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-jdbc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.2.1.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun/tools -->
<dependency>
<groupId>com.sun</groupId>
<artifactId>tools</artifactId>
<version>1.5.0</version>
<scope>system</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- There is an xml=apis 2.0 in maven central, but it is pom only, therefore broken. -->
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.11.0</version>
</dependency>
<!-- TODO : Remove jdom and refactor code to jdom2 -->
<dependency>
<groupId>jdom</groupId>
<artifactId>jdom</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.apache.opennlp</groupId>
<artifactId>opennlp-maxent</artifactId>
<version>3.0.3</version>
</dependency>
<!--<dependency>-->
<!--<groupId>org.apache.uima</groupId>-->
<!--<artifactId>uimaj-examples</artifactId>-->
<!--<version>2.9.0</version>-->
<!--</dependency>-->
<dependency>
<groupId>tw.edu.ntu.csie</groupId>
<artifactId>libsvm</artifactId>
<version>3.1</version>
</dependency>
<!-- import a consistent set of versions for all ClearTK modules -->
<dependency>
<groupId>org.cleartk</groupId>
<artifactId>cleartk</artifactId>
<version>2.0.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
<version>2.0.16</version>
</dependency>
<dependency>
<groupId>com.lexicalscope.jewelcli</groupId>
<artifactId>jewelcli</artifactId>
<version>0.8.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>10.0</version>
</dependency>
<dependency>
<groupId>com.carrotsearch</groupId>
<artifactId>hppc</artifactId>
<version>0.4.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.1.2.RELEASE</version>
</dependency>
<dependency>
<groupId>edu.mit.findstruct</groupId>
<artifactId>structmulti</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>edu.mit.findstruct</groupId>
<artifactId>findstructapi</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>com.googlecode.armbrust-file-utils</groupId>
<artifactId>sqlwrapper</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>net.sourceforge.openai</groupId>
<artifactId>openaifsm</artifactId>
<version>0.0.1</version>
</dependency>
<dependency>
<groupId>gov.nih.nlm.nls.lvg</groupId>
<artifactId>lvgdist</artifactId>
<version>2016.0</version>
</dependency>
<dependency>
<groupId>com.googlecode.clearnlp</groupId>
<artifactId>clearnlp</artifactId>
<version>1.3.1</version>
</dependency>
<!-- cTAKES module versions -->
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-gui</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-gui-res</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-examples</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-examples-res</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-type-system</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-utils</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-core</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-core-res</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-dictionary-lookup</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-dictionary-lookup-res</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-dictionary-lookup-fast</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-dictionary-lookup-fast-res</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>ctakes-preprocessor</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-assertion-res
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-assertion-zoner
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-assertion-zoner-res
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-constituency-parser
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-constituency-parser-res
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-relation-extractor
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-relation-extractor-res
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-temporal
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-temporal-res
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-ytex-res
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-ytex
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-ytex-uima
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-ytex-web
</artifactId>
<version>${ctakes.version}</version>
</dependency>
<dependency>
<groupId>org.apache.ctakes</groupId>
<artifactId>
ctakes-distribution
</artifactId>
<version>${ctakes.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<!-- It's good practice to explicitly declare versions for all plugins -->
<pluginManagement>
<plugins>
<plugin>
<groupId>com.mycila.maven-license-plugin</groupId>
<artifactId>maven-license-plugin</artifactId>
<version>1.9.0</version>
<configuration>
<header>ctakes-distribution/src/main/config/license_header.txt</header>
<excludes>
<!-- We're disabling .txt files for now because some Annotators may
not be able to handle standard comments in text files. This may break name
values pairs such as stopWords.txt -->
<exclude>**.txt</exclude>
</excludes>
<useDefaultMapping>false</useDefaultMapping>
<quiet>false</quiet>
<failIfMissing>false</failIfMissing>
<mapping>
<java>JAVADOC_STYLE</java>
<groovy>JAVADOC_STYLE</groovy>
<js>JAVADOC_STYLE</js>
<css>JAVADOC_STYLE</css>
<xml>XML_STYLE</xml>
<dtd>XML_STYLE</dtd>
<xsd>XML_STYLE</xsd>
<html>XML_STYLE</html>
<htm>XML_STYLE</htm>
<xsl>XML_STYLE</xsl>
<fml>XML_STYLE</fml>
<apt>DOUBLETILDE_STYLE</apt>
<properties>SCRIPT_STYLE</properties>
<sh>SCRIPT_STYLE</sh>
<!-- <txt>TEXT</txt> -->
<bat>BATCH</bat>
<cmd>BATCH</cmd>
<sql>DOUBLEDASHES_STYLE</sql>
<jsp>DYNASCRIPT_STYLE</jsp>
<ftl>FTL</ftl>
<xhtml>XML_STYLE</xhtml>
<vm>SHARPSTAR_STYLE</vm>
<jspx>XML_STYLE</jspx>
</mapping>
<properties>
<owner>Apache Software Foundation</owner>
<year>${project.inceptionYear}</year>
<email>dev#ctakes.apache.org</email>
</properties>
<strictCheck>true</strictCheck>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.4.1</version>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.4</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArgument>-Xlint</compilerArgument>
</configuration>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.4</version>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.3.1</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<includes>
<!-- Resources will be copied by the assembly
No need for it to be inside the jar
<include>**/*.class</include>
<include>**/types/*.xml</include>
<include>**/META-INF/**</include>
-->
</includes>
</configuration>
</plugin>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.3</version>
<configuration>
<useReleaseProfile>false</useReleaseProfile>
<goals>deploy</goals>
<arguments>-Papache-release -DskipTests</arguments>
<mavenExecutorId>forked-path</mavenExecutorId>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.1</version>
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
</plugin>
<!-- Maven expects tests to start or end with "Test", not "Tests", so
explicitly include files ending in "Tests" -->
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.1</version>
<configuration>
<includes>
<include>**/Test*.java</include>
<include>**/*Test.java</include>
<include>**/*Tests.java</include>
<include>**/*TestCase.java</include>
</includes>
<argLine>-Xmx3g</argLine>
<forkedProcessTimeoutInSeconds>900</forkedProcessTimeoutInSeconds>
<additionalClasspathElements>
<additionalClasspathElement>ctakes-assertion-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-assertion-zoner-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-chunker-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-clinical-pipeline-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-constituency-parser-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-core-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-coreference-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-dependency-parser-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-dictionary-lookup-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-drug-ner-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-lvg-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-ne-contexts-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-pos-tagger-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-relation-extractor-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-side-effect-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-smoking-status-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-temporal-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-ytex-res/src/main/resources</additionalClasspathElement>
<additionalClasspathElement>ctakes-dictionary-lookup-fast-res/src/main/resources</additionalClasspathElement>
</additionalClasspathElements>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.rat</groupId>
<artifactId>apache-rat-plugin</artifactId>
<version>0.8</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
<id>default-cli</id>
</execution>
</executions>
<configuration>
<excludes>
<!-- File generated by maven-release-plugin -->
<exclude>release.properties</exclude>
<!-- Eclipse launch files -->
<exclude>**/*.launch</exclude>
<!-- Exclude target and eclipse files
The default RAT ignoreEclipse doesn't work
if there is a submodule that is commented out
So excluding it explictly here -->
<exclude>**/.classpath</exclude>
<exclude>**/.project</exclude>
<exclude>**/.settings/**</exclude>
<exclude>**/target/**</exclude>
<exclude>**/MANIFEST.MF</exclude>
<!-- Exclude bin/model resources -->
<exclude>**/resources/models/**</exclude>
<exclude>**/src/main/resources/**</exclude>
<exclude>**/src/test/resources/**</exclude>
<exclude>**/META-INF/org.uimafit/types.txt</exclude>
<!-- Exclude test data files -->
<exclude>**/data/test/**</exclude>
<exclude>**/data/**</exclude>
<exclude>**/output/**</exclude>
<exclude>**/sample_note.txt</exclude>
</excludes>
<numUnapprovedLicenses>0</numUnapprovedLicenses>
</configuration>
</plugin>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<!--
This is needed to execute/unpack resources in m2e eclipse ide
Currently used in the ctakes-dictionary-lookup project
-->
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<versionRange>2.8</versionRange>
<goals>
<goal>unpack-dependencies</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute>
<runOnIncremental>true</runOnIncremental>
</execute>
</action>
</pluginExecution>
<pluginExecution>
<!--
Ignore the Maven remote resources plugin in Eclipse. We don't use it from Eclipse,
and it causes a warning if m2e is not configured to ignore it as below.
-->
<pluginExecutionFilter>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-remote-resources-plugin</artifactId>
<versionRange>[1.0.0,)</versionRange>
<goals>
<goal>process</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>disable-java8-doclint</id>
<activation>
<jdk>[1.8,)</jdk>
</activation>
<properties>
<additionalparam>-Xdoclint:none</additionalparam>
</properties>
</profile>
</profiles>
</project>
You required the RowMapper for your use. So, It persists inside the "Spring-jdbc" Jar.
You have to import this jar into your pom.xml. When IDE automatically downloaded the jar, it will be visible in your code.
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.2.1.RELEASE</version>
</dependency>
</dependencies>
RowMapper Github path:
https://github.com/spring-projects/spring-framework/blob/master/spring-jdbc/src/main/java/org/springframework/jdbc/core/RowMapper.java
Other Versions:
https://mvnrepository.com/artifact/org.springframework/spring-jdbc/5.2.1.RELEASE
Dependency Management allows to consolidate and centralize the management of dependency versions without adding dependencies which are inherited by all children.
My tests work fine on local machine, but when I try run it in circleCI it fails with this:
My circle.yml:
machine:
java:
version: oraclejdk8
test:
override:
- mvn integration-test
post:
- mkdir -p $CIRCLE_TEST_REPORTS/junit/
- find . -type f -regex ".*/target/surefire-reports/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
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>
<groupId>hellogwt</groupId>
<artifactId>hellogwt</artifactId>
<version>1.0</version>
<packaging>war</packaging>
<properties>
<spring.version>4.2.4.RELEASE</spring.version>
<hibernate.version>4.3.6.Final</hibernate.version>
<gwt.version>2.5.0</gwt.version>
<log4j.version>1.2.17</log4j.version>
<jbcrybt.version>0.3m</jbcrybt.version>
<postgres.version>9.4-1201-jdbc41</postgres.version>
<junit.version>4.12</junit.version>
<gwt.test.version>0.44</gwt.test.version>
<mockito.version>1.10.19</mockito.version>
<webAppDirectory>src/main/webapp/</webAppDirectory>
<appache.commons.version>3.4</appache.commons.version>
</properties>
<dependencies>
<!-- Spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spring4gwt</groupId>
<artifactId>spring4gwt</artifactId>
<version>0.0.1</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/spring4gwt-0.0.1.jar</systemPath>
</dependency>
<!--Hibernate-->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!--DataBase-->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>${postgres.version}</version>
</dependency>
<!--GWT-->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwt.version}</version>
<scope>provided</scope>
</dependency>
<!--Log-->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<!--Crypt-->
<dependency>
<groupId>org.mindrot</groupId>
<artifactId>jbcrypt</artifactId>
<version>${jbcrybt.version}</version>
</dependency>
<!--WelcomePhrase-->
<dependency>
<groupId>welcome</groupId>
<artifactId>task</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/webapp/WEB-INF/lib/task-1.0-SNAPSHOT.jar</systemPath>
</dependency>
<!--Tests-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.googlecode.gwt-test-utils</groupId>
<artifactId>gwt-test-utils</artifactId>
<version>${gwt.test.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>hellogwt</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<warSourceExcludes>.gwt-tmp/**</warSourceExcludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.5.0</version>
<executions>
<execution>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>**/WelcomeWebAppTest.java</includes>
<mode>htmlunit</mode>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.6</version>
<configuration>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.sourceDirectory}</additionalClasspathElement>
<additionalClasspathElement>${project.build.testSourceDirectory}</additionalClasspathElement>
</additionalClasspathElements>
<useManifestOnlyJar>false</useManifestOnlyJar>
<forkMode>always</forkMode>
<systemProperties>
<property>
<name>gwt.args</name>
<value>-out \${webAppDirectory}</value>
</property>
</systemProperties>
</configuration>
</plugin>
<!-- Tomcat plugin -->
<plugin>
<groupId>org.apache.tomcat.maven</groupId>
<artifactId>tomcat7-maven-plugin</artifactId>
<configuration>
<server>TomcatServer</server>
<url>http://localhost:8080/manager</url>
<username>tomcat</username>
<password>tomcat</password>
<path>/hellogwt</path>
</configuration>
</plugin>
</plugins>
</build>
</project>
I think, that my classpath is wrong, or something else, but I don't know how to configure it in circle.yml
I will be glad of any help.
I just import this project to my local eclipse and I get this error message:
Project build error: Non-resolvable parent POM: Failure to transfer
eu.ohim:esearch-parent:pom:1.8.0-RC2.1 from
http://f5dmzprodf03.oami.europa.eu/nexus/content/groups/public/ was
cached in the local repository, resolution will not be reattempted
until the update interval of nexus-releases has elapsed or updates are
forced. Original error: Could not transfer artifact
eu.ohim:esearch-parent:pom:1.8.0-RC2.1 from/to nexus-releases
(http://f5dmzprodf03.oami.europa.eu/nexus/content/groups/public/):
Connection reset and 'parent.relativePath' points at wrong local POM
This is my POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>eu.ohim.copla</groupId>
<artifactId>copla-selenium</artifactId>
<name>copla-selenium</name>
<version>1.0.0</version>
<parent>
<groupId>eu.ohim</groupId>
<artifactId>esearch-parent</artifactId>
<version>1.8.0-RC2.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<packaging>jar</packaging>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jboss.version>7.1.1.Final</jboss.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<encoding>UTF-8</encoding>
<nonFilteredFileExtensions>
<nonFilteredFileExtension>zip</nonFilteredFileExtension>
<nonFilteredFileExtension>mp3</nonFilteredFileExtension>
<nonFilteredFileExtension>jpg</nonFilteredFileExtension>
<nonFilteredFileExtension>png</nonFilteredFileExtension>
</nonFilteredFileExtensions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>src/main/assembly/shade.xml</descriptor>
<descriptor>src/main/assembly/delivery-test.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<executions>
<execution>
<id>default-clean</id>
<configuration>
<excludeDefaultDirectories>true</excludeDefaultDirectories>
<filesets>
<fileset>
<directory>target</directory>
<excludes>
<exclude>failsafe-reports/**/*.*</exclude>
</excludes>
<followSymlinks>false</followSymlinks>
</fileset>
</filesets>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>eu.ohim.fsp.ext</groupId>
<artifactId>FspDomain</artifactId>
<version>2.1.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.41.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>4.1.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-integration</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8.5</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils-core</artifactId>
<version>1.8.3</version>
</dependency>
<dependency>
<groupId>commons-dbutils</groupId>
<artifactId>commons-dbutils</artifactId>
<version>1.5</version>
</dependency>
<dependency>
<groupId>com.nitorcreations</groupId>
<artifactId>matchers</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>commons-jxpath</groupId>
<artifactId>commons-jxpath</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>org.freemarker</groupId>
<artifactId>freemarker</artifactId>
<version>2.3.18</version>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.informix</groupId>
<artifactId>ifxjdbc_10</artifactId>
<version>10</version>
</dependency>
<dependency>
<artifactId>solr-solrj</artifactId>
<groupId>org.apache.solr</groupId>
<version>1.4.1</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!-- needed for Bamboo -->
<id>integration-test</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefirePluginVersion}</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/bin/testng-qc-sanity-regression.xml</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- needed for Bamboo -->
<id>deploy-tomcat</id>
</profile>
</profiles>
</project>
Any idea of what I am missing? Thanks
I think you need the parent artifact also:
<parent>
<groupId>eu.ohim</groupId>
<artifactId>esearch-parent</artifactId>
<version>1.8.0-RC2.1</version>
<relativePath>../pom.xml</relativePath>
</parent>
I an having the following when trying to run a simple test (no real assertions yet) using Eclipse, Spring and JUnit. Here is what it complains about:
java.lang.NoSuchMethodError: org.springframework.beans.BeanUtils.instantiateClass(Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/Object;
I have found a similar issue on StackOverflow here:
Spring JUnit Test Error
So, I supposed the problem was due to spring dependencies mismatch. However, it doesn't seem to work for me. Basically, if I understand it right what that link says the solution is, is to declare explicitly the version of my spring dependencies on the pom file, which I am doing (I am declaring all dependencies to have 3.1.x versions).
When I look at ~/m2, I can find these prior-to-3.1 dependencies installed, even when I remove them all and run maven build again:
./spring-aop/3.0.4.RELEASE
./spring-aop/3.0.7.RELEASE
./spring-asm/3.0.4.RELEASE
./spring-asm/3.0.7.RELEASE
./spring-beans/3.0.4.RELEASE
./spring-beans/3.0.7.RELEASE
./spring-context/3.0.4.RELEASE
./spring-context/3.0.7.RELEASE
./spring-core/3.0.4.RELEASE
./spring-core/3.0.7.RELEASE
./spring-expression/3.0.4.RELEASE
./spring-expression/3.0.7.RELEASE
./spring-jdbc/3.0.7.RELEASE
./spring-parent/3.0.4.RELEASE
./spring-parent/3.0.7.RELEASE
./spring-tx/3.0.7.RELEASE
./spring-web/3.0.4.RELEASE
./spring-web/3.0.7.RELEASE
I don't have anything with these version numbers on my pom file so something is clearly calling them. Is there a way to make sure these are not installed? Or, if they need to be there because they are dependencies from other deps, how can I make sure my test context doesnt use those but 3.1 instead?
This is what I am trying to run:
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.sample.persistence.manager.ProfileManager;
#RunWith(SpringJUnit4ClassRunner.class)
#ContextConfiguration(classes={ JpaTestConfig.class, TestConfig.class })
public class ProfileManagerTest {
#Autowired
private ProfileManager profileManager;
#Test
public void testCreateAndRetrieve() {
}
}
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>com.sample</groupId>
<artifactId>common</artifactId>
<version>0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>common</name>
<parent>
<groupId>com.sample</groupId>
<artifactId>ws-parent</artifactId>
<version>0.1-SNAPSHOT</version>
<relativePath>..</relativePath>
</parent>
<properties>
<spring.security.version>3.1.3.RELEASE</spring.security.version>
<spring.framework.version>3.1.1.RELEASE</spring.framework.version>
<hibernate.version>3.6.0.Final</hibernate.version>
<commons-dbcp.version>1.2.2</commons-dbcp.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-asm</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-parent</artifactId>
<version>3.1.1.RELEASE</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-oxm-tiger</artifactId>
<version>1.5.4</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.security.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>com.relayrides</groupId>
<artifactId>pushy</artifactId>
<version>0.1.1</version>
</dependency>
<dependency>
<groupId>org.versly</groupId>
<artifactId>versly-wsdoc</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.4.2.1</version>
</dependency>
<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-ehcache</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!--
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>${javax.persistence.version}</version>
</dependency>
-->
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>${commons-dbcp.version}</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.5</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.8.3</version>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>jsr250-api</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.8.4</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.10</version>
</dependency>
</dependencies>
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/sertificates</directory>
</resource>
</resources>
<filters>
<filter>../${build.profile}.properties</filter>
</filters>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.5.7.201204190339</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>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>1.3.6</version>
<configuration>
<outputDiagnostics>true</outputDiagnostics>
<processors>
<processor>org.versly.rest.wsdoc.AnnotationProcessor</processor>
</processors>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>process</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.versly</groupId>
<artifactId>versly-wsdoc</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2</version>
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>java</goal>
</goals>
<configuration>
<mainClass>org.versly.rest.wsdoc.RestDocAssembler</mainClass>
<arguments>
<argument>${project.build.directory}/classes</argument>
</arguments>
</configuration>
</execution>
</executions>
</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>
<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.jacoco</groupId>
<artifactId>
jacoco-maven-plugin
</artifactId>
<versionRange>
[0.5.7.201204190339,)
</versionRange>
<goals>
<goal>prepare-agent</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore></ignore>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
Try excluding
spring-aop, spring-beans, spring-context, spring-core, spring-expression, spring-jdbc and spring-tx
from the spring security dependencies.
Spring Security 3.1.3 has dependencies to all the aforementioned spring jars for version 3.0.7.RELEASE
More details on how to add exclusions here: How to handle sub projects dependencies in Maven