As part of regression suite I need to trigger the automation soap UI suite post new build is triggered, but I dont have idea to integrate these tools together,
I am not able to find any plugin for soap UI/ready api, so kindly assist me on this....
Mule applications use Maven as a build tool so you can integrate SoapUI tests as part of the Maven build phase. Here is some info on the maven plugin:
https://support.smartbear.com/readyapi/docs/integrations/maven/index.html
Googling Maven Soap UI also returns blog posts on setting this up and some example github repos.
You can follow below steps--
1. Write your test cases in SOAP UI and export the test suite XML.
2. create a maven project and use your test suite details to configure the below POM file.
<projectFile>soapUi-TestSuite File Location</projectFile>
<testSuite>TestSuiteName</testSuite>
<endpoint>endpoint URL</endpoint>
run - mvn clean test
<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>RegTesting</groupId>
<artifactId>RegTesting</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>RegTesting</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>Central</id>
<url>http://central.maven.org/maven2/</url>
</repository>
</repositories>
<!-- Plugin repository for test suites generated via soap UI -->
<pluginRepositories>
<pluginRepository>
<id>smartbear-sweden-plugin-repository</id>
<url>http://www.soapui.org/repository/maven2/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-maven-plugin</artifactId>
<version>5.4.0</version>
<configuration>
<projectFile>soapUi-TestSuite File Location</projectFile>
<testSuite>TestSuiteName</testSuite>
<endpoint>endpoint URL</endpoint>
<printReport>true</printReport>
<junitReport>false</junitReport>
<outputFolder>target</outputFolder>
</configuration>
<dependencies>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>org.skyscreamer</groupId>
<artifactId>jsonassert</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>com.jgoodies</groupId>
<artifactId>forms</artifactId>
<version>1.0.7</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project> ```
Related
I'm new to Maven and am trying to create a simple Maven project given in geotools.org
<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>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- use the latest snapshot -->
<geotools.version>17-SNAPSHOT</geotools.version>
</properties>
<groupId>org.geotools</groupId>
<artifactId>tutorial</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>tutorial</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-shapefile</artifactId>
<version>${geotools.version}</version>
</dependency>
<dependency>
<groupId>org.geotools</groupId>
<artifactId>gt-swing</artifactId>
<version>${geotools.version}</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>maven2-repository.dev.java.net</id>
<name>Java.net repository</name>
<url>http://download.java.net/maven/2</url>
</repository>
<repository>
<id>osgeo</id>
<name>Open Source Geospatial Foundation Repository</name>
<url>http://download.osgeo.org/webdav/geotools/</url>
</repository>
<repository>
<snapshots>
<enabled>true</enabled>
</snapshots>
<id>boundless</id>
<name>Boundless Maven Repository</name>
<url>http://repo.boundlessgeo.com/main</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<inherited>true</inherited>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>
</project>
The error I am getting is 'Offline / Missing artifact org.geotools:gt-shapefile:jar:17-SNAPSHOT'. How do I resolve this? I am using Eclipse Neon.1a Release (4.6.1).There is no option for selecting Project ‣ Update All Maven Dependencies. In some of the similar questions asked here it was recommended to change the repository URL. Which URL shall I change? Java.net repository OR Open Source Geospatial Foundation Repository OR Boundless Maven Repository?
It looks like the Boundless artifactory was down at that moment. For the time being you can use version 16-RC1 as the latest released version, 15.2 as the last stable release.
If you absolutely must be on the cutting edge, I'd recommend downloading/cloning master and building it locally.
I think that instead of ${geotools.version} you should place a real version number of the project, like 15.1
I am not sure though if that's the problem
Also, you might want to consider changing to Gradle build. I think it is a lot simpler
I'm writing an eclipse plugin and I'd like to manage it using Maven, specifically dependencies.
Here is my pom.xml 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.example.plugin</groupId>
<artifactId>SomePlugin</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<tycho.version>0.24.0</tycho.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-maven-plugin</artifactId>
<version>${tycho.version}</version>
<extensions>true</extensions>
</plugin>
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>tycho-versions-plugin</artifactId>
<version>${tycho.version}</version>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>luna</id>
<layout>p2</layout>
<url>http://download.eclipse.org/releases/luna</url>
</repository>
</repositories>
</project>
I can successfully build this project, however Junit is not visible in my project, I'm not able to call any classes or method from Junit. So it seems I'm not properly using dependencies . Any idea how I can use dependencies? Junit is just an example, no dependency is available to me after a successful build.
I'm a noob to plugins and Maven so any help or guidance would be much appreciated.
You can create a p2 repository from a location of your own filled with jars/plugins/features (also put there jUnit) and then just add that repository to your pom.xml; the external dependency is not a good idea I think, I would recommend using a cached local repository.
How to create p2 repository : http://wiki.eclipse.org/Equinox/p2/Publisher#Features_And_Bundles_Publisher_Application.
Also, when building your Eclipse RCP product, use a custom target platform and also dump in there Eclispe SDK, JUnit+others jars, etc (just google Eclipe target platform)
A very late answer. For those who come on this now, there is the Orbit Eclipse repository which contain a lot of libraries useable with Tycho builds. Junit is one of these.
I want to pre-compile my .drl files to .class files so they do not have to be compiled a run time. The documentation makes it sounds like the kie-maven-plugin does this, but it is not generating anything for me. It compiles the rules files but does not output anything. Any suggestions?
I'm using the mvn package command, and my pom.xml file is below:
<?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.kie</groupId>
<artifactId>kie-parent-with-dependencies</artifactId>
<version>6.0.1.Final</version>
<!-- relativePath causes out-of-date problems on hudson slaves -->
<!--<relativePath>../droolsjbpm-build-bootstrap/pom.xml</relativePath>-->
</parent>
<packaging>kjar</packaging>
<artifactId>default-kiesession</artifactId>
<name>Drools API examples - Default KieSession</name>
<dependencies>
<dependency>
<groupId>org.drools</groupId>
<artifactId>drools-compiler</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.kie</groupId>
<artifactId>kie-maven-plugin</artifactId>
<version>6.0.1.Final</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.6.1</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
<repositories>
<!-- Bootstrap repository to locate the parent pom when the parent pom has not been build locally. -->
<repository>
<id>jboss-public-repository-group</id>
<name>JBoss Public Repository Group</name>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
<layout>default</layout>
<releases>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>daily</updatePolicy>
</snapshots>
</repository>
</repositories>
<scm>
<connection>scm:git:git#github.com:droolsjbpm/drools.git</connection>
<developerConnection>scm:git:git#github.com:droolsjbpm/drools.git</developerConnection>
<url>https://github.com/droolsjbpm/drools</url>
</scm>
</project>
There was a bug in 6.0.1.Final that caused the maven plugin to not save the compiled bytecode inside the kjar. It was fixed after, so if you take the 6.0.2-SNAPSHOT (community) version, or the RedHat BRMS 6.0.1.GA (product) version, it will work.
BZ ticket: https://bugzilla.redhat.com/show_bug.cgi?id=1063255
commit that fixes the bug: https://github.com/droolsjbpm/drools/commit/94b9ccf810100c7ec3f8ed186111720ddb2729d3
FYI, when the correct kjar is generated, it contains a kbase.cache file inside the jar for each defined kbase. These cache files contain the compiled bytecode.
It works for me with kie-maven-plugin 6.1.0.Final, but packaging "kjar" should be specified in order to get KIE base cache inside jar file.
It's described in Drools documentation. Just for anybody who find this as first post for 'precompile gdst' on google ;-).
You have to define generateModel=YES when compiling. On mvn command line -DgenerateModel=YES or in pom.xml inside kie-maven-plugin <configuration> secion with <generateModel>YES</generateModel>
I have been told that the install goal should mean that my resulting jar file will have all required dependencies included into the deployment. This, however, doesn't appear to be working for me.
Here's 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.zone.commandit</groupId>
<artifactId>CommandIt</artifactId>
<version>0.2</version>
<name>CommandIt</name>
<repositories>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public</url>
</repository>
<repository>
<id>milkbowl-repo</id>
<url>http://ci.herocraftonline.com/plugin/repository/everything/</url>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.5.2-R1.0</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>net.milkbowl.vault</groupId>
<artifactId>Vault</artifactId>
<version>1.2.26-SNAPSHOT</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>se.krka.kahlua</groupId>
<artifactId>kahlua-cldc11</artifactId>
<version>5.1_2.1.0</version>
</dependency>
<dependency>
<groupId>se.krka.kahlua</groupId>
<artifactId>kahlua-core</artifactId>
<version>5.1_2.1.0</version>
</dependency>
<dependency>
<groupId>se.krka.kahlua</groupId>
<artifactId>kahlua-interpreter</artifactId>
<version>5.1_2.1.0</version>
</dependency>
<dependency>
<groupId>se.krka.kahlua</groupId>
<artifactId>kahlua-j2se</artifactId>
<version>5.1_2.1.0</version>
</dependency>
</dependencies>
</project>
From this, I expect a CommandIt-0.2.jar file with commons-io and the kahlua libraries (which are installed in the local repository). The bukkit and Vault dependencies should not be included as they are provided in the runtime environment.
However, upon inspecting the project jar file with 7zip, I find only META-INF and my own source code. What am I doing wrong?
You can use the Maven Assembly plugin to generate a JAR containing all your dependencies.
Add the following in the build > plugins section:
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
</plugin>
The Maven target to run this plugin is assembly:single.
Maven dependencies are downloaded to the local maven repository, it is usually .m2 directory in your user home directory. Packaging JAR doesn't include any other JARs into the result. If you want to make a web application, use packaging WAR (or EAR). In the WAR file there are your JARs inc. all dependencies included.
mvn install executes plugins which simply put whatever artifacts were built, in this case a JAR file with your code, into your local repository, typically located at ~/.m2/repository.
If you want to assemble something to distribute, like a tarball containing JARs and shell scripts, looking into the Maven assembly plugin. If you want to assemble a single JAR file containing your code and the code in your dependencies, the Maven assembly plugin can be run using the jar-with-dependencies descriptor.
I use the latest m2eclipse to generate a standard ejb project, but then I got an error:
Missing artifact javaee:javaee-api:jar:5:provided
The pom.xml is as follow:
<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>IMS-LEXXWAR</groupId>
<artifactId>ims.base.ejb</artifactId>
<packaging>ejb</packaging>
<version>1.0.0</version>
<name>ims.base.ejb JEE5 EJB</name>
<url>http://maven.apache.org</url>
<dependencies>
<dependency>
<groupId>javaee</groupId>
<artifactId>javaee-api</artifactId>
<version>5</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net1</id>
<name>Java.Net Maven1 Repository, hosts the javaee-api dependency</name>
<url>http://download.java.net/maven/1</url>
<layout>legacy</layout>
</repository>
</repositories>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
<source>1.5</source>
<target>1.5</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ejb-plugin</artifactId>
<version>2.1</version>
<configuration>
<ejbVersion>3.0</ejbVersion>
</configuration>
</plugin>
</plugins>
<finalName>ims.base.ejb</finalName>
</build>
</project>
What's wrong?
I ended up using this:
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>javaee-api</artifactId>
<version>5.0-2</version>
<type>jar</type>
<scope>provided</scope>
</dependency>
This is a weird problem as things are working fine on my machine (c). With the the following repository definition:
<repositories>
<repository>
<id>java-net-m1-repository</id>
<name>Java.net Maven 1.x Repository</name>
<url>http://download.java.net/maven/1</url>
<layout>legacy</layout>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
And this dependency:
<dependencies>
<dependency>
<groupId>javaee</groupId>
<artifactId>javaee-api</artifactId>
<version>5</version>
<scope>provided</scope>
</dependency>
</dependencies>
The artifact gets downloaded by m2eclipse/maven without problems:
1/19/10 3:09:48 PM CET: Downloading java-net-m1-repository : javaee/poms/javaee-api-5.pom
1/19/10 3:09:48 PM CET: Downloaded [java-net-m1-repository] -> http://download.java.net/maven/1/javaee/poms/javaee-api-5.pom
1/19/10 3:09:49 PM CET: Downloading java-net-m1-repository : javaee/jars/javaee-api-5.jar
1/19/10 3:09:52 PM CET: Downloaded [java-net-m1-repository] -> http://download.java.net/maven/1/javaee/jars/javaee-api-5.jar
So I actually don't know what is happening exactly.
To debug it, I'd first switch to the command line. In your case, I'd start by checking the URL from which the artifact is getting downloaded (this should be printed in the console, using the -X option shouldn't be necessary) and try to mimic this download with something like wget.
If you don't find anything obvious, then check the effective POM that you can obtain using the following command:
mvn help:effective-pom
It's hard to point you in a special direction without more details but I would take a look at it (could it be a proxy problem?).
Another idea would be to try to reproduce this problem on another machine/configuration and, if it works, check the differences.
As I said, this should just work. But without a way to reproduce and/or more information, debugging this problem feels like walking in the dark :)
You don't have the artifact installed in the local repository and maven cannot find it in the repositories it knows about either.
The name for javaee.javaee-api looks formal enough but mvnrepository.com does not know anything about it. If it is a jar which you have locally (why would it be called javaee though?), you need to install it in the local mvn repository using the mvn install command (the exact command used for installing is usually provided with that error you've been seeing).