tmulle
14 years agoOccasional Contributor
Maven3 POM for JUnit/TestNG integration - Working
Hi All,
I've been trying to get the latest version 4.5.1 of the maven-soapui-plugin to work with my TestNG tests using maven. After a lot of trial and error and searching on the net I finally found the combination of dependencies that work for me. I thought I'd share in case someone else was having issues.
Note: This is for JUnit/TestNG integration. I couldn't get the Maven plugin running from the "mvn" commands because maven doesn't allow exclusions on the plugin level. I am just using the maven dependency to for our TestNG tests which do run through maven. For some reason in 4.5.1 there are issues with the "wss4j" version embedded. I was getting a strange error about version mismatch and security class errors. I am using SAML2 assertions on my test cases so it was blowing up until I added the org.apache.* reference
Plus we are using SLF4J and I needed to also include the log4j-over-slf4j dependency to get it working.
I've been trying to get the latest version 4.5.1 of the maven-soapui-plugin to work with my TestNG tests using maven. After a lot of trial and error and searching on the net I finally found the combination of dependencies that work for me. I thought I'd share in case someone else was having issues.
Note: This is for JUnit/TestNG integration. I couldn't get the Maven plugin running from the "mvn" commands because maven doesn't allow exclusions on the plugin level. I am just using the maven dependency to for our TestNG tests which do run through maven. For some reason in 4.5.1 there are issues with the "wss4j" version embedded. I was getting a strange error about version mismatch and security class errors. I am using SAML2 assertions on my test cases so it was blowing up until I added the org.apache.* reference
Plus we are using SLF4J and I needed to also include the log4j-over-slf4j dependency to get it working.
// Add these dependencies to your POM - Make sure you've added the Eviware maven repository as well
<!-- SOAPUI Stuff -->
<dependency>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>4.5.1</version>
<exclusions>
<exclusion> <!-- Method conflicts in older version, have to use the org.apache.ws.security on below -->
<groupId>wss4j</groupId>
<artifactId>wss4j</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
<version>1.6.4</version>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>1.6.6</version>
</dependency>
<!-- SOAP UI -->