Arquillian dependency management : ExecutorService not found - wildfly-8

I'm using Arquillian on my Wildfly project but I have the following problem when I run my first test :
Caused by: java.lang.ClassNotFoundException: org.jboss.arquillian.core.api.threading.ExecutorService
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:270)
at sun.reflect.generics.factory.CoreReflectionFactory.makeNamedType(CoreReflectionFactory.java:114)
... 55 more
This is my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ppp</groupId>
<artifactId>dummy</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>dummy V1</name>
<description>A starter Java EE 7 webapp project for use on JBoss WildFly / WildFly, generated from the jboss-javaee6-webapp archetype</description>
<url>http://wildfly.org</url>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<distribution>repo</distribution>
<url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
</license>
</licenses>
<properties>
<!-- Explicitly declaring the source encoding eliminates the following
message: -->
<!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
resources, i.e. build is platform dependent! -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- JBoss dependency versions -->
<version.wildfly.maven.plugin>1.0.2.Final</version.wildfly.maven.plugin>
<!-- Define the version of the JBoss BOMs we want to import to specify
tested stacks. -->
<version.jboss.bom>8.2.1.Final</version.jboss.bom>
<!-- other plugin versions -->
<version.compiler.plugin>3.1</version.compiler.plugin>
<version.surefire.plugin>2.16</version.surefire.plugin>
<version.war.plugin>2.5</version.war.plugin>
<!-- maven-compiler-plugin -->
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<version.arquillian_universe>1.0.0.Alpha1</version.arquillian_universe>
<version.arquillian_core>1.1.10.Final</version.arquillian_core>
<version.arquillian_spock>1.0.0.Alpha2</version.arquillian_spock>
<version.junit>4.12</version.junit>
<version.jboss_spec>1.0.3.Final</version.jboss_spec>
<version.fest_assert>1.4</version.fest_assert>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-with-all</artifactId>
<version>${version.jboss.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-with-hibernate</artifactId>
<version>${version.jboss.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.arquillian</groupId>
<artifactId>arquillian-universe</artifactId>
<version>${version.arquillian_universe}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<version>${version.fest_assert}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${version.junit}</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- First declare the APIs we depend on and need for compilation. All
of them are provided by JBoss WildFly -->
<!-- Import the CDI API, we use provided scope as the API is included in
JBoss WildFly -->
<dependency>
<groupId>javax.enterprise</groupId>
<artifactId>cdi-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the Common Annotations API (JSR-250), we use provided scope
as the API is included in JBoss WildFly -->
<dependency>
<groupId>org.jboss.spec.javax.annotation</groupId>
<artifactId>jboss-annotations-api_1.2_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the JAX-RS API, we use provided scope as the API is included
in JBoss WildFly -->
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>jaxrs-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the JPA API, we use provided scope as the API is included in
JBoss WildFly -->
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<scope>provided</scope>
</dependency>
<!-- Import the EJB API, we use provided scope as the API is included in
JBoss WildFly -->
<dependency>
<groupId>org.jboss.spec.javax.ejb</groupId>
<artifactId>jboss-ejb-api_3.2_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- JSR-303 (Bean Validation) Implementation -->
<!-- Provides portable constraints such as #Email -->
<!-- Hibernate Validator is shipped in JBoss WildFly -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>provided</scope>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Import the JSF API, we use provided scope as the API is included in
JBoss WildFly -->
<dependency>
<groupId>org.jboss.spec.javax.faces</groupId>
<artifactId>jboss-jsf-api_2.2_spec</artifactId>
<scope>provided</scope>
</dependency>
<!-- Now we declare any tools needed -->
<!-- Annotation processor to generate the JPA 2.0 metamodel classes for
typesafe criteria queries -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-jpamodelgen</artifactId>
<scope>provided</scope>
</dependency>
<!-- Annotation processor that raising compilation errors whenever constraint
annotations are incorrectly used. -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator-annotation-processor</artifactId>
<scope>provided</scope>
</dependency>
<!-- Needed for running tests (you may also use TestNG) -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- Optional, but highly recommended -->
<!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA)
JPA from JUnit/TestNG -->
<dependency>
<groupId>org.easytesting</groupId>
<artifactId>fest-assert</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.arquillian.universe</groupId>
<artifactId>arquillian-junit</artifactId>
<scope>test</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.arquillian.universe</groupId>
<artifactId>arquillian-persistence</artifactId>
<scope>test</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.arquillian.universe</groupId>
<artifactId>arquillian-chameleon</artifactId>
<scope>test</scope>
<type>pom</type>
</dependency>
</dependencies>
<build>
<!-- Maven will append the version to the finalName (which is the name
given to the generated war, and hence the context root) -->
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>${version.war.plugin}</version>
<configuration>
<!-- Java EE 7 doesn't require web.xml, Maven needs to catch up! -->
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
<!-- The WildFly plugin deploys your war to a local WildFly container -->
<!-- To use, run: mvn package wildfly:deploy -->
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>${version.wildfly.maven.plugin}</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- The default profile skips all tests, though you can tune it to run
just unit tests based on a custom pattern -->
<!-- Seperate profiles are provided for running all tests, including Arquillian
tests that execute in the specified container -->
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.surefire.plugin}</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<!-- An optional Arquillian testing profile that executes tests in your
WildFly instance -->
<!-- This profile will start a new WildFly instance, and execute the test,
shutting it down when done -->
<!-- Run with: mvn clean test -Parq-wildfly-managed -->
<id>arq-wildfly-managed</id>
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-managed</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
<profile>
<!-- An optional Arquillian testing profile that executes tests in a remote
WildFly instance -->
<!-- Run with: mvn clean test -Parq-wildfly-remote -->
<id>arq-wildfly-remote</id>
<dependencies>
<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-arquillian-container-remote</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</profile>
</profiles>
I also tried this command "mvn dependency:tree" and this is the result:
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building my project V1 0.0.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # my3dplayer ---
[INFO] com.visiativ:my3dplayer:war:0.0.1-SNAPSHOT
[INFO] +- javax.enterprise:cdi-api:jar:1.2:provided
[INFO] | +- javax.el:javax.el-api:jar:3.0.0:provided
[INFO] | +- javax.interceptor:javax.interceptor-api:jar:1.2:provided
[INFO] | \- javax.inject:javax.inject:jar:1:provided
[INFO] +- org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec:jar:1.0.0.Final:provided
[INFO] +- org.jboss.resteasy:jaxrs-api:jar:3.0.10.Final:provided
[INFO] +- org.hibernate.javax.persistence:hibernate-jpa-2.1-api:jar:1.0.0.Final:provided
[INFO] +- org.jboss.spec.javax.ejb:jboss-ejb-api_3.2_spec:jar:1.0.0.Final:provided
[INFO] +- org.hibernate:hibernate-validator:jar:5.1.3.Final:provided
[INFO] | +- javax.validation:validation-api:jar:1.1.0.Final:provided
[INFO] | +- org.jboss.logging:jboss-logging:jar:3.1.4.GA:provided
[INFO] | \- com.fasterxml:classmate:jar:1.0.0:provided
[INFO] +- org.jboss.spec.javax.faces:jboss-jsf-api_2.2_spec:jar:2.2.8:provided
[INFO] +- org.hibernate:hibernate-jpamodelgen:jar:4.3.5.Final:provided
[INFO] | \- org.jboss.logging:jboss-logging-annotations:jar:1.2.0.Beta1:provided
[INFO] +- org.hibernate:hibernate-validator-annotation-processor:jar:5.1.3.Final:provided
[INFO] +- junit:junit:jar:4.12:test
[INFO] | \- org.hamcrest:hamcrest-core:jar:1.3:test
[INFO] +- org.easytesting:fest-assert:jar:1.4:test
[INFO] | \- org.easytesting:fest-util:jar:1.1.6:test
[INFO] +- org.arquillian.universe:arquillian-junit:pom:1.0.0.Alpha1:test
[INFO] | +- org.arquillian.universe:arquillian-core:pom:1.0.0.Alpha1:test
[INFO] | | \- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-depchain:pom:2.0.0:test
[INFO] | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api:jar:2.0.0:test
[INFO] | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi:jar:2.0.0:test
[INFO] | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven:jar:2.0.0:test
[INFO] | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi-maven:jar:2.0.0:test
[INFO] | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven:jar:2.0.0:test
[INFO] | | | +- org.sonatype.aether:aether-api:jar:1.13.1:test
[INFO] | | | +- org.sonatype.aether:aether-impl:jar:1.13.1:test
[INFO] | | | +- org.sonatype.aether:aether-spi:jar:1.13.1:test
[INFO] | | | +- org.sonatype.aether:aether-util:jar:1.13.1:test
[INFO] | | | +- org.sonatype.aether:aether-connector-wagon:jar:1.13.1:test
[INFO] | | | +- org.apache.maven:maven-aether-provider:jar:3.0.5:test
[INFO] | | | +- org.apache.maven:maven-model:jar:3.0.5:test
[INFO] | | | +- org.apache.maven:maven-model-builder:jar:3.0.5:test
[INFO] | | | +- org.apache.maven:maven-repository-metadata:jar:3.0.5:test
[INFO] | | | +- org.apache.maven:maven-settings:jar:3.0.5:test
[INFO] | | | +- org.apache.maven:maven-settings-builder:jar:3.0.5:test
[INFO] | | | +- org.codehaus.plexus:plexus-interpolation:jar:1.14:test
[INFO] | | | +- org.codehaus.plexus:plexus-utils:jar:2.0.6:test
[INFO] | | | +- org.sonatype.plexus:plexus-sec-dispatcher:jar:1.4:test
[INFO] | | | | \- org.sonatype.plexus:plexus-cipher:jar:1.4:test
[INFO] | | | +- org.apache.maven.wagon:wagon-provider-api:jar:2.4:test
[INFO] | | | +- org.apache.maven.wagon:wagon-file:jar:2.4:test
[INFO] | | | \- org.apache.maven.wagon:wagon-http-lightweight:jar:2.4:test
[INFO] | | | \- org.apache.maven.wagon:wagon-http-shared4:jar:2.4:test
[INFO] | | | +- org.jsoup:jsoup:jar:1.7.1:test
[INFO] | | | +- org.apache.httpcomponents:httpcore:jar:4.2.3:test
[INFO] | | | \- commons-io:commons-io:jar:2.0.1:test
[INFO] | | \- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-impl-maven-archive:jar:2.0.0:test
[INFO] | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-api-maven-archive:jar:2.0.0:test
[INFO] | | +- org.jboss.shrinkwrap.resolver:shrinkwrap-resolver-spi-maven-archive:jar:2.0.0:test
[INFO] | | +- org.codehaus.plexus:plexus-compiler-javac:jar:2.1:test
[INFO] | | | \- org.codehaus.plexus:plexus-compiler-api:jar:2.1:test
[INFO] | | \- org.codehaus.plexus:plexus-component-api:jar:1.0-alpha-33:test
[INFO] | | \- org.codehaus.plexus:plexus-classworlds:jar:1.2-alpha-10:test
[INFO] | \- org.jboss.arquillian.junit:arquillian-junit-container:jar:1.1.2.Final-wildfly-1:test
[INFO] | +- org.jboss.arquillian.junit:arquillian-junit-core:jar:1.1.2.Final-wildfly-1:test
[INFO] | +- org.jboss.arquillian.test:arquillian-test-api:jar:1.1.2.Final-wildfly-1:test
[INFO] | | \- org.jboss.arquillian.core:arquillian-core-api:jar:1.1.2.Final-wildfly-1:test
[INFO] | +- org.jboss.arquillian.test:arquillian-test-spi:jar:1.1.2.Final-wildfly-1:test
[INFO] | | \- org.jboss.arquillian.core:arquillian-core-spi:jar:1.1.2.Final-wildfly-1:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-api:jar:1.1.2.Final-wildfly-1:test
[INFO] | | \- org.jboss.shrinkwrap:shrinkwrap-api:jar:1.1.2:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-spi:jar:1.1.2.Final-wildfly-1:test
[INFO] | +- org.jboss.arquillian.core:arquillian-core-impl-base:jar:1.1.2.Final-wildfly-1:test
[INFO] | +- org.jboss.arquillian.test:arquillian-test-impl-base:jar:1.1.2.Final-wildfly-1:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-impl-base:jar:1.1.2.Final-wildfly-1:test
[INFO] | | +- org.jboss.arquillian.config:arquillian-config-api:jar:1.1.2.Final-wildfly-1:test
[INFO] | | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-spi:jar:2.0.0-alpha-3:test
[INFO] | +- org.jboss.arquillian.container:arquillian-container-test-impl-base:jar:1.1.2.Final-wildfly-1:test
[INFO] | \- org.jboss.shrinkwrap:shrinkwrap-impl-base:jar:1.1.2:test
[INFO] | \- org.jboss.shrinkwrap:shrinkwrap-spi:jar:1.1.2:test
[INFO] +- org.arquillian.universe:arquillian-persistence:pom:1.0.0.Alpha1:test
[INFO] | +- org.arquillian.universe:arquillian-transaction-jta:pom:1.0.0.Alpha1:test
[INFO] | | +- org.arquillian.universe:arquillian-transaction-core:pom:1.0.0.Alpha1:test
[INFO] | | | \- org.jboss.arquillian.extension:arquillian-transaction-impl-base:jar:1.0.1.Final:test
[INFO] | | \- org.jboss.arquillian.extension:arquillian-transaction-jta:jar:1.0.1.Final:test
[INFO] | | +- org.jboss.arquillian.extension:arquillian-transaction-api:jar:1.0.1.Final:test
[INFO] | | \- org.jboss.arquillian.extension:arquillian-transaction-spi:jar:1.0.1.Final:test
[INFO] | \- org.arquillian.universe:arquillian-persistence-core:pom:1.0.0.Alpha1:test
[INFO] | \- org.jboss.arquillian.extension:arquillian-persistence-dbunit:jar:1.0.0.Alpha7:test
[INFO] | +- org.jboss.arquillian.extension:arquillian-persistence-api:jar:1.0.0.Alpha7:test
[INFO] | +- org.jboss.arquillian.extension:arquillian-persistence-spi:jar:1.0.0.Alpha7:test
[INFO] | +- org.jboss.arquillian.extension:arquillian-persistence-core:jar:1.0.0.Alpha7:test
[INFO] | +- org.dbunit:dbunit:jar:2.5.0:test
[INFO] | | \- commons-collections:commons-collections:jar:3.2.1:test
[INFO] | +- org.slf4j:slf4j-api:jar:1.7.5:test
[INFO] | +- org.yaml:snakeyaml:jar:1.10:test
[INFO] | +- org.codehaus.jackson:jackson-mapper-asl:jar:1.9.12:test
[INFO] | | \- org.codehaus.jackson:jackson-core-asl:jar:1.9.12:test
[INFO] | +- org.apache.poi:poi:jar:3.2-FINAL:test
[INFO] | | +- commons-logging:commons-logging:jar:1.1:test
[INFO] | | \- log4j:log4j:jar:1.2.16:test
[INFO] | \- org.jboss.shrinkwrap.descriptors:shrinkwrap-descriptors-api-base:jar:2.0.0-alpha-3:test
[INFO] \- org.arquillian.universe:arquillian-chameleon:pom:1.0.0.Alpha1:test
[INFO] \- org.arquillian.container:arquillian-container-chameleon:jar:1.0.0.Alpha5:test
[INFO] +- org.jboss.arquillian.config:arquillian-config-impl-base:jar:1.1.2.Final-wildfly-1:test
[INFO] +- org.jboss.arquillian.container:arquillian-container-spi:jar:1.1.2.Final-wildfly-1:test
[INFO] +- org.jboss.arquillian.protocol:arquillian-protocol-servlet:jar:1.1.2.Final-wildfly-1:test
[INFO] +- org.jboss.arquillian.testenricher:arquillian-testenricher-ejb:jar:1.1.2.Final-wildfly-1:test
[INFO] +- org.jboss.arquillian.testenricher:arquillian-testenricher-resource:jar:1.1.2.Final-wildfly-1:test
[INFO] +- org.jboss.arquillian.testenricher:arquillian-testenricher-cdi:jar:1.1.2.Final-wildfly-1:test
[INFO] \- org.jboss.arquillian.testenricher:arquillian-testenricher-initialcontext:jar:1.1.2.Final-wildfly-1:test
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.994 s
[INFO] Finished at: 2015-11-23T22:39:38+00:00
[INFO] Final Memory: 16M/232M
[INFO] ------------------------------------------------------------------------
Thanks for your help.

I found a solution using Wildfly Hibernate BOM and Arquillian Universe BOM :
<dependency>
<groupId>org.wildfly.bom</groupId>
<artifactId>jboss-javaee-7.0-with-hibernate</artifactId>
<version>${version.jboss.bom}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.arquillian</groupId>
<artifactId>arquillian-universe</artifactId>
<version>${version.arquillian_universe}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

Related

Jenkins not able to run soapUI test: No test to run

I am running SoapUI test from Jenkins.
I have placed my soapui-project.xml file placed in same directory where my pom.xml is placed which is in master in bitbucket. Jenkins is able to pick all changes in my pom.xml. but not running tests.
Jenkin log says "no test to run"
I tried adding source and placing my soapui-project.xml file in src/main/resources keeping below properties.
<sourceDirectory>src/main/resources</sourceDirectory>
<testSourceDirectory>src/main/resources</testSourceDirectory>
but behavior not changed.
my pom.xml is as below
<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>
<name>Test soapui</name>
<groupId>RestCountriesInfo</groupId>
<artifactId>com.example.soapuitests</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<description>SOAPUITesting</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<!-- <sourceDirectory>src</sourceDirectory>
<testSourceDirectory>src/main/resources</testSourceDirectory>
-->
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.5.0</version>
<dependencies>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>1.2.1</version>
</dependency>
</dependencies>
<executions>
<execution>
<id>RestCountriesInfo</id>
<configuration>
<projectFile>RestCountriesInfo-soapui-project.xml</projectFile>
<outputFolder>src/main/resources/report</outputFolder>
<testSuite>DEV</testSuite>
<junitReport>true</junitReport>
<exportAll>true</exportAll>
<printReport>true</printReport>
<testFailIgnore>true</testFailIgnore>
</configuration>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
And here are Jenkins logs
Posting build status of INPROGRESS to SWC Bitbucket for commit id [d95035dda15d279d5622478d8dbd178591e1f66a] and ref 'refs/heads/master'
Failed to post build status, additional information: timeout
[API_TEST] $ /opt/maven/bin/mvn clean test
[INFO] Scanning for projects...
[INFO]
[INFO] -------------< RestCountriesInfo:com.example.soapuitests >--------------
[INFO] Building Test soapui 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # com.example.soapuitests ---
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) # com.example.soapuitests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) # com.example.soapuitests ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) # com.example.soapuitests ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /opt/jenkins/workspace/Feature/Dev/API_TEST/src/test/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) # com.example.soapuitests ---
[INFO] No sources to compile
[INFO]
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) # com.example.soapuitests ---
[INFO] No tests to run.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.454 s
[INFO] Finished at: 2022-11-29T12:47:34+11:00
[INFO] ------------------------------------------------------------------------
Any idea why Jenkins not able to execute my tests.
Notice in your log output that the soapui-maven-plugin never got run.
You have two options:
In Jenkins you can specify the target phase: com.smartbear.soapui:soapui-maven-plugin:5.5.0:test, as per official documentation. But as you can see this contains the plugin version in the command, which is probably undesirable.
You can add a <phase> that you want to run the soapui plugin in; probably test. This goes in your <configuration> block. Note that <goal> and <phase> are not the same thing; they each configure something different, even thought they might have the same target. More information is available in official documentation.
As a side note, the <packaging> for this project is not jar - there is no compile phase. It is just pom.

Vaadin Testbench 23 seems to require Selenium 4.1.2 but maven is loading 3.141.59 according to the pom

In my pom.xml I have:
<properties>
<java.version>18</java.version>
<vaadin.version>23.0.6</vaadin.version>
</properties>
...
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<scope>test</scope>
</dependency>
When I run TestBench I get the following error:
WARN com.vaadin.testbench.TestBenchTestCase - This version of TestBench depends on Selenium
version 4.1.2 but version 3.141.59 was found. Make sure you do not have multiple versions
of Selenium on the classpath.
I then ran mvn dependency:tree and the only reference to Selenium I can find is:
[INFO] +- com.vaadin:vaadin-testbench:jar:23.0.3:test
[INFO] | +- com.vaadin:vaadin-testbench-core:jar:8.0.0:test
[INFO] | | +- org.seleniumhq.selenium:selenium-remote-driver:jar:3.141.59:test
[INFO] | | | +- org.seleniumhq.selenium:selenium-api:jar:3.141.59:test
[INFO] | | | +- org.apache.commons:commons-exec:jar:1.3:test
[INFO] | | | +- com.google.guava:guava:jar:25.0-jre:test
[INFO] | | | | +- com.google.code.findbugs:jsr305:jar:1.3.9:compile
[INFO] | | | | +- org.checkerframework:checker-compat-qual:jar:2.0.0:test
[INFO] | | | | +- com.google.j2objc:j2objc-annotations:jar:1.1:test
[INFO] | | | | \- org.codehaus.mojo:animal-sniffer-annotations:jar:1.14:test
[INFO] | | | +- com.squareup.okhttp3:okhttp:jar:3.14.9:test
[INFO] | | | \- com.squareup.okio:okio:jar:1.14.0:test
[INFO] | | +- org.seleniumhq.selenium:selenium-java:jar:3.141.59:test
[INFO] | | | +- org.seleniumhq.selenium:selenium-chrome-driver:jar:3.141.59:test
[INFO] | | | +- org.seleniumhq.selenium:selenium-edge-driver:jar:3.141.59:test
[INFO] | | | +- org.seleniumhq.selenium:selenium-firefox-driver:jar:3.141.59:test
[INFO] | | | +- org.seleniumhq.selenium:selenium-ie-driver:jar:3.141.59:test
[INFO] | | | +- org.seleniumhq.selenium:selenium-opera-driver:jar:3.141.59:test
[INFO] | | | +- org.seleniumhq.selenium:selenium-safari-driver:jar:3.141.59:test
[INFO] | | | \- org.seleniumhq.selenium:selenium-support:jar:3.141.59:test
Which to me seems to indicate that TestBench is asking for Selenium 3.141.59 in the pom but the code is looking for version 4.1.2 How do I resolve this?
The Selenium version is overwritten by the Spring Boot dependency management.
You can try to set the property:
<selenium.version>4.1.2</selenium.version>
In my project this didn't work I had to set the property PLUS add all Selenium dependencies to my pom.xml
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-api</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-chrome-driver</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-edge-driver</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-ie-driver</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-opera-driver</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-remote-driver</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-safari-driver</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-support</artifactId>
<version>${selenium.version}</version>
<scope>test</scope>
</dependency>

Custom Maven packaging, transitive dependencies aren't included

I'm playing around with a custom Maven 3 packaging plugin for some non-java artifacts, and having an issue getting transitive dependencies to work. I've got three projects defined, model, model-impl, and cli, with dependencies like this:
cli
model-impl
model
My custom lifecycle plugins are being called in each project, and I can successfully build model and model-impl. For each of those projects, the expected artifacts are being stored in my local repository. cli however is failing because I don't get model as a dependency in my Mojo. I'm not completely sure that this is a problem in my code though, because even using mvn dependency:dependency-tree doesn't show the full dependency hierarchy:
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< com.corp.nodes:myproj-cli >-----------------------
[INFO] Building myproj Test 1.0.0-SNAPSHOT
[INFO] --------------------------------[ myproj ]--------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # myproj-cli ---
[INFO] com.corp.nodes:myproj-cli:myproj:1.0.0-SNAPSHOT
[INFO] \- com.corp.:myproj-model-impl:myproj:1.0.0-SNAPSHOT:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
Here I would have expected that I see a tree with three levels for each of the projects.
Here's the components.xml defined in my custom plugin:
<component-set>
<components>
<component>
<role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
<role-hint>myproj</role-hint>
<implementation>
org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping
</implementation>
<configuration>
<phases>
<initialize>com.corp.maven:myproj-plugin:unpackageDependencies</initialize>
<process-resources>org.apache.maven.plugins:maven-resources-plugin:resources</process-resources>
<compile>com.corp.maven:myproj-plugin:compile</compile>
<process-test-resources>org.apache.maven.plugins:maven-resources-plugin:testResources</process-test-resources>
<test-compile>org.apache.maven.plugins:maven-compiler-plugin:testCompile</test-compile>
<test>org.apache.maven.plugins:maven-surefire-plugin:test</test>
<package>com.corp.maven:myproj-plugin:package</package>
<install>org.apache.maven.plugins:maven-install-plugin:install</install>
<deploy>org.apache.maven.plugins:maven-deploy-plugin:deploy</deploy>
</phases>
</configuration>
</component>
<component>
<role>org.apache.maven.artifact.handler.ArtifactHandler</role>
<role-hint>myproj</role-hint>
<implementation>org.apache.maven.artifact.handler.DefaultArtifactHandler</implementation>
<configuration>
<type>myproj</type>
<extension>myproj</extension>
<packaging>myproj</packaging>
<addedToClasspath>true</addedToClasspath>
<includesDependencies>true</includesDependencies>
</configuration>
</component>
</components>
</component-set>
All of the project POMs have their packaging set to myproj, and all of the dependencies have their type set to myproj. Here's the pom for the cli project:
<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.corp.arthur.nodes</groupId>
<artifactId>myproj-cli</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>myproj</packaging>
<name>myproj Test</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>com.corp.arthur</groupId>
<artifactId>myproj-model-impl</artifactId>
<version>1.0.0-SNAPSHOT</version>
<type>myproj</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.corp.maven</groupId>
<artifactId>myproj-plugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<extensions>true</extensions>
</plugin>
</plugins>
</build>
</project>
The POM for the impl project looks similar. Any idea's what I'm missing?
Finally figured out what was going on by tracing through the source for the DefaultDependencyCollector class. Turns out I needed to set includesDependencies in my components.xml to false. What was happening is the dependency collector saw that flag was true, meaning the dependencies were included in the artifact, and so didn't recurse through them. With it set to false, it does recurse, and I get the expected behavior.
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------< com.corp.nodes:myproj-cli >------------------
[INFO] Building myproj Test: CLI Node 1.0.0-SNAPSHOT
[INFO] --------------------------------[ myproj ]--------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) # myproj-cli ---
[INFO] com.corp.nodes:myproj-cli:myproj:1.0.0-SNAPSHOT
[INFO] \- com.corp:myproj-model-impl:myproj:1.0.0-SNAPSHOT:compile
[INFO] \- com.corp:myproj-model:myproj:1.0.0-SNAPSHOT:compile
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
I've been struggling with a similar problem while trying to include my android lib via maven to my another project. My research has shown that library's pom file isn't included in maven library for some cases like mine was - I had an .aar file. Hence, your project build system doesn't know anything about these transitive dependencies. The solution for me was to manually point them in in my Gradle file. You can familiarize with this more concretely in this topic.

Maven docker plugin for spring boot build error

I have a simple maven project with multi modules (only one for the moment) for Spring Boot microservices
In the root folder the pom.xml contains
<?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>be.demo.microservices</groupId>
<artifactId>master</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>pom</packaging>
<modules>
<module>hello-service</module>
</modules>
</project>
In the hello-service folder, the pom.xml contains
<?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>be.demo.microservices</groupId>
<artifactId>hello-service</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<description>Demo project for Spring Boot</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<docker.image.prefix>springio</docker.image.prefix>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<imageTags>
<imageTag>${project.version}</imageTag>
<imageTag>latest</imageTag>
</imageTags>
<baseImage>openjdk:8-jdk-alpine</baseImage>
<entryPoint>["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar /${project.build.finalName}.jar"]</entryPoint>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
</plugins>
</build>
</project>
When building the project with mvn clean package docker:build I have
...
[INFO] --- spring-boot-maven-plugin:2.0.1.RELEASE:repackage (default) # hello-service ---
[INFO]
[INFO] --- docker-maven-plugin:1.0.0:build (default-cli) # hello-service ---
[INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier]
[INFO] Copying D:\dev\microservices\demo\hello-service\target\hello-service-1.0.0-SNAPSHOT.jar -> D:\dev\microservices\demo\hello-service\target\docker\hello-service-1.0.0-SNAPSHOT.jar
[INFO] Building image springio/hello-service
Step 1/3 : FROM openjdk:8-jdk-alpine
---> 224765a6bdbe
Step 2/3 : ADD /hello-service-0.0.1-SNAPSHOT.jar //
---> 259b1622e107
Step 3/3 : ENTRYPOINT ["sh","-c","java -Djava.security.egd=file:/dev/./urandom -jar /hello-service-1.0.0-SNAPSHOT.jar"]
---> Running in e86870c47b6a
Removing intermediate container e86870c47b6a
---> 847840116367
ProgressMessage{id=null, status=null, stream=null, error=null, progress=null, progressDetail=null}
Successfully built 847840116367
Successfully tagged springio/hello-service:latest
[INFO] Built springio/hello-service
[INFO] Tagging springio/hello-service with 1.0.0-SNAPSHOT
[INFO] Tagging springio/hello-service with latest
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building master 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) # master ---
[INFO]
[INFO] --- docker-maven-plugin:1.0.0:build (default-cli) # master ---
[INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier]
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] hello-service ...................................... SUCCESS [ 9.881 s]
[INFO] master ............................................. FAILURE [ 0.102 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.650 s
[INFO] Finished at: 2018-04-18T13:33:49+02:00
[INFO] Final Memory: 54M/520M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.0.0:build (default-cli) on project master: Exception caught: Must specify baseImage if dockerDirectory is null -> [Help 1]
[ERROR] .....
So the service is packaged, the image is built but I don't understand why in the master pom maven is trying to build an image even if there is no docker plugin inside it ?
By default this docker-maven-plugin is bind with maven's package build phase.
Check following link bind-docker-commands-to-maven-phases
You can skip Docker goals bound to Maven phases with:
-DskipDockerBuild to skip image build
-DskipDockerTag to skip image tag
-DskipDockerPush to skip image push
-DskipDocker to skip any Docker goals

No plugin found for prefix 'docker' in the current project and in the plugin groups

deploy Spring Cloud project with docker, some code in the pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<!-- tag::plugin[] -->
<plugin>
<groupId>com.spotify</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>1.0.0</version>
<configuration>
<imageName>${docker.image.prefix}/${project.artifactId}</imageName>
<dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
<resources>
<resource>
<targetPath>/</targetPath>
<directory>${project.build.directory}</directory>
<include>${project.build.finalName}.jar</include>
</resource>
</resources>
</configuration>
</plugin>
<!-- end::plugin[] -->
</plugins>
</build>
when i execute the command: mvn package docker:build, it throws the above errors:
Downloaded: http://3.2.4.2:8888/repository/maven-public/org/apache/maven/plugins/maven-metadata.xml (14 KB at 5.7 KB/sec)
Downloaded: http://3.2.4.2:8888/repository/maven-public/org/codehaus/mojo/maven-metadata.xml (21 KB at 7.3 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] eureka-server ...................................... SUCCESS [ 26.279 s]
[INFO] service-1 ......................................... SUCCESS [ 14.649 s]
[INFO] demo1 ........................................... FAILURE [ 2.850 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 45.535 s
[INFO] Finished at: 2017-11-15T14:28:05+08:00
[INFO] Final Memory: 47M/532M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'docker' in the current project
and in the plugin groups [org.sonatype.plugins, org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/../Repository), nexus (http://3.2.4.2:8888/repository/maven-public/)]
how to solve it?
add the below code to your maven conf/setting.xml:
<pluginGroups>
<pluginGroup>com.spotify</pluginGroup>
</pluginGroups>
if you want to get more detail, pls refer to https://github.com/spotify/docker-maven-plugin/issues/322
If you are using dockerfile maven plugin, you need to change docker:build to
dockerfile:build and docker:push to dockerfile:push
For me worked in a different way, if you follow the maven plugin pattern {prefix}-maven-plugin... which in this case is dockerfile-maven-plugin, you should be able to run it with: mvn package dockerfile:build.
I'm using Maven: 3, Spring Boot 2 and Docker maven plugin 1.3.4

Resources