Error when running GWT in intellij - maven

I am trying to run a GWT on a Tomcat server my build framework is Maven. However I keep getting the following error
java: Unable to find RequestFactory built-in type. Is requestfactory-[client|server].jar on the classpath?
Any idea why this is happening?
Thanks

Reading this error, it seems a lib is missing. Check if request-factory-server is in your pom.xml and if your config is okay.
I am also working with maven and GWT-requestfactory. Here is a sample of my working maven config:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<!-- -->
</parent>
<artifactId>docentryeditor</artifactId>
<packaging>war</packaging>
<name>doc-entry-editor</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion>
<webappDirectory>${project.build.directory}/${project.build.finalName}</webappDirectory>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>gwt-maven</id>
<url>http://gwt-maven.googlecode.com/svn/trunk/mavenrepo/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.web.bindery</groupId>
<artifactId>requestfactory-server</artifactId>
<version>${gwtVersion}</version>
</dependency>
<dependency>
<groupId>com.google.web.bindery</groupId>
<artifactId>requestfactory-apt</artifactId>
<version>${gwtVersion}</version>
</dependency>
<dependency>
<groupId>aopalliance</groupId>
<artifactId>aopalliance</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>com.google.gwt.inject</groupId>
<artifactId>gin</artifactId>
<version>1.5.0</version>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-assistedinject</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>4.1.0.Final</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>1.0.0.GA</version>
<classifier>sources</classifier>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
<build>
<finalName>docentryeditor</finalName>
<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>
<!-- Generate compiled stuff in the folder used for developing mode -->
<!--<outputDirectory>${webappDirectory}/WEB-INF/classes</outputDirectory>-->
<plugins>
<!-- GWT Maven Plugin-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwtVersion}</version>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
</dependency>
</dependencies>
<!-- JS is only needed in the package phase, this speeds up testing -->
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options,
see gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<!-- URL that should be automatically opened in the GWT shell (gwt:run). -->
<runTarget>XDS-MetadataEditor.html</runTarget>
<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->
<compileReport>true</compileReport>
<module>edu.tn.xds.metadata.editor</module>
<hostedWebapp>${webappDirectory}</hostedWebapp><!--makes file download work in dev mode-->
<logLevel>INFO</logLevel>
<style>${gwtVersion}</style>
<copyWebapp>true</copyWebapp>
</configuration>
</plugin>
<!-- Maven WAR plugin -->
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<!-- configured to be the same as for the gwt plugin -->
<webappDirectory>${webappDirectory}</webappDirectory>
</configuration>
<executions>
<execution>
<phase>compile</phase>
<goals>
<!-- create an exploded version of the war in webappDirectory. Ideal
for development -->
<goal>exploded</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.4.2</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>${webappDirectory}/WEB-INF/</outputDirectory>
<resources>
<resource>
<directory>src/main/webapp</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- RequestFactory Validation jar -->
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<annotationProcessors>
<annotationProcessor>com.google.web.bindery.requestfactory.apt.RfValidator</annotationProcessor>
</annotationProcessors>
</configuration>
<dependencies>
<dependency>
<groupId>com.google.web.bindery</groupId>
<artifactId>requestfactory-apt</artifactId>
<version>${gwtVersion}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings
only. It has no influence on the Maven build itself. -->
<pluginManagement>
<plugins>
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>org.codehaus.mojo</groupId>
<artifactId>
gwt-maven-plugin
</artifactId>
<versionRange>
[2.5.1,)
</versionRange>
<goals>
<goal>i18n</goal>
</goals>
</pluginExecutionFilter>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
If you have any question or if there is anything you don't understand don't hesitate.
Otherwise, if you really don't manage to do it, give me your maven config and I will have a look at it and try to tell you what is wrong.
Please note that my config doesn't have the tomcat config as I don't need it, but I really don't think this can be your problem.

Related

ClassCastException Issue with deploying spring boot war in WAS 8.5.5.16 but works in tomcat

When trying to deploy our spring boot war into the WAS 8.5.5.16 application server(aka) Websphere Application Server 8.5.5.16 is giving the following error
Caused by: java.lang.ClassCastException: org.apache.el.ExpressionFactoryImpl incompatible with javax.el.ExpressionFactory
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:210)
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:118)
at org.apache.jasper.runtime.JspApplicationContextImpl.<clinit>(JspApplicationContextImpl.java:65)
at org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:267)
at org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:62)
at org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:143)
at org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:111)
at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1736)
at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:415)
at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:171)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:904)
at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:789)
at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:427)
at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:719)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1211)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1462)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:641)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:1040)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:795)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$5.run(ApplicationMgrImpl.java:2279)
at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5572)
at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5698)
at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2284)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:436)
at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:379)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:127)
at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$CUInitializer.run(CompositionUnitMgrImpl.java:985)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:524)
My pom.xml is as follows
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.xxx.dart</groupId>
<artifactId>YYY</artifactId>
<version>2.0.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>ZZZ</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>
<properties>
<java.version>1.8</java.version>
<jjwt.version>0.9.1</jjwt.version>
<swagger.version>2.8.0</swagger.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>
<maven.build.timestamp.format>yyyy-MM-dd'T'HH-mm-ss'Z'</maven.build.timestamp.format>
<jacoco.version>0.8.1</jacoco.version>
<timestamp>${maven.build.timestamp}</timestamp>
<!-- jacoco plugin to run junit tests coverage -->
<jacoco.version>0.8.6</jacoco.version>
<argLine>-Xmx1024m</argLine>
<sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
<sonar.coverage.jacoco.xmlReportPaths>${project.reporting.outputDirectory}/jacoco/jacoco.xml</sonar.coverage.jacoco.xmlReportPaths>
<sonar.language>java</sonar.language>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter-validation -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-aop</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
<exclusions>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
</exclusion>
<exclusion>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-devtools -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>3.0.0</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>org.apache.tomcat</groupId>
<artifactId>tomcat-jdbc</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8 -->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>21.3.0.0</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.jasypt</groupId>
<artifactId>jasypt</artifactId>
<version>1.9.2</version>
</dependency>
<dependency>
<groupId>com.github.ulisesbocchio</groupId>
<artifactId>jasypt-spring-boot-starter</artifactId>
<version>1.18</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-core</artifactId>
<version>2.7.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.ibm.websphere.appserver.api/com.ibm.websphere.appserver.api.basics -->
<!-- https://mvnrepository.com/artifact/commons-httpclient/commons-httpclient -->
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger-ui</artifactId>
<version>2.7.0</version>
</dependency>
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-swagger2</artifactId>
<version>2.7.0</version>
</dependency>
<!-- Test -->
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>prepare-package</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
<execution>
<id>post-unit-test</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
<configuration>
<!-- Sets the path to the file which contains the execution data. -->
<dataFile>target/jacoco.exec</dataFile>
<outputDirectory>target/jacoco</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
<executions>
<execution>
<goals>
<goal>build-info</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<webResources>
<resource>
<directory>${basedir}/src/webapp/lib</directory>
<targetPath>WEB-INF/lib</targetPath>
</resource>
</webResources>
</configuration>
</plugin>
<plugin>
<groupId>org.sonarsource.scanner.maven</groupId>
<artifactId>sonar-maven-plugin</artifactId>
<version>3.5.0.1254</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
<wtpversion>2.0</wtpversion>
<source>1.8</source>
<target>1.8</target>
<format>{yyyy-MM-dd'T'HH-mm-ss'Z'}</format>
<items>
<item>timestamp</item>
</items>
</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.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<versionRange>[2.5.2,)</versionRange>
<goals>
<goal>install-file</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.0</version>
<configuration>
<includes>
<include>**/*IT*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.22.0</version>
</plugin>
</plugins>
</pluginManagement>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<!--final name -->
<finalName>${project.artifactId}-${project.version}</finalName>
</build>
</project>
Few weeks back this configuration was working and we were able to deploy our app, but something happened and this is not working anymore. Key points
we are having parent last in the websphere
we are able to reproduce it in all environments ( though unfortunately it started in production)
We did recently migrate to open jdk ( with adopt ) though i am not sure whether thats causing this issue.
Any help is deeply appreciated. i believe this is because of some Websphere issue but not able to point it out exactly. if we can disable this jsf thats also fine as our front end is a angular application

MongoAutoConfiguration not working after excluding BatchAutoConfiguration

I am working on a spring-boot batch application which was working fine when its parent (pom.xml) was
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>1.5.9.RELEASE</version>
pom.xml before change
<?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>
<artifactId>project-artefact</artifactId>
<name>project-name</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.8.RELEASE</version>
</parent>
<properties>
<spring.batch.test.version>4.0.0.RELEASE</spring.batch.test.version>
<lombok.version>1.16.18</lombok.version>
<jaxb2.runtime.version>1.11.1</jaxb2.runtime.version>
<flapdoodle.embed.mongo.version>1.50.5</flapdoodle.embed.mongo.version>
<embedmongo-spring.version>RELEASE</embedmongo-spring.version>
<spock.version>1.1-groovy-2.4</spock.version>
<groovy.version>2.4.12</groovy.version>
<wiremock.version>2.12.0</wiremock.version>
<spring.spock.version>1.1-groovy-2.4</spring.spock.version>
<jacoco.version>0.8.0</jacoco.version>
<!-- Test coverage -->
<jacoco.outputDir>${project.build.directory}</jacoco.outputDir>
<!-- Unit test report path -->
<jacoco.out.ut.file>jacoco-ut.exec</jacoco.out.ut.file>
<jacoco.reportPath>${jacoco.outputDir}/${jacoco.out.ut.file}</jacoco.reportPath>
<!-- Integration test report path-->
<jacoco.out.it.file>jacoco-it.exec</jacoco.out.it.file>
<jacoco.itReportPath>${jacoco.outputDir}/${jacoco.out.it.file}</jacoco.itReportPath>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-test</artifactId>
<version>${spring.batch.test.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.jongo/jongo -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>${jaxb2.runtime.version}</version>
</dependency>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>${flapdoodle.embed.mongo.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cz.jirutka.spring</groupId>
<artifactId>embedmongo-spring</artifactId>
<version>${embedmongo-spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>${spock.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.spockframework/spock-spring -->
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-spring</artifactId>
<version>${spring.spock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
visit https://github.com/groovy/GMavenPlus/wiki -->
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<argLine>${surefireArgLine}</argLine>
<useFile>false</useFile>
<includes>
<include>**/*Spec.java</include>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources/xsd</schemaDirectory>
<generatePackage>some.package</generatePackage>
<generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
<extension>true</extension>
<args>
<arg>-no-header</arg>
<arg>-Xxew</arg>
<arg>-Xxew:instantiate lazy</arg>
<arg>-XtoString</arg>
<arg>-Xequals</arg>
<arg>-XhashCode</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.9.5</version>
</plugin>
<plugin>
<groupId>com.github.jaxb-xew-plugin</groupId>
<artifactId>jaxb-xew-plugin</artifactId>
<version>1.5</version>
</plugin>
</plugins>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<!-- Sets up jacaco for unit test coverage analysis (jacoco.agent.ut.arg) -->
<execution>
<id>prepare-ut-agent</id>
<phase>process-test-classes</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${jacoco.reportPath}</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
However, today I had to change the parent in pom.xml to use organisational's default parent being used for all other projects (These projects dont use Spring boot). Now, to overcome this I followed this and added spring-boot-dependencies in <dependencyManagement> tag of pom.xml.
New pom.xml after change:-
<?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>
<artifactId>project-artefact</artifactId>
<name>project-name</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<artifactId>parent</artifactId>
<groupId>some.group.id</groupId>
<version>1.0</version>
<relativePath>../relative-path</relativePath>
</parent>
<properties>
<spring.batch.test.version>4.0.0.RELEASE</spring.batch.test.version>
<lombok.version>1.16.18</lombok.version>
<jaxb2.runtime.version>1.11.1</jaxb2.runtime.version>
<flapdoodle.embed.mongo.version>1.50.5</flapdoodle.embed.mongo.version>
<embedmongo-spring.version>RELEASE</embedmongo-spring.version>
<spock.version>1.1-groovy-2.4</spock.version>
<groovy.version>2.4.12</groovy.version>
<wiremock.version>2.12.0</wiremock.version>
<spring.spock.version>1.1-groovy-2.4</spring.spock.version>
<jacoco.version>0.8.0</jacoco.version>
<!-- Test coverage -->
<jacoco.outputDir>${project.build.directory}</jacoco.outputDir>
<!-- Unit test report path -->
<jacoco.out.ut.file>jacoco-ut.exec</jacoco.out.ut.file>
<jacoco.reportPath>${jacoco.outputDir}/${jacoco.out.ut.file}</jacoco.reportPath>
<!-- Integration test report path-->
<jacoco.out.it.file>jacoco-it.exec</jacoco.out.it.file>
<jacoco.itReportPath>${jacoco.outputDir}/${jacoco.out.it.file}</jacoco.itReportPath>
<datamining.common.version>2017.12-SNAPSHOT</datamining.common.version>
<spring.boot.version>1.5.9.RELEASE</spring.boot.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
</dependency>
<dependency>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics-runtime</artifactId>
<version>${jaxb2.runtime.version}</version>
</dependency>
<dependency>
<groupId>de.flapdoodle.embed</groupId>
<artifactId>de.flapdoodle.embed.mongo</artifactId>
<version>${flapdoodle.embed.mongo.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>cz.jirutka.spring</groupId>
<artifactId>embedmongo-spring</artifactId>
<version>${embedmongo-spring.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.batch</groupId>
<artifactId>spring-batch-test</artifactId>
<version>${spring.batch.test.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-core</artifactId>
<version>${spock.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.codehaus.groovy/groovy-all -->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>${groovy.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.spockframework/spock-spring -->
<dependency>
<groupId>org.spockframework</groupId>
<artifactId>spock-spring</artifactId>
<version>${spring.spock.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<!-- The gmavenplus plugin is used to compile Groovy code. To learn more about this plugin,
visit https://github.com/groovy/GMavenPlus/wiki -->
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18.1</version>
<configuration>
<argLine>${surefireArgLine}</argLine>
<useFile>false</useFile>
<includes>
<include>**/*Spec.java</include>
<include>**/*Tests.java</include>
<include>**/*Test.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.13.1</version>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources/xsd</schemaDirectory>
<generatePackage>some.package</generatePackage>
<generateDirectory>${project.build.directory}/generated-sources</generateDirectory>
<extension>true</extension>
<args>
<arg>-no-header</arg>
<arg>-Xxew</arg>
<arg>-Xxew:instantiate lazy</arg>
<arg>-XtoString</arg>
<arg>-Xequals</arg>
<arg>-XhashCode</arg>
</args>
<plugins>
<plugin>
<groupId>org.jvnet.jaxb2_commons</groupId>
<artifactId>jaxb2-basics</artifactId>
<version>0.9.5</version>
</plugin>
<plugin>
<groupId>com.github.jaxb-xew-plugin</groupId>
<artifactId>jaxb-xew-plugin</artifactId>
<version>1.5</version>
</plugin>
</plugins>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>${jacoco.version}</version>
<executions>
<!-- Sets up jacaco for unit test coverage analysis (jacoco.agent.ut.arg) -->
<execution>
<id>prepare-ut-agent</id>
<phase>process-test-classes</phase>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<destFile>${jacoco.reportPath}</destFile>
<propertyName>surefireArgLine</propertyName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
This started giving me following error whenever I use to run the executable artefact jar prepared from mvn spring-boot:repackage
Parameter 0 of method basicBatchConfigurer in org.springframework.boot.autoconfigure.batch.BatchAutoConfiguration$JpaBatchConfiguration required a bean of type 'javax.sql.DataSource' that could not be found.
- Bean method 'dataSource' not loaded because #ConditionalOnProperty (spring.datasource.jndi-name) did not find property 'jndi-name'
- Bean method 'dataSource' not loaded because #ConditionalOnClass did not find required class 'javax.transaction.TransactionManager'
This made exclude BatchAutoConfiguration from #SpringBootApplication autoconfiguration exclusions, like this,
#SpringBootApplication(exclude = {DataSourceAutoConfiguration.class, BatchAutoConfiguration.class})
It makes the application start, but now I see except spring.data.mongodb.database in application.properties, none of the other mongoDB auto-configuration properties (spring.data.mongodb.*) gets picked up!
Could you please help how to resolve it?
I seem to have found the problem.
The initial problem of suddenly getting BatchAutoConfiguration$JpaBatchConfiguration require a DataSource was because of a local dependency I added in new pom.xml which brought in
javax.persistence.EntityManagerFactory
in the classpath.
This activated BatchAutoConfiguration.JpaBatchConfiguration which then needed a javax.sql.DataSource bean.
After excluding the dependency of javax.persistence the BatchAutoConfiguration issue goes away.
Now, MongoAutoConfiguration not being picked up, wasn't an issue and I am sorry I didn't dig in well. It was actually being picked up but the reason data wasn't being inserted in my mongoDB was an issue in my code sending no data to write to org.springframework.batch.item.data.MongoItemWriter.
I got my lesson (again!!) of not doing too many changes in code at one point of time ;)

How to extract maven multi-module project from existing simple project?

I would like to find out how to extract/refactor current maven project into maven-multimodule project, due to growth of the project.
Its Selenium, Java, Maven, Cucumber-JVM automation project.
For parallel runs we use cucumber-jvm-parallel-plugin (which in turn relies on maven-surefire-plugin) in POM.xml.
mvn clean verify -Dcucumber.options="--tags #ios_e2e,#android_e2e" -DtargetEnv="cloudStackEnv"
But for serial local run, I rely on pom-singleRunner.xml, which also has a maven-surefire-plugin to invoke Cucumber runner.
mvn -f pom-singleRunner.xml clean verify
Inevitably dependencies has got copied in both of above pom files.
Is there any easier way to consolidate this (maven multi-module structure)?
or refactor it in such a way that - common dependencies etc could be extracted at root pom.
** kindly notice that - although there are two poms but both of them point to same module(s), in slightly different way.
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>XYZ</groupId>
<artifactId>NativeAppsAutomation-project</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<surefire.fork.count>5</surefire.fork.count>
<jackson.version>2.7.0</jackson.version>
<selenium.java.version>3.7.1</selenium.java.version>
<!--<selenium.java.version>3.7.1</selenium.java.version>-->
<cucumber.extentsreport.version>3.0.1</cucumber.extentsreport.version>
<!--<appium.java-client.version>5.0.0-BETA4</appium.java-client.version>-->
<appium.java-client.version>5.0.4</appium.java-client.version>
<log4j.version>LATEST</log4j.version>
<cucumber-java.version>LATEST</cucumber-java.version>
<json-path.version>2.2.0</json-path.version>
<junit.version>LATEST</junit.version>
<cucumber-junit.version>LATEST</cucumber-junit.version>
<json-simple.version>1.1</json-simple.version>
<spring-context.version>4.3.6.RELEASE</spring-context.version>
<cucumber-spring.version>1.2.5</cucumber-spring.version>
<hamcrest-library.version>1.3</hamcrest-library.version>
<testng.version>6.8</testng.version>
<cucumber.jvm.parallel.version>4.1.0</cucumber.jvm.parallel.version>
<device.name>browserstack.ios</device.name>
<target.env>browserStackEnv</target.env>
</properties>
<profiles>
<profile>
<id>TestSuite1</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<app.config>//src//test//java//envConfig//localGridConfig.properties</app.config>
<test.tag>#albelli_android</test.tag>
<dummy.tag>#dummy</dummy.tag>
<device.name>browserstack.ios</device.name>
<!--<target.env>browserStackEnv</target.env>-->
</properties>
</profile>
</profile>
</profiles>
<build>
<!--<sourceDirectory>src</sourceDirectory>-->
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.20</version>
<configuration>
<parallel>methods</parallel>
<threadCount>5</threadCount>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<configuration>
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/Parallel*IT.class</include>
</includes>
<systemPropertyVariables>
<deviceName>${device.name}</deviceName>
<targetEnv>${target.env}</targetEnv>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>com.github.temyers</groupId>
<artifactId>cucumber-jvm-parallel-plugin</artifactId>
<version>4.2.0</version>
<executions>
<execution>
<id>generateRunners</id>
<phase>generate-test-sources</phase>
<!--<phase>validate</phase>-->
<goals>
<goal>generateRunners</goal>
</goals>
<configuration>
<!-- Mandatory -->
<!-- List of package names to scan for glue code. -->
<glue>
<package>stepDefs</package>
</glue>
<!-- These are optional, with the default values -->
<!-- Where to output the generated tests -->
<outputDirectory>${project.build.directory}/cucumber-parallel/html</outputDirectory>
<!--<outputDirectory>${project.build.directory}/generated-test-sources/cucumber</outputDirectory>-->
<!-- The directory, which must be in the root of the runtime classpath, containing your feature files. -->
<featuresDirectory>src/main/resources/features/</featuresDirectory>
<!-- Directory where the cucumber report files shall be written -->
<!--<cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>-->
<cucumberOutputDir>target/cucumber-parallel</cucumberOutputDir>
<!-- List of cucumber plugins. When none are provided the json formatter is used. For more
advanced usage see section about configuring cucumber plugins -->
<format>json,html,rerun</format>
<plugins>
<plugin>
<name>json</name>
<extension>json</extension>
<!--Optional output directory. Overrides cucumberOutputDirectory. Usefull when different
plugins create files with the same extension-->
<outputDirectory>${project.build.directory}/cucumber-parallel/json</outputDirectory>
</plugin>
<!--<plugin>-->
<!--<name>com.example.CustomHtmlFormatter</name>-->
<!--<extension>html</extension>-->
<!--</plugin>-->
<plugin>
<name>com.cucumber.listener.ExtentCucumberFormatter</name>
<extension>html</extension>
</plugin>
</plugins>
<customVmTemplate>
src/main/resources/cucumber-extents-report-runner.java.vm
</customVmTemplate>
<!-- CucumberOptions.strict property -->
<strict>true</strict>
<!-- CucumberOptions.monochrome property -->
<monochrome>true</monochrome>
<!-- The tags to run, maps to CucumberOptions.tags property. Default is no tags. -->
<tags>
<tag>
<!--${dummy.tag}-->
</tag>
</tags>
<!-- Generate TestNG runners instead of JUnit ones. -->
<useTestNG>false</useTestNG>
<!-- The naming scheme to use for the generated test classes. One of 'simple' or 'feature-title' -->
<namingScheme>simple</namingScheme>
<!-- The class naming pattern to use. Only required/used if naming scheme is 'pattern'.-->
<!--<namingPattern>**/Parallel*IT.class</namingPattern>-->
<namingPattern>Parallel{c}IT</namingPattern>
<!-- One of [SCENARIO, FEATURE]. SCENARIO generates one runner per scenario. FEATURE generates a runner per feature. -->
<!--<parallelScheme>SCENARIO</parallelScheme>-->
<parallelScheme>FEATURE</parallelScheme> <!--Using Feature for accomodating Scenario Outline -->
<!-- Specify a custom template for the generated sources (this is a path relative to the project base directory) -->
<!--<customVmTemplate>src/test/resources/cucumber-custom-runner.vm</customVmTemplate>-->
<!-- Specify a custom package name for generated sources. Default is no package.-->
<packageName>
</packageName>
</configuration>
</execution>
</executions>
</plugin>
<!-- Cucumber report merger
-->
<plugin>
<groupId>report.donut</groupId>
<artifactId>donut-maven-plugin</artifactId>
<version>0.0.6</version>
<executions>
<execution>
<id>execution</id>
<phase>post-integration-test</phase>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<sourceDirectory>${project.build.directory}/cucumber-parallel</sourceDirectory>
<outputDirectory>${project.build.directory}/TrackMergeReport</outputDirectory>
<timestamp>${maven.build.timestamp}</timestamp>
<template>default</template>
<projectName>NativeAppsAutomation</projectName>
<!-- optional -->
<customAttributes>
<customAttribute>
<name>App Name</name>
<!--<value>${app.name}</value>-->
<value>smartphone.editor.beta</value>
</customAttribute>
<customAttribute>
<name>Device Name</name>
<!--<value>${app.name}</value>-->
<value>${device.name}</value>
</customAttribute>
<customAttribute>
<name>Target Env</name>
<value>${target.env}</value>
</customAttribute>
</customAttributes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.github.fge</groupId>
<artifactId>json-schema-validator</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.java.version}</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>${appium.java-client.version}</version>
<!--<version>5.0.0-BETA5</version>-->
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber-java.version}</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.jayway.jsonpath/json-path -->
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>${json-path.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber-junit.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>${json-simple.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest-library.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId>
<version>${cucumber.extentsreport.version}</version>
</dependency>
<dependency>
<groupId>report.donut</groupId>
<artifactId>donut</artifactId>
<version>1.1</version>
</dependency>
</dependencies>
</project>
pom-SingleRunner.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>XYZ</groupId>
<artifactId>NativeAppsAutomation-project</artifactId>
<version>1.0-SNAPSHOT</version>[![enter image description here][2]][2]
<properties>
<surefire.fork.count>5</surefire.fork.count>
<jackson.version>2.7.0</jackson.version>
<selenium.java.version>3.7.1</selenium.java.version>
<!--<selenium.java.version>3.7.1</selenium.java.version>-->
<cucumber.extentsreport.version>3.0.1</cucumber.extentsreport.version>
<!--<appium.java-client.version>5.0.0-BETA4</appium.java-client.version>-->
<appium.java-client.version>5.0.4</appium.java-client.version>
<log4j.version>LATEST</log4j.version>
<cucumber-java.version>LATEST</cucumber-java.version>
<json-path.version>2.2.0</json-path.version>
<junit.version>LATEST</junit.version>
<cucumber-junit.version>LATEST</cucumber-junit.version>
<json-simple.version>1.1</json-simple.version>
<spring-context.version>4.3.6.RELEASE</spring-context.version>
<cucumber-spring.version>1.2.5</cucumber-spring.version>
<hamcrest-library.version>1.3</hamcrest-library.version>
<testng.version>6.8</testng.version>
<cucumber.jvm.parallel.version>4.1.0</cucumber.jvm.parallel.version>
<device.name>browserstack.ios</device.name>
<target.env>browserStackEnv</target.env>
</properties>
<profiles>
<profile>
<id>TestSuite1</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<test.tag>#dummy2</test.tag>
<dummy.tag>#dummy</dummy.tag>
<device.name>browserstack.ios</device.name>
</properties>
</profile>
</profiles>
<build>
<!--<sourceDirectory>src</sourceDirectory>-->
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<configuration>
<systemPropertyVariables>
<appConfig>${app.config}</appConfig>
<targetEnv>${target.env}</targetEnv>
</systemPropertyVariables>
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
</configuration>
<executions>
<execution>
<id>acceptance-test</id>
<goals>
<goal>test</goal>
</goals>
<configuration>
<forkCount>${surefire.fork.count}</forkCount>
<reuseForks>false</reuseForks>
<includes>
<include>**/IOSRunner*.class</include>
</includes>
<testFailureIgnore>true</testFailureIgnore>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.20</version>
<configuration>
<parallel>classes</parallel>
<threadCount>5</threadCount>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<configuration>
<forkCount>5</forkCount>
<reuseForks>true</reuseForks>
<includes>
<include>**/Parallel*IT.class</include>
</includes>
<systemPropertyVariables>
<deviceName>${device.name}</deviceName>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.github.fge</groupId>
<artifactId>json-schema-validator</artifactId>
<version>2.0.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>${jackson.version}</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.java.version}</version>
</dependency>
<dependency>
<groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId>
<version>${cucumber.extentsreport.version}</version>
</dependency>
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>${appium.java-client.version}</version>
<!--<version>5.0.0-BETA5</version>-->
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber-java.version}</version>
</dependency>
<dependency>
<groupId>com.jayway.jsonpath</groupId>
<artifactId>json-path</artifactId>
<version>${json-path.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber-junit.version}</version>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-core</artifactId>
<version>${cucumber-junit.version}</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>${json-simple.version}</version>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<version>${hamcrest-library.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-jvm-deps</artifactId>
<version>1.0.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-testng</artifactId>
<version>1.2.4</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.vimalselvam</groupId>
<artifactId>cucumber-extentsreport</artifactId>
<version>2.0.4</version>
</dependency>
<dependency>
<groupId>com.aventstack</groupId>
<artifactId>extentreports</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>io.magentys</groupId>
<artifactId>donut</artifactId>
<version>0.0.1</version>
</dependency>
</dependencies>
</project>
Also, One more reason, In case of serial runner I am exploring to have a retry runner, which could be invoked after serial run is over. But maven-surefire plugin do not guarantee particular order of execution, so perhaps I could add one more POM for running cucumber runner for retry.

OSGI runtime cannot pull dependencies from my local repository

I am working on a camel project and am trying to package the project as a osgi bundle and deploy on a Fuse ESB container which uses karaf.
The POM File is reproduced below.
When I tried a mvn install, I got a couple of unresolved package errors. So, I included them in the manifest entries using 'Import-Package' within the POM. This cleared the errors and the bundle got created but when I try to deploy it on fuse container, the bundle stops with an error Unable to resolve 257.0: missing requirement [257.0] osgi.wiring.package; (osgi.wiring.package=com.i2.cis.api.connector).
Does this mean that the osgi runtime is not able to pull these jars which are in my local .m2 repository?
POM:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.abc.cde</groupId>
<artifactId>x2xx</artifactId>
<packaging>bundle</packaging>
<version>1.0.0</version>
<name>Test</name>
<url>http://www.example.com</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<camel.osgi.export.pkg />
<camel.version>2.12.2</camel.version>
<activemq.version>5.9.0</activemq.version>
<java.version>1.7</java.version>
<build.number>SNAPSHOT</build.number>
</properties>
<repositories>
<!-- the cis libraries are present in this repo -->
<repository>
<id>repo</id>
<name>test</name>
<url>file:${project.basedir}/repo</url>
</repository>
</repositories>
<dependencies>
<!-- Start : CIS dependencies from local repo -->
<dependency>
<groupId>cis</groupId>
<artifactId>cis</artifactId>
<version>8.2</version>
</dependency>
<dependency>
<groupId>cis</groupId>
<artifactId>cis-util</artifactId>
<version>8.2</version>
</dependency>
<dependency>
<groupId>cis</groupId>
<artifactId>cis-sso-spi</artifactId>
<version>8.2</version>
</dependency>
<dependency>
<groupId>cis</groupId>
<artifactId>connector-api</artifactId>
<version>8.2</version>
</dependency>
<dependency>
<groupId>cis</groupId>
<artifactId>jdom</artifactId>
<version>8.2</version>
</dependency>
<!-- End : CIS dependencies from local repo -->
<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>
<!-- Start : Camel Jars -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cache</artifactId>
<version>${camel.version}</version>
<!-- use the same version as your Camel core version -->
</dependency>
<!-- stream input -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-stream</artifactId>
<version>${camel.version}</version>
</dependency>
<!-- End : Camel Jars -->
<!-- Start : Spring Jars -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>3.2.4.RELEASE</version>
</dependency>
<!-- End : Spring Jars -->
<!-- Start : Testing Jars -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>14.0.1</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<version>${camel.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-spring</artifactId>
<version>${camel.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>de.theess.juxy</groupId>
<artifactId>juxy</artifactId>
<version>0.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.5</version>
<scope>test</scope>
</dependency>
<!-- End : Testing Jars -->
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<!-- Start : Active MQ Jars-->
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>${activemq.version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>${activemq.version}</version>
</dependency>
<!-- End : Active MQ Jars-->
</dependencies>
<build>
<defaultGoal>install</defaultGoal>
<finalName>tma-1x</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.5.2</version>
<configuration>
<check>
<haltOnFailure>false</haltOnFailure>
</check>
<argLine>-XX:-UseSplitVerifier</argLine>
<formats>
<format>xml</format>
</formats>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>cobertura</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-jaxb-index</id>
<!-- here the phase you need -->
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/classes/com/example/abc/bean</outputDirectory>
<resources>
<resource>
<directory>src/main/java/com/abc/cde/bean</directory>
<filtering>true</filtering>
<includes>
<include>jaxb.index</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- allows the route to be ran via 'mvn camel:run' -->
<plugin>
<groupId>org.apache.camel</groupId>
<artifactId>camel-maven-plugin</artifactId>
<version>${camel.version}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.4</version>
<configuration>
<effort>Max</effort>
<threshold>Low</threshold>
<xmlOutput>true</xmlOutput>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>findbugs</goal>
</goals>
<configuration>
<skip>false</skip>
</configuration>
</execution>
</executions>
</plugin>
<!-- to generate the MANIFEST-FILE of the bundle -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>2.3.7</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>oo-test</Bundle-SymbolicName>
<Private-Package>com.abc.cde.*</Private-Package>
<Import-Package>
com.xx.cis.api.connector,
com.xx.cis.connector.client,
javax.resource,
javax.resource.cci,
javax.xml.bind,
javax.xml.bind.annotation,
javax.xml.namespace,
org.apache.activemq,
org.apache.activemq.camel.component,
org.apache.activemq.pool,
org.apache.camel,
org.apache.camel.builder,
org.apache.camel.component.jms,
org.apache.camel.impl,
org.apache.camel.model,
org.apache.camel.processor.aggregate,
org.apache.camel.spi,
org.apache.camel.spring,
org.apache.camel.spring.spi,
org.apache.commons.pool,
org.apache.commons.pool.impl,
org.slf4j,
org.springframework.beans,
org.springframework.beans.factory.config,
org.springframework.context,
org.springframework.jms.connection,
org.w3c.dom
</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<description></description>
The error is saying that your bundle imports the package com.i2.cis.api.connector but that no bundle exports that package (at the appropriate version) and therefore your bundle cannot be resolved. For each requirement (e.g. package import) there must be a matching capability (e.g. package export).
You need to install all required bundles together with your own bundle. For this Karaf uses feature files. You might want to create that for your project.
Details about the right provisioning with Karaf can be found in the documentation of it.

Maven local repository and compilation

Currently I am trying configure maven to a local repository for ex c:/maven-repo/repository. For this I have changed the <localRepository> value in M2_HOME/conf/settings.xml and pointed it to the above path.
When I execute any mvn command through command prompt, all required maven dependencies are geting downloaded to the given local repo path.
However, when I use mvn -e clean install for one of project, the maven is able to download the required dependencies to the local repository path, but the compilation fails.
When I put the settings.xml under ${user.home}/.m2 location the mvn clean install executes successfully.
Please note: the dependencies present under ${user.home}/.m2/repository and under local repository path are same.
Is there any setting, that need to be done in maven, so that maven can use the dependencies present under local repository path instead of ${user.home}/.m2/repository path.
My Parent pom.xml is:
<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.mycomp.test</groupId>
<artifactId>ProjectArtifact</artifactId>
<version>2.1</version>
<packaging>pom</packaging>
<name>Acrts</name>
<description>Parent Project</description>
<properties>
<!-- tests librairies version -->
<junit.version>4.7</junit.version>
<!-- tools version -->
<maven.version>2.0</maven.version>
<java.source.version>1.7</java.source.version>
<java.target.version>1.7</java.target.version>
</properties>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j.version}</version>
<exclusions>
<exclusion>
<groupId>javax.mail</groupId>
<artifactId>mail</artifactId>
</exclusion>
<exclusion>
<groupId>javax.jms</groupId>
<artifactId>jms</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jdmk</groupId>
<artifactId>jmxtools</artifactId>
</exclusion>
<exclusion>
<groupId>com.sun.jmx</groupId>
<artifactId>jmxri</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<build>
<!-- <finalName>should_not_be_used</finalName>-->
<extensions>
<!-- Enabling the use of FTP -->
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>${java.source.version}</source>
<target>${java.target.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-4</version>
<configuration>
<descriptors>
<descriptor>../Acrts/ACS_assembly.xml</descriptor>
<!--<descriptor>../Pub/ACS_assembly.xml</descriptor>--></descriptors>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<!--<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
--></plugins>
</build>
</project>
And my main projects pom.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<artifactId>ProjectArtifact</artifactId>
<groupId>com.mycomp.test</groupId>
<version>2.1</version>
</parent>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.5.1</gwtVersion>
<!-- GWT needs at least java 1.5 -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<web.inf.lib>WEB-INF/lib</web.inf.lib>
</properties>
<!-- POM file generated with GWT webAppCreator -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.mycomp.test</groupId>
<artifactId>MainProjectServer</artifactId>
<packaging>war</packaging>
<version>${project.release.version}</version>
<name>AcrtsGwtServer</name>
<dependencies>
<dependency>
<groupId>log4j</groupId>
<artifactId>apache-log4j-extras</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>2.0.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.15</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.2.2</version>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<version>${gwtVersion}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<version>${gwtVersion}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<version>${gwtVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-oxm-tiger</artifactId>
<version>1.5.8</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>2.5.6</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.6.full</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-jaxrpc</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>axis</groupId>
<artifactId>axis-wsdl4j</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxws</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>2.6.0</version>
</dependency>
<dependency>
<groupId>com.acn.acs.services</groupId>
<artifactId>SemiOnlineAcrtsService</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
<build>
<!-- Generate compiled stuff in the folder used for developing mode -->
<outputDirectory>target/www/WEB-INF/classes</outputDirectory>
<plugins>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwtVersion}</version>
<!-- JS is only needed in the package phase, this speeds up testing -->
<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<!-- URL that should be automatically opened in the GWT shell (gwt:run). -->
<runTarget>server.html</runTarget>
<!-- Location of the develop-mode web application structure (gwt:run). -->
<hostedWebapp>target/www</hostedWebapp>
<!-- Ask GWT to create the Story of Your Compile (SOYC) (gwt:compile) -->
<soyc>true</soyc>
</configuration>
</plugin>
<!-- Copy static web files before executing gwt:run -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
<execution>
<id>1</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/www</outputDirectory>
<resources>
<resource>
<directory>src/main/webapp</directory>
</resource>
</resources>
</configuration>
</execution>
<execution>
<id>3</id>
<phase>compile</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target/www/WEB-INF/classes</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Delete gwt generated stuff -->
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/acrtsgwtserver</directory>
</fileset>
<fileset>
<directory>src/main/webapp/WEB-INF/classes</directory>
</fileset>
<fileset>
<directory>tomcat</directory>
</fileset>
<fileset>
<directory>www-test</directory>
</fileset>
<fileset>
<directory>.gwt-tmp</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<executions>
<execution>
<phase>install</phase>
<goals>
<goal>war</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Requesting you to help me, so that I can use the local repository instead of ${user.home}/.m2/repository
Thanks in advance.
settings.xml is the configuration file for Maven. It can be specified at two levels:
User Level. This settings.xml file provides configuration for a single user,
and is normally provided in ${user.home}/.m2/settings.xml.
Global Level. This settings.xml file provides configuration for all Maven
users on a machine (assuming they're all using the same Maven
installation). It's normally provided in
${maven.home}/conf/settings.xml.
Priority is given to the User Level settings.xml.
Use just one settings.xml. And change the value of the element <localRepository> to the desired location. I think that should do the job.

Resources