I am trying to run my cucumber tests in parallel. At the moment they run sequentially and it takes an insane amount of time to run all the tests.
This is my current pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>Salesforce</groupId>
<artifactId>Salesforce</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<modules>
<module>Cucumber</module>
</modules>
<properties>
<maven.repo.url.releases>http://maven-repo2.iggroup.local:8081/nexus/content/repositories/ig.release
</maven.repo.url.releases>
<maven.repo.url.snapshots>http://maven-repo2.iggroup.local:8081/nexus/content/repositories/ig.snapshot
</maven.repo.url.snapshots>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<cucumber.version>4.2.6</cucumber.version>
<junit.version>4.12</junit.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-picocontainer</artifactId>
<version>1.2.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>${junit.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>${cucumber.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.4.0</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.11.2</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.mail/javax.mail-api -->
<dependency>
<groupId>javax.mail</groupId>
<artifactId>javax.mail-api</artifactId>
<version>1.6.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/com.sun.mail/javax.mail -->
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.1</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>javax.json</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>com.googlecode.java-diff-utils</groupId>
<artifactId>diffutils</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.lazerycode.selenium</groupId>
<artifactId>driver-binary-downloader-maven-plugin</artifactId>
<version>1.0.17</version>
<configuration>
<!-- root directory that downloaded driver binaries will be stored in -->
<rootStandaloneServerDirectory>./target/webdrivers</rootStandaloneServerDirectory>
<!-- Where you want to store downloaded zip files -->
<downloadedZipFileDirectory>./target/webdrivers</downloadedZipFileDirectory>
<!-- Location of a custom repository map -->
<customRepositoryMap>${project.basedir}/CustomRepositoryMap.xml</customRepositoryMap>
<!-- This will ensure that the plugin only downloads binaries for the current OS, this will override anything specified in the <operatingSystems> configuration -->
<onlyGetDriversForHostOperatingSystem>false</onlyGetDriversForHostOperatingSystem>
<!-- If set to false will download every version available (Other filters will be taken into account -->
<onlyGetLatestVersions>false</onlyGetLatestVersions>
<!-- Operating systems you want to download binaries for (Only valid options are: windows, linux, osx) -->
<operatingSystems>
<windows>false</windows>
<linux>true</linux>
<mac>false</mac>
</operatingSystems>
<!-- Provide a list of drivers and binary versions to download (this is a map so only one version can be specified per driver) -->
<getSpecificExecutableVersions>
<googlechrome>LATEST</googlechrome>
</getSpecificExecutableVersions>
<!-- Download 32bit binaries -->
<!--<thirtyTwoBitBinaries>false</thirtyTwoBitBinaries>-->
<!-- Download 64bit binaries -->
<!--<sixtyFourBitBinaries>true</sixtyFourBitBinaries>-->
</configuration>
<executions>
<execution>
<id>driverdownload</id>
<goals>
<goal>selenium</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- FOR PARALLELISM: -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M3</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
<configuration>
<!-- UNCOMMENT - To add any exclusions if required -->
<!-- <excludes> <exclude>**/*IT*.java</exclude> </excludes> -->
<includes>
<!-- UNCOMMENT BELOW LINE - To execute feature files with a single
runner -->
<include>**/Default.java</include>
<!-- UNCOMMENT BELOW LINE - To execute feature files with multiple
runners -->
<!-- <include>**/*Runner.java</include> -->
</includes>
<!-- UNCOMMENT BELOW 3 LINES - To execute using parallel or combination
option -->
<parallel>methods</parallel>
<threadCount>2</threadCount>
<perCoreThreadCount>true</perCoreThreadCount>
<!-- UNCOMMENT BELOW 3 LINES - To execute using forking or combination
option -->
<!-- <forkCount>2</forkCount>
<reuseForks>true</reuseForks>
<reportsDirectory>${project.build.directory}/failsafe-reports_${surefire.forkNumber}</reportsDirectory> -->
</configuration>
</execution>
</executions>
</plugin>
<!-- Used for reporting the output: -->
<!-- <plugin>-->
<!-- <groupId>com.trivago.rta</groupId>-->
<!-- <artifactId>cluecumber-report-plugin</artifactId>-->
<!-- <version>1.7.2</version>-->
<!-- <executions>-->
<!-- <execution>-->
<!-- <id>report</id>-->
<!-- <phase>post-integration-test</phase>-->
<!-- <goals>-->
<!-- <goal>reporting</goal>-->
<!-- </goals>-->
<!-- </execution>-->
<!-- </executions>-->
<!-- <configuration>-->
<!-- <sourceJsonReportDirectory>${project.build.directory}/json-cucumber-reports</sourceJsonReportDirectory>-->
<!-- <generatedHtmlReportDirectory>${project.build.directory}/generated-report</generatedHtmlReportDirectory>-->
<!-- <expandStepHooks>true</expandStepHooks>-->
<!-- </configuration>-->
<!-- </plugin>-->
</plugins>
<testSourceDirectory>src/test/java/runner</testSourceDirectory>
<testResources>
<testResource>
<directory>src/test/resources/UAT_Regression
</directory>
</testResource>
</testResources>
</build>
<repositories>
<!-- Sonatype OSS -->
<repository>
<id>sonatype</id>
<name>Day CQ5 Repository (OSGI)</name>
<url>http://maven-repo2.iggroup.local:8081/nexus/content/repositories/sonatype-oss</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<!-- Central mirror -->
<repository>
<id>central</id>
<name>Day CQ5 Repository (OSGI)</name>
<url>http://maven-repo2.iggroup.local:8081/nexus/content/repositories/central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>atlassian-repo</id>
<name>Day CQ5 Repository (OSGI)</name>
<url>http://maven-repo2.iggroup.local:8081/nexus/content/repositories/atlassian.public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<releases>
<enabled>true</enabled>
<updatePolicy>always</updatePolicy>
</releases>
<snapshots>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
</snapshots>
<id>central</id>
<url>http://maven-repo2.iggroup.local:8081/nexus/content/repositories/central</url>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
</dependency>
</dependencies>
</dependencyManagement>
<distributionManagement>
<repository>
<id>ig.releases</id>
<name>ig-repository</name>
<url>${maven.repo.url.releases}</url>
</repository>
<snapshotRepository>
<id>ig.snapshots</id>
<name>ig-repository</name>
<url>${maven.repo.url.snapshots}</url>
</snapshotRepository>
</distributionManagement>
</project>
And my project directory pretty much contains: src/main/java/com/automation/cucumber and this directory contains 2 folders; Steps (contains the step definitions) and utils (Helper methods).
And under src/main/test/resources/UAT_Regression I have my .feature files in here.
My runner class is located under:
src/test/java/runner/runner/RunCucumberIT.java
The above pom was coded to reflect what was in this repository as this had an example of cucumber tests running in parallel.
But when I try and run my runner class, it just pretty much runs them sequentially as opposed to parralelly so not sure why. Can anyone point out my mistake?
I am using WebDriver in my tests.
Related
I have worked with WebObjects for quite some time. I decided to move to a maven build and for some reason my associated frameworks resources are not being found in /Contents/Frameworks in the built product. So when I run the D2W application I am getting no Image files, stylesheets or any web files that are part of the frameworks.
The application appears to compile fine. but when run the application, resources from the frameworks are not being found. I found the referenced frameworks under Contents/Frameworks. I did attempt to use WOFrameworkBaseURL to point to /WebObjects/myappname/Frameworks and that did not solve the issue.
Here is my POM.XML
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.mozaic</groupId>
<artifactId>mozaicv2</artifactId>
<packaging>woapplication</packaging>
<version>1.0-SNAPSHOT</version>
<name>mozaicv2 WebObjects Application</name>
<url>http://maven.apache.org</url>
<properties>
<!-- properties used for filtering and dependency management -->
<jvmtarget>1.6</jvmtarget>
<mainclass>com.nttdata.mozaicv2.application.Application</mainclass>
<webobjects.groupId>com.webobjects</webobjects.groupId>
<webobjects.version>5.4.3</webobjects.version>
<wonder.core.groupId>wonder.core</wonder.core.groupId>
<wonder.version>7.1</wonder.version>
<wonder.classifier>wo54</wonder.classifier>
</properties>
<repositories>
<!--
<repository>
<id>wocommunity</id>
<name>WOCommunity Maven 2 Releases Repository</name>
<url>http://maven.wocommunity.org/content/groups/public</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
-->
<repository>
<id>wonder</id>
<name>WOCommunity Maven 2 Releases Repository</name>
<url>https://mvnrepository.com/artifact</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>wocommunity</id>
<name>WOCommunity Maven 2 Releases Repository</name>
<url>http://maven.wocommunity.org/content/groups/public</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</pluginRepository>
</pluginRepositories>
<build>
<finalName>${project.artifactId}</finalName>
<!--
<resources>
<resource>
<targetPath>Resources</targetPath>
<directory>${basedir}/src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<targetPath>Resources</targetPath>
<directory>${basedir}/src/main/components</directory>
</resource>
<resource>
<targetPath>WebServerResources</targetPath>
<directory>${basedir}/src/main/webserver-resources</directory>
</resource>
</resources>
-->
<plugins>
<plugin>
<groupId>org.objectstyle.woproject.maven2</groupId>
<artifactId>maven-wolifecycle-plugin</artifactId>
<version>2.0.17</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${jvmtarget}</source>
<target>${jvmtarget}</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<archiveClasses>true</archiveClasses>
</configuration>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>wonder.ajax</groupId>
<artifactId>Ajax</artifactId>
<version>7.1</version>
</dependency>
<dependency>
<groupId>wonder.eof</groupId>
<artifactId>ERAttributeExtension</artifactId>
<version>7.1</version>
</dependency>
<dependency>
<groupId>wonder.ajax</groupId>
<artifactId>ERCoolComponents</artifactId>
<version>7.1</version>
</dependency>
<dependency>
<groupId>wonder.core</groupId>
<artifactId>ERDirectToWeb</artifactId>
<version>7.1</version>
</dependency>
<dependency>
<groupId>${wonder.core.groupId}</groupId>
<artifactId>ERExtensions</artifactId>
<version>${wonder.version}</version>
</dependency>
<dependency>
<groupId>wonder.d2w</groupId>
<artifactId>ERModernDefaultSkin</artifactId>
<version>${wonder.version}</version>
</dependency>
<dependency>
<groupId>wonder.d2w</groupId>
<artifactId>ERModernDirectToWeb</artifactId>
<version>${wonder.version}</version>
</dependency>
<dependency>
<groupId>wonder.d2w</groupId>
<artifactId>ERModernLook</artifactId>
<version>7.1</version>
</dependency>
<dependency>
<groupId>${wonder.core.groupId}</groupId>
<artifactId>ERPrototypes</artifactId>
<version>${wonder.version}</version>
</dependency>
<!--webobjects-->
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaDirectToWeb</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaDTWGeneration</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaEOAccess</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaEOControl</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaEOProject</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaFoundation</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaJDBCAdaptor</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaWebObjects</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaWOExtensions</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaXML</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>wonder.misc</groupId>
<artifactId>WOLips</artifactId>
<version>${wonder.version}</version>
</dependency>
<dependency>
<groupId>${webobjects.groupId}</groupId>
<artifactId>JavaWOJSPServlet</artifactId>
<version>${webobjects.version}</version>
</dependency>
<dependency>
<groupId>${wonder.core.groupId}</groupId>
<artifactId>WOOgnl</artifactId>
<version>${wonder.version}</version>
</dependency>
<dependency>
<groupId>${wonder.core.groupId}</groupId>
<artifactId>ERServlet</artifactId>
<version>1.0</version>
</dependency>
</dependencies>
</project>```
Please help.
Thanks in advance.
This is where I would start:
<plugin>
<groupId>org.objectstyle.woproject.maven2</groupId>
<artifactId>maven-wolifecycle-plugin</artifactId>
<version>2.0.17</version>
<extensions>true</extensions>
</plugin>
That is quite an old version of the WOLifecycle Maven Plugin. Replace it with this:
<plugin>
<groupId>org.wocommunity</groupId>
<artifactId>wolifecycle-maven-plugin</artifactId>
<version>2.3</version>
<extensions>true</extensions>
</plugin>
If your issue persists, we can investigate further. As an aside, while I am happy to answer questions here on StackOverflow, there's probably a marginally larger community over on the WebObjects Development mailing list.
I am trying to run one of the Red Hat example project: cxf-soap, but encountered below error in POM.xml file.
> Project build error: Non-resolvable parent POM for > org.jboss.quickstarts.fuse:cxf-soap:6.2.1.redhat-084: Failure to find > org.jboss.quickstarts.fuse:cxf:pom:6.2.1.redhat-084 in http:// > maven.repository.redhat.com/ga/ was cached in the local repository, > resolution will not be reattempted until the update interval of > redhat-ga-repository has elapsed or updates are forced and > 'parent.relativePath' points at wrong local POM
POM.xml file is:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.jboss.quickstarts.fuse</groupId>
<artifactId>cxf</artifactId>
<version>6.2.1.redhat-084</version>
</parent>
<groupId>org.jboss.quickstarts.fuse</groupId>
<artifactId>cxf-soap</artifactId>
<version>6.2.1.redhat-084</version>
<packaging>bundle</packaging>
<name>JBoss Fuse Quickstart: soap</name>
<description>SOAP example using JAXWS</description>
<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>
<repositories>
<repository>
<id>fuse-public-repository</id>
<name>FuseSource Community Release Repository</name>
<url>https://repo.fusesource.com/nexus/content/groups/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>fuse-public-repository</id>
<name>FuseSource Community Release Repository</name>
<url>https://repo.fusesource.com/nexus/content/groups/public</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
</pluginRepository>
</pluginRepositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.7</maven.compiler.target>
<maven.compiler.source>1.7</maven.compiler.source>
<cxf-version>3.0.2</cxf-version>
<version.maven-surefire-plugin>2.15</version.maven-surefire-plugin>
<version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
<skipTests>true</skipTests>
<!-- the version of the BOM, defining all the dependency versions -->
<fabric.version>1.2.0-SNAPSHOT</fabric.version>
<!-- fabric8 deploy profile configuration -->
<fabric8.profile>quickstarts-cxf-soap</fabric8.profile>
<fabric8.parentProfiles>feature-cxf</fabric8.parentProfiles>
<fabric8.features>fabric-cxf cxf-jaxws</fabric8.features>
<!-- the version of the JBoss Fuse BOM, defining all the dependency versions -->
<jboss.fuse.bom.version>6.2.1.redhat-084</jboss.fuse.bom.version>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jboss.fuse.bom</groupId>
<artifactId>jboss-fuse-parent</artifactId>
<version>${jboss.fuse.bom.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!--
For coding the example, we don't actually depend on any CXF classes - we only use the JAX-WS
standard annotations
-->
<dependency>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
<scope>provided</scope>
</dependency>
<!--
For logging, we will use SLF4J, which is also available in the container by default.
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<!-- Test Dependencies -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!--
Add the slf4j-log4j12 dependency jar for testing
-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>shared</finalName>
<plugins>
<!-- Skip Test by default and enable them only in Test profile -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.maven-surefire-plugin}</version>
<configuration>
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<version>${version.maven-bundle-plugin}</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>
javax.jws;version="[0,3)",
javax.wsdl,
javax.xml.namespace,
org.apache.cxf.helpers,
org.osgi.service.blueprint,
io.fabric8.cxf.endpoint,
org.apache.cxf.transport.http
</Import-Package>
<Import-Service>org.apache.aries.blueprint.NamespaceHandler;
osgi.service.blueprint.namespace=http://cxf.apache.org/transports/http/configuration
</Import-Service>
<Export-Package>
io.fabric8.quickstarts.soap
</Export-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-java2ws-plugin</artifactId>
<version>3.0.4.redhat-621084</version>
<executions>
<execution>
<id>process-classes</id>
<phase>process-classes</phase>
<goals>
<goal>java2ws</goal>
</goals>
<configuration>
<className>io.fabric8.quickstarts.soap.HelloWorld</className>
<genWsdl>true</genWsdl>
<attachWsdl>false</attachWsdl>
<verbose>true</verbose>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<!--
this plugin will use the fabric.* properties to configure its behaviour
see the Properties section here: http://fabric8.io/gitbook/mavenPlugin.html
-->
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>1.2.0.redhat-621084</version>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>test</id>
<properties>
<skipTests>false</skipTests>
</properties>
<build>
<defaultGoal>verify</defaultGoal>
</build>
</profile>
</profiles>
</project>
I am using below software:
Maven 3.6.3
JDK 1.8
JBoss Fuse 7.2.0
Any idea how to resolve this issue please?
RESOLVED - this is the issue with RED HAT JBOSS version. I have downloaded version 6.3.0 and it runs as expected, generated the WSDL file.
I am sure this is an easy configuration issue of some kind but I can not find it. When I run my java code in STS
Spring Tool Suite
Version: 3.8.3.RELEASE
Build Id: 201612191457
Platform: Eclipse Mars.2 (4.5.2)
All runs well. No errors, no issues. The code does everything it should.
When I build the jar with mvn package from the command line and then try to run it I get:
2017-07-17 19:04:55,805 4523 ERROR com.zaxxer.hikari.pool.PoolBase - HikariPool-3 - Failed to execute isValid() for connection, co\
nfigure connection test query (com.ibm.db2.jcc.t4.b.isValid(I)Z).
Exception in thread "ThreadPoolTaskExecutor-1" 2017-07-17 19:04:55,807 4525 ERROR com.zaxxer.hikari.pool.PoolBase - HikariPool-2 -\
Failed to execute isValid() for connection, configure connection test query (com.ibm.db2.jcc.t4.b.isValid(I)Z).
2017-07-17 19:04:55,807 4525 ERROR com.zaxxer.hikari.pool.PoolBase - HikariPool-1 - Failed to execute isValid() for connection, co\
nfigure connection test query (com.ibm.db2.jcc.t4.b.isValid(I)Z).
2017-07-17 19:04:55,807 4525 ERROR com.zaxxer.hikari.pool.PoolBase - HikariPool-4 - Failed to execute isValid() for connection, co\
nfigure connection test query (com.ibm.db2.jcc.t4.b.isValid(I)Z).
Exception in thread "ThreadPoolTaskExecutor-1" Exception in thread "ThreadPoolTaskExecutor-1" Exception in thread "ThreadPoolTaskEx\
ecutor-1" java.lang.AbstractMethodError: com.ibm.db2.jcc.t4.b.isValid(I)Z
at com.zaxxer.hikari.pool.PoolBase.checkDriverSupport(PoolBase.java:434)
at com.zaxxer.hikari.pool.PoolBase.setupConnection(PoolBase.java:405)
at com.zaxxer.hikari.pool.PoolBase.newConnection(PoolBase.java:363)
at com.zaxxer.hikari.pool.PoolBase.newPoolEntry(PoolBase.java:201)
I have checked everything I know to check and am at a loss. I feel like this must be a build setting someplace I have missed but I can not find anything.
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>GroupID</groupId>
<artifactId>ArtifactId</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>name</name>
<description>description</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.BUILD-SNAPSHOT</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>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc</artifactId>
<version>10.5</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>20030203.000129</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</dependency>
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
<version>2.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
</plugins>
<finalName>${project.artifactId}</finalName>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/snapshot</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
<pluginRepository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/milestone</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>
The isValid method was added in JDBC 4.0.
issue in added dependency :
<dependency>
<groupId>com.ibm.db2</groupId>
<artifactId>db2jcc</artifactId>
<version>10.5</version>
<scope>compile</scope>
</dependency>
you need to use :
<dependency>
<groupId>com.ibm.db2.jcc</groupId>
<artifactId>db2jcc4</artifactId>
<version>10.1</version>
</dependency>
I Trying to test my app with vaadin testbench but when I try to run my test with
mvn clean verify he don`t start my server to execute the tests, I using this sample: https://vaadin.com/docs/-/part/testbench/testBench-tutorial.html and 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.lumera</groupId>
<artifactId>integra</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>integra</name>
<prerequisites>
<maven>3</maven>
</prerequisites>
<properties>
<vaadin.version>7.7.0</vaadin.version>
<vaadin.plugin.version>${vaadin.version}</vaadin.plugin.version>
<vaadin.testbench.version>4.1.0.alpha2</vaadin.testbench.version>
<jetty.plugin.version>9.3.9.v20160517</jetty.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<!-- If there are no local customisations, this can also be "fetch" or
"cdn" -->
<vaadin.widgetset.mode>local</vaadin.widgetset.mode>
</properties>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>vaadin-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-snapshots</id>
<url>http://oss.sonatype.org/content/repositories/vaadin-snapshots/</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</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>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.6</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<!-- Exclude an unnecessary file generated by the GWT compiler. -->
<packagingExcludes>WEB-INF/classes/VAADIN/widgetsets/WEB-INF/**</packagingExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>${vaadin.plugin.version}</version>
<executions>
<execution>
<goals>
<goal>update-theme</goal>
<goal>update-widgetset</goal>
<goal>compile</goal>
<!-- Comment out compile-theme goal to use on-the-fly theme compilation -->
<goal>compile-theme</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>3.0.0</version>
<!-- Clean up also any pre-compiled themes -->
<configuration>
<filesets>
<fileset>
<directory>src/main/webapp/VAADIN/themes</directory>
<includes>
<include>**/styles.css</include>
<include>**/styles.scss.cache</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
<!-- The Jetty plugin allows us to easily test the development build by
running jetty:run on the command line. -->
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.plugin.version}</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-jackson2-provider</artifactId>
<version>3.0.19.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-client</artifactId>
<version>3.0.19.Final</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench-api</artifactId>
<version>${vaadin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>ckeditor-wrapper-for-vaadin</artifactId>
<version>7.10.9</version>
</dependency>
<dependency>
<groupId>org.vaadin.addon</groupId>
<artifactId>easyuploads</artifactId>
<version>7.4.6</version>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>vaadin-grid-util</artifactId>
<version>1.0.8</version>
</dependency>
<dependency>
<groupId>de.steinwedel.vaadin.addon</groupId>
<artifactId>messagebox</artifactId>
<version>3.0.17</version>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-testbench</artifactId>
<version>4.1.0.alpha2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>vaadin-combobox-multiselect</artifactId>
<version>1.1.11</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-server</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-push</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-client-compiled</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-themes</artifactId>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
</dependencies>
<profiles>
<profile>
<!-- Vaadin pre-release repositories -->
<id>vaadin-prerelease</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<repositories>
<repository>
<id>vaadin-addons</id>
<url>http://maven.vaadin.com/vaadin-addons</url>
</repository>
<repository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>vaadin-prereleases</id>
<url>http://maven.vaadin.com/vaadin-prereleases</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
</project>
But I have noted that when start my server before run tests, my test pass, but after run the tests he tried to start my server
I Put the original start/stop jetty
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty.plugin.version}</version>
<configuration>
<scanIntervalSeconds>2</scanIntervalSeconds>
</configuration>
</plugin>
but don`t work.
I don't see any Jetty configuration described in the "Start the Server Automatically" section of the linked document. The start and stop goals which are there tied to the pre-integration-test/post-integration-test phase will take care of starting the server before integration tests are run and stopping it afterwards.
Finally you need to ensure that your test is run in the integration test phase and not in the unit test phase. If they are run in the unit test phase, the pre-integration-test phase has not yet been executed and the server has not been started. Name your test SomethingIT.java (not SomethingTest.java) to ensure that it is run in the integration test phase.
To deploy 3rd party JAR (OpenNlP) on marven remote repository I am using
E:\PROSOL\prosol\prosol>mvn deploy:deploy-file -Dfile=opennlp-1.5.3.jar -DgroupId=opennlp.tools -DartifactId=opennlp -Dversion=1.5.3 -Dpackaging=jar -DrepositoryId=eap -Durl=http://maven.repository.redhat.com/techpreview/all
pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>prosol</groupId>
<artifactId>prosol</artifactId>
<packaging>war</packaging>
<version>1.0</version>
<name>prosol</name>
<repositories>
<repository>
<id>eap</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>eap</id>
<url>http://maven.repository.redhat.com/techpreview/all</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.6</maven.compiler.source>
<maven.compiler.target>1.6</maven.compiler.target>
</properties>
<dependencies>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.2-1003-jdbc4</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.25</version>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>1.2.2</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>jboss.web</groupId>
<artifactId>servlet-api</artifactId>
<version>3.0.0.alpha-13</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>javax.servlet.jsp</groupId>
<artifactId>jsp-api</artifactId>
<version>2.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>opennlp.tools</groupId>
<artifactId>opennlp</artifactId>
<version>1.5.3</version>
<type>jar</type>
</dependency>
</dependencies>
<profiles>
<profile>
<!-- When built in OpenShift the 'openshift' profile will be used when
invoking mvn. -->
<!-- Use this profile for any OpenShift specific customization your app
will need. -->
<!-- By default that is to put the resulting archive into the 'webapps'
folder. -->
<!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
<id>openshift</id>
<build>
<finalName>prosol</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>webapps</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
After execution it shows
what this error means and how can I resolve it ?
Please reply this is my final year project