SoapUITestCaseRunner class not found issue when doing maven build for soap UI project - maven

I was doing maven configuration for soapUI project using latest maven-soapui-pro plugin,however i was facing below error
*Failed to execute goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test (default) on project medtronicAcsSoapUI: Execution default of goal com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test failed: A required class was missing while executing com.smartbear.soapui:soapui-pro-maven-plugin:5.1.2:test: com/eviware/soapui/tools/SoapUITestCaseRunner*
These are the dependencies I was using.
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.1.2</version>
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections-maven</artifactId>
<version>0.9.9-RC1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
</dependency>
</dependencies>
Could someone please help me.

With this pom.xml the execution is right,
I have updated the artifactId:
<artifactId>soapui-pro-maven-plugin</artifactId>
by
<artifactId>soapui-maven-plugin</artifactId>
you need to have installation the soaupUI aplication and this pom file.
<?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>com.stackoverflow.41594333</groupId>
<artifactId>soapui.mvn</artifactId>
<version>1.0.0-SNAPSHOT</version>
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<properties>
<restEndpointUrl>http://server:port</restEndpointUrl>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.1.2</version>
<configuration>
<projectFile>Completed-soapui-project.xml</projectFile>
<testSuite>CreateCase</testSuite>
<outputFolder>target</outputFolder>
<junitReport>true</junitReport>
<printReport>true</printReport>
<projectProperties>
<value>QA_server=${restEndpointUrl}</value>
</projectProperties>
</configuration>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections-maven</artifactId>
<version>0.9.9-RC1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi-ooxml</artifactId>
<version>3.10-FINAL</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>

Related

maven-install-plugin does not load local dependency

I'm trying load local dependencies using the Maven maven-install-plugin:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.5.2</version>
<executions>
<execution>
<id>tetramap</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>tetramap</groupId>
<artifactId>tetramap</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/tetraMap-1.0.jar</file>
</configuration>
</execution>
</executions>
</plugin>
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
</dependency>
As a result, the downloaded dependency should appear in the repository (user/.m2/repository). the files should appear in the repository. But they are not uploaded to the repository ("tetramap-1.0.jar " and "tetramap-1.0.pom" files and the "maven-metadata-local.xm" file is missing).
Please tell me what I'm doing wrong. I want to see the uploaded files in the repository tetramap-1.0.jar , tetramap-1.0.pom and maven-metadata-local.xml.
More detailed:
I need this in order to create a Docker image for a project with Vaadin and Spring.
My Dockerfile:
FROM openjdk:11-jdk-slim
COPY *.tetra ./
COPY src src
COPY frontend frontend
COPY route route
COPY package.json ./
COPY target/*.jar tetraweb.jar
EXPOSE 8080
ENTRYPOINT ["java", "-jar", "/tetraweb.jar"]
If there are no such files in the user/.m2/repository directory, then when I run the command (creates a Docker image):
sudo docker build . -t tetraweb:latest
And then I run the image in the container
sudo docker run -p 8080:8080 tetraweb:latest
And after that I get an error:
java.lang.NoClassDefFoundError:
And if the files are located in the repository (user/.m2/repository) directory, then the Docker image is created correctly with local dependencies.
I tried connecting local dependencies in other ways:
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>
</dependency>
или
<repository>
<id>local-repository</id>
<url>file://${project.basedir}/lib</url>
</repository>
...
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
</dependency>
but the result is the same everywhere:
java.lang.NoClassDefFoundError
I found a temporary solution
my pom.xml:
<dependencies>
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>
</dependency>
</dependencies>
...
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>inst_1</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/tetraMap-1.0.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Now if I run a
mvn clean install
My directories in the repository are filled in correctly. I see the downloaded files:
enter image description here
At the moment, there is still a problem with creating a Docker image. If I run the command:
mvn -Pproduction
I see error:
[ERROR] Failed to execute goal com.vaadin:vaadin-maven-plugin:23.2.7:build-frontend (default) on project tetraweb: Could not execute build-frontend goal: Error occured during goal execution: nullPlease run Maven with the -e switch (or Gradle with the --stacktrace switch), to learn the full stack trace. NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
But if I disable the following code:
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>-->
and I will run the command again:
mvn -Pproduction
In this case, the image creation will be successful
To upload a jar file to the repository, I need the included code:
<scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>
To create a Docker image, this code must be disabled:( That's very strange...
This is my pom.xml all code:
<?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>
<!-- Project from https://start.vaadin.com/project/553cf24a-aade-4a91-a94d-9f2293333d44 -->
<groupId>oniip.tetra.web</groupId>
<artifactId>tetraweb</artifactId>
<name>tetraweb</name>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<java.version>11</java.version>
<vaadin.version>23.2.7</vaadin.version>
<!-- this parameter is needed as spring-boot bom overwrites it -->
<selenium.version>4.5.3</selenium.version>
<!-- selenium is so much verbose -->
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.5</version>
</parent>
<repositories>
<!-- Main Maven repository -->
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>vaadin-prereleases</id>
<url>
https://maven.vaadin.com/vaadin-prereleases/
</url>
</repository>
<!-- Repository used by many Vaadin add-ons -->
<repository>
<id>Vaadin Directory</id>
<url>https://maven.vaadin.com/vaadin-addons</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<!-- The order of definitions matters. Explicitly defining central here to make sure it has the highest priority. -->
<pluginRepository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>
https://maven.vaadin.com/vaadin-prereleases/
</url>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-bom</artifactId>
<version>${vaadin.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.vaadin</groupId>
<!-- Replace artifactId with vaadin-core to use only free components -->
<artifactId>vaadin</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.mysql/mysql-connector-j -->
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>8.0.31</version>
</dependency>
<!-- Include JUnit 4 support for TestBench and others -->
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.github.bonigarcia</groupId>
<artifactId>webdrivermanager</artifactId>
<version>5.1.1</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.24</version>
<scope>provided</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.github.appreciated/apexcharts -->
<dependency>
<groupId>com.github.appreciated</groupId>
<artifactId>apexcharts</artifactId>
<version>23.0.0</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-actor_2.11</artifactId>
<version>2.4.20</version>
</dependency>
<dependency>
<groupId>com.typesafe.akka</groupId>
<artifactId>akka-remote_2.11</artifactId>
<version>2.4.20</version>
</dependency>
<dependency>
<groupId>com.typesafe</groupId>
<artifactId>config</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.17</version>
</dependency>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jsch</artifactId>
<version>0.1.55</version>
</dependency>
<dependency>
<groupId>com.github.oshi</groupId>
<artifactId>oshi-core</artifactId>
<version>5.5.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.simplejavamail/simple-java-mail -->
<dependency>
<groupId>org.simplejavamail</groupId>
<artifactId>simple-java-mail</artifactId>
<version>5.0.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/log4j/log4j -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>com.github.bbottema</groupId>
<artifactId>emailaddress-rfc2822</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.1</version>
</dependency>
<!-- Локальные репозитории -->
<dependency>
<groupId>org.jlibrtp</groupId>
<artifactId>jlibrtp</artifactId>
<version>1.0</version>
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/jlibrtp.jar</systemPath>-->
</dependency>
<dependency>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j</artifactId>
<version>1.11.3</version>
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/snmp4j-1.11.3.jar</systemPath>-->
</dependency>
<dependency>
<groupId>tetra.commons</groupId>
<artifactId>tetraCommons</artifactId>
<version>1.0</version>
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/TetraCommons-1.0.jar</systemPath>-->
</dependency>
<dependency>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<!-- <scope>system</scope>
<systemPath>${project.basedir}/lib/tetraMap-1.0.jar</systemPath>-->
</dependency>
</dependencies>
<build>
<defaultGoal>spring-boot:run</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>inst_1</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>org.jlibrtp</groupId>
<artifactId>jlibrtp</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/jlibrtp.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
<execution>
<id>inst_2</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>org.snmp4j</groupId>
<artifactId>snmp4j</artifactId>
<version>1.11.3</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/snmp4j-1.11.3.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
<execution>
<id>inst_3</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>tetra.commons</groupId>
<artifactId>tetraCommons</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/TetraCommons-1.0.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
<execution>
<id>inst_4</id>
<phase>initialize</phase>
<goals>
<goal>install-file</goal>
</goals>
<configuration>
<groupId>tetramap</groupId>
<artifactId>tetraMap</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<file>${project.basedir}/lib/tetraMap-1.0.jar</file>
<localRepositoryPath>/home/user/.m2/repository</localRepositoryPath>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- Clean build and startup time for Vaadin apps sometimes may exceed
the default Spring Boot's 30sec timeout. -->
<configuration>
<jvmArguments>-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5037</jvmArguments>
<wait>500</wait>
<maxAttempts>240</maxAttempts>
</configuration>
</plugin>
<!--
Take care of synchronizing java dependencies and imports in
package.json and main.js files.
It also creates webpack.config.js if not exists yet.
-->
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>prepare-frontend</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<!-- Production mode is activated using -Pproduction -->
<id>production</id>
<properties>
<vaadin.productionMode>true</vaadin.productionMode>
</properties>
<build>
<plugins>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.version}</version>
<executions>
<execution>
<goals>
<goal>build-frontend</goal>
</goals>
<phase>compile</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>it</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<id>start-spring-boot</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>stop-spring-boot</id>
<phase>post-integration-test</phase>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Runs the integration tests (*IT) after the server is started -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
<configuration>
<trimStackTrace>false</trimStackTrace>
<enableAssertions>true</enableAssertions>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Log4j New Version and old version in Nexus

I have upgraded Log4j to 2.16.0 from 2.10.0 version and released the job in Jenkins .I can see the older version and new version while downloading from Nexus . Does it will the latest version while in build .How can I delete the older version ?Could anyone suggest on how to delete the older version .
Maven 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>com.xxx</groupId>
<artifactId>SampleService</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Service</name>
<description>Project for Services</description>
<properties>
<java.version>1.8</java.version>
<springboot.version>2.1.6.RELEASE</springboot.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>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<surefire-plugin.version>2.22.0</surefire-plugin.version>
<log4j2.version>2.16.0</log4j2.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>${springboot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-mongodb</artifactId>
<version>2.2.2.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-rest</artifactId>
<version>2.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
<version>2.16.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.16.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>spring-milestone</id>
<name>Spring Maven MILESTONE Repository</name>
<url>https://repo.spring.io/libs-milestone</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<configuration>
<systemProperties>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${springboot.version}</version>
<configuration>
<arguments>
<source>1.8</source>
<target>1.8</target>
<uberJar>true</uberJar>
</arguments>
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<distributionManagement>
<repository>
<id>toolchain-nexus</id>
<url>${nexus.release.url}</url>
</repository>
<snapshotRepository>
<id>toolchain-nexus</id>
<url>${nexus.snapshot.url}</url>
</snapshotRepository>
</distributionManagement>
</project>

Soapui PRO does not show reports in Allure

I am trying to generate Soapui-PRO execution reports with Allure. I downloaded Allure-maven plugin 2.2. I updated the POM file as mentioned below. At command prompt I run the command c:\maven\bin\mvn -o test. The test runs fine, build is successful. But the reports are html format. Can you pls check and let me know
<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.smartbear.soapuiMavenTutorial</groupId>
<artifactId>SoapUI-Maven-Tutorial</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>SoapUI-Maven-Tutorial</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-examples-parent</artifactId>
<version>1.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.8.6</aspectj.version>
<allure.version>1.4.14</allure.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.3-SNAPSHOT</version>
</dependency>
<!--added jdbc below in build element-->
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0</version>
<scope>runtime</scope>
<!--systemPath>C:\maven\ojdbc6.jar</systemPath-->
</dependency>
</dependencies>
<groupId>com.smartbear</groupId>
<artifactId>ready-api-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>C:\Gee-SoapUI-Projects-Backup\25Aug2015-POSBkup\May04-2015-Point of Sale.xml</projectFile>
<outputFolder>C:\25-Aug-1suiteResults</outputFolder>
<reportFormat>xUNIT</reportFormat>
<reportName>TestCase Report</reportName>
<!--reportName>TestSuite Report</reportName-->
<testSuite>ErrorCodes</testSuite>
<junitReport>false</junitReport>
<printReport>true</printReport>
<exportAll>true</exportAll>
<soapuiProperties>
<property>
<name>soapui.home</name>
<value>C:\Users\pulipge\ReadyAPI-1.3.0\bin</value>
</property>
</soapuiProperties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
</plugin>
</plugins>
</reporting>
</project>
Allure maven plugin should be in reporting section only. In regular dependencies you need
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-junit-adaptor</artifactId>
<version>${allure.version}</version>
</dependency>
instead. Also for advanced Allure features (like attachments and test steps) you need to configure aspectj and java agent in maven surefire plugin.
Please check the details at https://github.com/allure-examples/allure-junit-example.git.
Thanks miheys, Vania. I see now Allure report getting created!! Pls see attmt.
But it says 0 Testsuites, 0 Testcases
What could be the reason. I ran the case against 1 test suite. Can you pls check. Also I tried allure-junit-adaptor, it errored out that it cannot find files to download. So I ram wihout it. Here is my POM below.
Here is the 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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.smartbear.soapuiMavenTutorial</groupId>
<artifactId>SoapUI-Maven-Tutorial</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>SoapUI-Maven-Tutorial</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-examples-parent</artifactId>
<version>1.0</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<aspectj.version>1.8.6</aspectj.version>
<allure.version>1.4.14</allure.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.3-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-testng-adaptor</artifactId>
<version>1.4.14</version>
</dependency>
<!--Added this junit adaptor-->
<!--dependency>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-junit-adaptor</artifactId>
<version>2.2</version>
</dependency-->
<!--added jdbc below in build element-->
</dependencies>
<pluginRepositories>
<pluginRepository>
<id>SmartBearPluginRepository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0</version>
<scope>runtime</scope>
<!--systemPath>C:\maven\ojdbc6.jar</systemPath-->
</dependency>
</dependencies>
<groupId>com.smartbear</groupId>
<artifactId>ready-api-maven-plugin</artifactId>
<version>1.3.0</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>C:\Gee-SoapUI-Projects-Backup\25Aug2015-POSBkup\May04-2015-Point of Sale.xml</projectFile>
<outputFolder>C:\26-Aug-1suiteResults</outputFolder>
<reportFormat>xUNIT</reportFormat>
<reportName>TestCase Report</reportName>
<!--reportName>TestSuite Report</reportName-->
<testSuite>ErrorCodes</testSuite>
<junitReport>true</junitReport>
<printReport>true</printReport>
<exportAll>true</exportAll>
<soapuiProperties>
<property>
<name>soapui.home</name>
<value>C:\Users\pulipge\ReadyAPI-1.3.0\bin</value>
</property>
</soapuiProperties>
<properties>
48 <property>
49 <name>listener</name>
50 <value>ru.yandex.qatools.allure.junit.AllureRunListener</value>
51 </property>
52 </properties>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<reporting>
<excludeDefaults>true</excludeDefaults>
<plugins>
<plugin>
<groupId>ru.yandex.qatools.allure</groupId>
<artifactId>allure-maven-plugin</artifactId>
<version>2.7</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.18.1</version>
</plugin>
</plugins>
</reporting>
</project>

Including xvfb plugin in Maven Pom.xml, nod <execution> error

Plugin execution not covered by lifecycle configuration: org.codehaus.mojo:selenium-maven-plugin:2.3:xvfb (execution: xvfb, phase: test-compile)
I tried this: Plugin execution not covered by lifecycle configuration maven error but it didnt help
Here is my pom.xml. The error message appears at < execution > nod
<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>
<!-- asd -->
<groupId>com.pragmaticqa.tests</groupId>
<artifactId>functionalTests</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>functionalTests</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<displayProps>target/selenium/display.properties</displayProps>
</properties>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-firefox-driver</artifactId>
<version>2.32.0</version>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.32.0</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.8</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<version>2.5</version>
<type>pom</type>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<includes>
<include>**/*Test*.java</include>
</includes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>selenium-maven-plugin</artifactId>
<version>2.3</version>
<!-- execution code would go here if needed -->
<executions>
<execution>
<id>xvfb</id>
<phase>test-compile</phase>
<goals>
<goal>xvfb</goal>
</goals>
<configuration>
<!-- <displayPropertiesFile>${displayProps}</displayPropertiesFile> -->
<!-- try removing the plugin declaration, try 0 or :0 -->
<display>:0</display>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
<build>
<pluginManagement>
<plugins>
<plugin> ... </plugin>
<plugin> ... </plugin>
....
</plugins>
</pluginManagement>
</build>
Once this structure is in place, the error goes away.

why doesn't this ear find his dependencies?

I just mavenised some project. I was using ant before and it has following structure:
MYPROJECT/
pom.xml (ear)
MYPROJECT-EJB
pom.xml
MYPROJECT-WAR
pom.xml
If I build the ejb and jar projects, it works. If I clean everything and starts from the ear, it doesn't. Here is what I got with 'maven clean install' from jenkins:
[WARNING] The POM for be.valuya.myproject:myproject-ejb:jar:1.0-SNAPSHOT
is missing, no dependency information available [WARNING] The POM for
be.valuya.myproject:myproject-war:war:1.0-SNAPSHOT is missing, no
dependency information available [WARNING] The POM for
be.valuya.myproject:myproject-ws:war:1.0-SNAPSHOT is missing, no
dependency information available
BTW, I don't know how it's supposed to find those dependencies, but that's what I'd want.
Here is my ear's 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>be.valuya.myproject</groupId>
<artifactId>myproject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>ear</packaging>
<name>myproject</name>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<netbeans.hint.deploy.server>gfv3ee6</netbeans.hint.deploy.server>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<version>2.6</version>
<configuration>
<version>6</version>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<applicationName>myproject</applicationName>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>myproject-ejb</artifactId>
<version>${project.version}</version>
<type>ejb</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>myproject-war</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>myproject-ws</artifactId>
<version>${project.version}</version>
<type>war</type>
</dependency>
</dependencies>
</project>
And here is my ejb module's 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>be.valuya.myproject</groupId>
<artifactId>myproject-ejb</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>ejb</packaging>
<name>myproject-ejb</name>
<repositories>
<repository>
<id>EclipseLink Repo</id>
<!-- note that ampersands in this URL are escaped because this is in an xml file -
un-escape them to use in browser
-->
<url>http://www.eclipse.org/downloads/download.php?r=1&nf=1&file=/rt/eclipselink/maven.repo</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>maven-annotation-plugin</id>
<url>http://maven-annotation-plugin.googlecode.com/svn/trunk/mavenrepo</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<compilerArguments>
<endorseddirs>${endorsed.dir}</endorseddirs>
</compilerArguments>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.3</version>
<configuration>
<ejbVersion>3.1</ejbVersion>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<outputDirectory>${endorsed.dir}</outputDirectory>
<silent>true</silent>
<artifactItems>
<artifactItem>
<groupId>javax</groupId>
<artifactId>javaee-endorsed-api</artifactId>
<version>6.0</version>
<type>jar</type>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<!-- <plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>1.3.5</version>
<executions>
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<compilerArguments>-Aeclipselink.persistencexml=src/main/resources/META-INF/persistence.xml</compilerArguments>
<processors >
<processor>org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
</plugin>-->
</plugins>
</build>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
</properties>
<dependencies>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>2.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId>
<version>2.3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.modelgen.processor</artifactId>
<version>2.3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa.modelgen</artifactId>
<version>2.3.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.sf.jasperreports</groupId>
<artifactId>jasperreports</artifactId>
<version>4.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>poi</artifactId>
<version>3.5-FINAL</version>
</dependency>
<dependency>
<groupId>jfree</groupId>
<artifactId>jfreechart</artifactId>
<version>1.0.13</version>
</dependency>
<dependency>
<groupId>jfree</groupId>
<artifactId>jcommon</artifactId>
<version>1.0.16</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Made a superpom. Much better, although still not perfect (but I'll ask in another question).

Resources