Scala with maven-plugin can't find depenencies - spring

I have a scala project using maven. When I was using only scala classes, there was no problem with the maven plugin.
But now, I'm getting errors when trying to compile:
[WARNING] C:\java\workspace\mcare\src\main\scala\com\fb\mcare\config\AppConfig.scala:2: error: object springframework is not a member of package org
[WARNING] import org.springframework.context.annotation.Configuration
package com.fb.mcare.config
import org.springframework.context.annotation.Configuration
#Configuration
class AppConfig {
}
my pom:
http://maven.apache.org/maven-v4_0_0.xsd">
4.0.0
com.fb
mcare
0.0.1-SNAPSHOT
2008
2.9.1-1
3.1.0.RELEASE
war
scala-tools.org
Scala-Tools Maven2 Repository
http://scala-tools.org/repo-releases
com.springsource.repository.maven.release
http://maven.springframework.org/release/
false
<pluginRepositories>
<pluginRepository>
<id>scala-tools.org</id>
<name>Scala-Tools Maven2 Repository</name>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.specs</groupId>
<artifactId>specs</artifactId>
<version>1.2.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_3.0_spec</artifactId>
<version>1.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.9.1</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
Tried pretty much everything, what am I missing here?
Regards

Try removing <scope>runtime</scope> from the spring-context dependency in pom.xml. Runtime scope dependencies are not included on the compile time class path. See http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html for more info on the various scopes.

Related

SoapUI Project tests execution using Maven plugin in Jenkins transitive dependency error

I am trying to run a SoapUI 5.2.0 open source project xml in Jenkins using Maven and getting the following error:
[ERROR] Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:5.4.0:test (SoapUI-Test) on project AmexIQCX: Execution SoapUI-Test of goal com.smartbear.soapui:soapui-maven-plugin:5.4.0:test failed: Plugin com.smartbear.soapui:soapui-maven-plugin:5.4.0 or one of its dependencies could not be resolved: The following artifacts could not be resolved: com.fasterxml.jackson.core:jackson-databind:jar:2.3.0, org.apache.ws.security:wss4j:jar:1.6.16: Could not transfer artifact com.fasterxml.jackson.core:jackson-databind:jar:2.3.0 from/to m-all (https://ci-repo.aexp.com/java-proxy/content/groups/prod/): Access denied to: https://ci-repo.aexp.com/java-proxy/content/groups/prod/com/fasterxml/jackson/core/jackson-databind/2.3.0/jackson-databind-2.3.0.jar , ReasonPhrase:Requested item is quarantined. -> [Help 1]
Here 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>AmexIQCX</groupId>
<artifactId>AmexIQCX</artifactId>
<version>0.0.1-SNAPSHOT</version>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version> <!-- or whatever current version -->
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.4.0</version>
<configuration>
<projectFile>./SabreCommandLLS1-8-1RQ-soapui-project.xml</projectFile>
<testSuite>TestSuite 1</testSuite>
<printReport>true</printReport>
<outputFolder>${basedir}/soapui-output</outputFolder>
<junitReport>true</junitReport>
</configuration>
<dependencies>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>1.0.7</version>
</dependency>
<dependency>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.4.0</version>
<!-- <exclusions> <exclusion> <groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId> </exclusion> <exclusion> <groupId>org.apache.ws.security</groupId>
<artifactId>wss4j:jar</artifactId> </exclusion> </exclusions> -->
</dependency>
</dependencies>
<executions>
<execution>
<id>SoapUI-Test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<reportsDirectories>
<reportsDirectory>${basedir}/soapui-output</reportsDirectory>
</reportsDirectories>
<outputDirectory>${basedir}/soapui-output</outputDirectory>
<outputName>${project.artifactId}-TEST-${env}</outputName>
<showSuccess>true</showSuccess>
<aggregate>true</aggregate>
<linkXRef>false</linkXRef>
</configuration>
<executions>
<execution>
<id>Surefire-Report</id>
<phase>test</phase>
<goals>
<goal>report-only</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
</project>
This is resolve by using the following versions in dependencies with exclusions:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.12.1</version>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>2.3.1</version>
</dependency>

Why is Maven connecting to archiva.openqa.org

I'm building the code that I got from the book ActiveMQ in ACtion. When I run the code using these commands mvn clean install, I get these messages below. I cannot understand why it is downloading from release.openqa.org for the spring framework because I do not see anywhere in my POM.xml that this is configured to do so.
..........
Downloading from release.openqa.org: http://archiva.openqa.org/repository/releases/org/springframework/spring-core/maven-metadata.xml
[WARNING] Could not transfer metadata org.springframework:spring-core/maven-metadata.xml from/to release.openqa.org (http://archiva.openqa.org/repository/releases): Connect to archiva.openqa.org:80 [archiva.openqa.org/199.102.165.92] failed: Connection timed out: connect
.......
Content of POM.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
<parent> <groupId>org.apache.activemq.book</groupId>
<artifactId>activemq-in-action</artifactId>
<version>1.0-SNAPSHOT</version> </parent>
-->
<groupId>org.apache.activemq.book</groupId>
<artifactId>activemq-in-action-examples</artifactId>
<version>1.0-SNAPSHOT</version>
<name>ActiveMQ in Action Examples</name>
<description>ActiveMQ in Action Example Code</description>
<!-- This build uses Maven 2.x -->
<properties>
<activemq-version>5.3.2</activemq-version>
<camel-version>2.0.0</camel-version>
<commons-logging-version>1.1</commons-logging-version>
<commons-pool-version>1.4</commons-pool-version>
<geronimo-spec-version>1.1</geronimo-spec-version>
<junit-version>4.4</junit-version>
<log4j-version>1.2.14</log4j-version>
<springframework-version>2.5.6</springframework-version>
<stax-version>1.0.1</stax-version>
<woodstox-version>3.2.7</woodstox-version>
<xbean-version>3.4.3</xbean-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>${activemq-version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.activemq</groupId>
<artifactId>activeio-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>${geronimo-spec-version}</version>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
<version>${geronimo-spec-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-optional</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>${activemq-version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>${springframework-version}</version>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
<version>${xbean-version}</version>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>${stax-version}</version>
</dependency>
<dependency>
<groupId>woodstox</groupId>
<artifactId>wstx-asl</artifactId>
<version>${woodstox-version}</version>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>${activemq-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-web</artifactId>
<classifier>classes</classifier>
<version>${camel-version}</version>
</dependency>
<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>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons-logging-version}</version>
<exclusions>
<exclusion>
<groupId>avalon-framework</groupId>
<artifactId>avalon-framework</artifactId>
</exclusion>
<exclusion>
<groupId>logkit</groupId>
<artifactId>logkit</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>${log4j-version}</version>
</dependency>
</dependencies>
<build>
<finalName>activemq-in-action-examples</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<target>1.5</target>
<source>1.5</source>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<id>example-src</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>${project.basedir}/src/main/assembly/activemq-in-action-src.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>java.net</id>
<name>java.net</name>
<url>http://download.java.net/maven/2</url>
<layout>default</layout>
</repository>
</repositories>
</project>
After running mvn help:effective-pom, I get the following. I still do not see why maven is connecting to release.openqa.org:
PS C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src> mvn help:effective-pom
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for org.apache.activemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. # line 155, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. # line 163, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] --------< org.apache.activemq.book:activemq-in-action-examples >--------
[INFO] Building ActiveMQ in Action Examples 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-help-plugin:3.2.0:effective-pom (default-cli) # activemq-in-action-examples ---
[INFO]
Effective POMs, after inheritance, interpolation, and profiles are applied:
<?xml version="1.0" encoding="Cp1252"?>
<!-- ====================================================================== -->
<!-- -->
<!-- Generated by Maven Help Plugin on 2019-06-17T23:59:41+08:00 -->
<!-- See: http://maven.apache.org/plugins/maven-help-plugin/ -->
<!-- -->
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<!-- -->
<!-- Effective POM for project -->
<!-- 'org.apache.activemq.book:activemq-in-action-examples:jar:1.0-SNAPSHOT' -->
<!-- -->
<!-- ====================================================================== -->
<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.activemq.book</groupId>
<artifactId>activemq-in-action-examples</artifactId>
<version>1.0-SNAPSHOT</version>
<name>ActiveMQ in Action Examples</name>
<description>ActiveMQ in Action Example Code</description>
<properties>
<activemq-version>5.3.2</activemq-version>
<camel-version>2.0.0</camel-version>
<commons-logging-version>1.1</commons-logging-version>
<commons-pool-version>1.4</commons-pool-version>
<geronimo-spec-version>1.1</geronimo-spec-version>
<junit-version>4.4</junit-version>
<log4j-version>1.2.14</log4j-version>
<springframework-version>2.5.6</springframework-version>
<stax-version>1.0.1</stax-version>
<woodstox-version>4.4.1</woodstox-version>
<xbean-version>3.4.3</xbean-version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-core</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>activeio-core</artifactId>
<groupId>org.apache.activemq</groupId>
</exclusion>
<exclusion>
<artifactId>camel-core</artifactId>
<groupId>org.apache.camel</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-jms_1.1_spec</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
<version>1.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-optional</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-pool</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.xbean</groupId>
<artifactId>xbean-spring</artifactId>
<version>3.4.3</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>stax</groupId>
<artifactId>stax-api</artifactId>
<version>1.0.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.woodstox</groupId>
<artifactId>woodstox-core-asl</artifactId>
<version>4.4.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
<version>5.3.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-web</artifactId>
<version>2.0.0</version>
<classifier>classes</classifier>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>2.0.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>avalon-framework</artifactId>
<groupId>avalon-framework</groupId>
</exclusion>
<exclusion>
<artifactId>logkit</artifactId>
<groupId>logkit</groupId>
</exclusion>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.14</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net</id>
<name>java.net</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>https://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\main\java</sourceDirectory>
<scriptSourceDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\main\scripts</scriptSourceDirectory>
<testSourceDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\test\java</testSourceDirectory>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\classes</outputDirectory>
<testOutputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\test-classes</testOutputDirectory>
<resources>
<resource>
<directory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\main\resources</directory>
</resource>
</resources>
<testResources>
<testResource>
<directory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\src\test\resources</directory>
</testResource>
</testResources>
<directory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target</directory>
<finalName>activemq-in-action-examples</finalName>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<target>1.5</target>
<source>1.5</source>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<target>1.5</target>
<source>1.5</source>
</configuration>
</execution>
</executions>
<configuration>
<target>1.5</target>
<source>1.5</source>
</configuration>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</execution>
</executions>
<configuration>
<failIfNoTests>false</failIfNoTests>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
<executions>
<execution>
<id>example-src</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<descriptors>
<descriptor>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src/src/main/assembly/activemq-in-action-src.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-jar</id>
<phase>package</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
</goals>
<configuration>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
<execution>
<id>default-deploy</id>
<phase>site-deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<outputDirectory>C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src\target\site</outputDirectory>
</reporting>
</project>
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.162 s
[INFO] Finished at: 2019-06-17T23:59:51+08:00
[INFO] ------------------------------------------------------------------------
PS C:\munlai\websitepractice\ActiveMQ\source\amq-in-action-example-src>
Under the local repository C:\Users\wmunlai.m2\, I do see a few files called "resolver-status.properties". Could this be the cause? May I know the purpose of this file "resolver-status.properties". The content of one of this file is shown below:
#NOTE: This is a Maven Resolver internal implementation file, its format can be changed without prior notice.
#Mon Jun 17 23:58:04 SGT 2019
maven-metadata-apache.snapshots.xml.error=
maven-metadata-release.openqa.org.xml.error=Could not transfer metadata org.springframework\:spring/maven-metadata.xml from/to release.openqa.org (http\://archiva.openqa.org/repository/releases)\: Connect to archiva.openqa.org\:80 [archiva.openqa.org/199.102.165.92] failed\: Connection timed out\: connect
maven-metadata-java.net.xml.lastUpdated=1560787064788
maven-metadata-codehausSnapshots.xml/#default-codehausSnapshots-http\://snapshots.maven.codehaus.org/maven2/.lastUpdated=1560681286264
maven-metadata-java.net.m2.xml.lastUpdated=1560787065347
maven-metadata-release.openqa.org.xml/#default-release.openqa.org-http\://archiva.openqa.org/repository/releases/.lastUpdated=1560787084477
maven-metadata-java.net.xml.error=
maven-metadata-java.net.m2.xml.error=
maven-metadata-codehausSnapshots.xml.lastUpdated=1560686487495
maven-metadata-central.xml.lastUpdated=1560787063879
maven-metadata-apache.snapshots.xml.lastUpdated=1560787064417
It seems that this file camel-web-2.0.0.pom contains the following code that caused this problem:
C:\Users\wmunlai.m2\repository\org\apache\camel\camel-web\2.0.0\camel-web-2.0.0.pom
<repositories>
<repository>
<id>java.net.m2</id>
<name>java.net Maven 2 Repo</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>release.openqa.org</id>
<name>OpenQA Releases</name>
<url>http://archiva.openqa.org/repository/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
repositories are either configured in the pom.xml file (your own one or a dependent one) or in settings.xml
You can check the effective files use by running mvn help:effective-pom or mvn help:effective-settings. The repo might appear there. Since spring dependencies are usually taken from central it might be a settings thing. Settings files can be placed into the maven installation directly or in your user home / .m2 directory or passed to the build with a parameter. So just add the help goals in front of your usual maven goals and then search for the repo name. If it's not showing up one of the dependencies you use may be a bit weird? Then I would search the local maven repository for that uri.
Adding repositories to pom.xml files is no longer encouraged, as they tend to move too frequent and impact the reliability of builds. Usually, companies install a repository mirror like Nexus or Artifactory. Both work by being configured as mirrorOf in settings.xml and proxy all requests made.

'[TestNG] Couldn't find the testng.xml in the jar file, running all the classes' error while running test on AWS Device Farm

I am trying to run a test suite on AWS device farm, It is a Maven project, I get the following error on the device farm Parsing result document: [TestNG] Couldn't find the testng.xml in the jar file, running all the classes.
While creating the zip for AWS device farm from Maven I get the following warning:
[WARNING] The POM for org.testng:testng:jar:5.14.3 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details.
I have the latest version of testng and surefire plugin nothing seems to help. any help on this one will be much appreciated.
My pom.xml is as follows:
http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
<groupId>com.pankanis.cameraplus </groupId>
<artifactId>CameraPlusApp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>CameraPlusApp</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<suiteXmlFile>./testng.xml</suiteXmlFile>
</properties>
<dependencies>
<!-- https://mvnrepository.com/artifact/io.appium/java-client -->
<dependency>
<groupId>io.appium</groupId>
<artifactId>java-client</artifactId>
<version>4.1.2</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.1</version>
</dependency>
<dependency>
<groupId>com.github.genium-framework</groupId>
<artifactId>Appium-Support</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>1.4.9</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.5</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
</dependency>
<dependency>
<groupId>com.sikulix</groupId>
<artifactId>sikulixapi</artifactId>
<version>1.1.0</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
</dependency>
<dependency>
<groupId>com.relevantcodes</groupId>
<artifactId>extentreports</artifactId>
<version>2.41.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.9</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.4</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>${suiteXmlFile}</suiteXmlFile>
</suiteXmlFiles>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<goals>
<goal>test-jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.10</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/dependency-jars/</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.5.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<finalName>zip-with-dependencies</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>src/main/assembly/zip.xml</descriptor>
</descriptors>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
You need to add the testng.xml to the root of the -tests.jar file created. To do this put it in the src/test/resources directory to take advantage of the super pom configuration. Alternatively, you can create some testResources tags to reference where the testng.xml is at currently.
Hope that helps
Just added a pull request here
https://github.com/awslabs/aws-device-farm-appium-tests-for-sample-app/pull/14
[update]
There is now a premium support article about this
https://aws.amazon.com/premiumsupport/knowledge-center/xml-file-tests-jar-file-device-farm/

Problems in dependencies using maven with ecplise

I do not know a lot about Maven, only the basics and that this causing me some problems.
I'm using Ecplise Luna with maven (the EMBEDDED version 3.2.1 / 1.5.1.50109-1819) to manage my project. also installed JBoss Tools plugin to send my project to OpenShift. So far so good.
However, I'm facing some errors in OpenShift and researching in forums discovered that the problem is related to the 5.0.8 version of mysql-connector-java. So I went in pom.xml file from my maven project and changed the version of mysql-connector-java 5.0.8 to 5.1.38, saved the pom and theoretically my maven should download the version the new version (5.1.38) mysql-connector-java and delete the old (5.0.8), right?
Well, if that's what should happen, it is not what is happening. I could not find any errors, but in my lib folder there is only the 5.0.8 version of mysql-connector-java.
Strange that when I give clean install to build is successfully generated, and MyApp-0.0.1-SNAPSHOT / WEB-INF / lib is generated mysql-connector-java-5.0.8-bin.jar file and mysql-connector -java-5.1.38.jar.
Why this is happening? the little I understand, the maven should not replace the 5.0.8 version for 5.1.38, since I changed the version in pom.xml?
Any idea what's going on?
My pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>Picos</groupId>
<artifactId>Picos</artifactId>
<version>0.0.2-SNAPSHOT</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>javax.faces</groupId>
<artifactId>javax.faces-api</artifactId>
<version>2.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.primefaces</groupId>
<artifactId>primefaces</artifactId>
<version>5.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.primefaces.themes</groupId>
<artifactId>all-themes</artifactId>
<version>1.0.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>4.3.6.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.2.1.Final</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.4</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.10</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.21</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>2.21</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-multipart</artifactId>
<version>2.21</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>mimepull</artifactId>
<groupId>org.jvnet.mimepull</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.jvnet.mimepull</groupId>
<artifactId>mimepull</artifactId>
<version>1.9.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>2.21</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.13</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.ganyo</groupId>
<artifactId>gcm-server</artifactId>
<version>1.0.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.1</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<version>1.2</version>
<scope>compile</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>prime-repo</id>
<name>PrimeFaces Maven Repository</name>
<url>http://repository.primefaces.org</url>
</repository>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>Central Repository</name>
<url>http://repo.maven.apache.org/maven2</url>
</pluginRepository>
</pluginRepositories>
<build>
<sourceDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\src</sourceDirectory>
<scriptSourceDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\src\main\scripts</scriptSourceDirectory>
<testSourceDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\src\test\java</testSourceDirectory>
<outputDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\target\classes</outputDirectory>
<testOutputDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\target\test-classes</testOutputDirectory>
<resources>
<resource>
<directory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
<testResources>
<testResource>
<directory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\src\test\resources</directory>
</testResource>
</testResources>
<directory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\target</directory>
<finalName>Picos-0.0.2-SNAPSHOT</finalName>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.3</version>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-5</version>
</plugin>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
</plugin>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<executions>
<execution>
<id>default-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</execution>
<execution>
<id>default-testCompile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</execution>
</executions>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-war</id>
<phase>package</phase>
<goals>
<goal>war</goal>
</goals>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</execution>
</executions>
<configuration>
<warSourceDirectory>WebContent</warSourceDirectory>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>default-clean</id>
<phase>clean</phase>
<goals>
<goal>clean</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>default-testResources</id>
<phase>process-test-resources</phase>
<goals>
<goal>testResources</goal>
</goals>
</execution>
<execution>
<id>default-resources</id>
<phase>process-resources</phase>
<goals>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.12.4</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>default-install</id>
<phase>install</phase>
<goals>
<goal>install</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-deploy-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>default-deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<executions>
<execution>
<id>default-site</id>
<phase>site</phase>
<goals>
<goal>site</goal>
</goals>
<configuration>
<outputDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
<execution>
<id>default-deploy</id>
<phase>site-deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<outputDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</execution>
</executions>
<configuration>
<outputDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\target\site</outputDirectory>
<reportPlugins>
<reportPlugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
</reportPlugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<outputDirectory>D:\Meus documentos\Projetos\Thiago\app Picos\Workspace\Picos\target\site</outputDirectory>
</reporting>
<profiles>
<profile>
<id>openshift</id>
<build>
<finalName>Picos</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<outputDirectory>webapps</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>
Maven does not import the dependencies into the 'lib'-folder of the eclipse project. Instead it will be downloaded to the local maven repository (at USER_HOME/.m2/repository). When the project is built, maven will copy all contents of your projects 'lib' folder and additionally include the referenced jars from your local repository.
I suspect that you saved the old version inside the 'lib' folder, which is why you end up with both versions.

How to run testNg.xml and a soapUI.xml in the same pom.xml(Maven)

I have a pom.xml with 2 plugins, one for a testng.xml(with selenium) suite and one for a soapUI.xml tests. I want to run both tests xml's, but only the testng.xml is run. MAde a separate pom, only with the configuration necessary for a soapUI.xml witch runs OK(with install command).
<properties>
<project.build.sourceEncoding>UTF-8 </project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5</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.18.1</version>
</plugin>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.1.1</version>
<configuration>
</configuration>
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<version>0.9.9-RC1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
<exclusions>
<exclusion>
<groupId>org.apache.xmlbeans</groupId>
<artifactId>xmlbeans</artifactId>
</exclusion>
</exclusions>
</dependency>
</dependencies>
<executions>
<execution>
<phase>integration-test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>${project.basedir}/src/test/resources/All-4-WB-soapui-project.xml</projectFile>
<outputFolder>${project.build.directory}/project-reports</outputFolder>
<junitReport>true</junitReport>
<printReport>false</printReport>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.18</version>
<inherited>true</inherited>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<suiteXmlFiles>
<suiteXmlFiles>testng.xml</suiteXmlFiles>
</suiteXmlFiles>
<includes>
<include>**/*EAS*.java</include>
</includes>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
</build>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<repositories>
<repository>
<id>jenkins-releases</id>
<url>http://repo.jenkins-ci.org/releases/</url>
</repository>
<repository>
<id>SmartBear Sweden Repository</id>
<url>http://www.soapui.org/repository/maven2</url>
</repository>
<repository>
<id>maven2-repository.java.net</id>
<name>Java.net Repository for Maven</name>
<url>http://java.net/projects/maven-repository/</url>
<layout>default</layout>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>cli</artifactId>
<version>1.514</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.9.6</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-server</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>2.47.1</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>2.47.1</version>
</dependency>
</dependencies>
try to add <inherited>true</inherited> in
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.1.1</version>
<inherited>true</inherited>
and declare it in <plugins> not <pluginManagement> or child plugin

Resources