Forum Discussion

hduong_1's avatar
hduong_1
New Contributor
14 years ago

Missing dependencies in repository for maven-soapui-plugin

Hi,

I'm trying to use the maven-soapui-plugin but the tests are failing when executed via the maven plugin, although they pass when run inside SoapUI itself. When running the plugin, I get the following failed test due to a JUnit ComparisonFailure:

SoapUI 3.6 TestCaseRunner Summary
-----------------------------
Time Taken: 1236ms
Total TestSuites: 1
Total TestCases: 1 (1 failed)
Total TestSteps: 1
Total Request Assertions: 1
Total Failed Assertions: 1
Total Exported Results: 1
[ERROR] java.lang.Exception: XPath Match in [Warning if text # of char=0] failed;
[junit/framework/ComparisonFailure]
Status: FAILED
Time Taken: 85
Size: 218
Timestamp: Wed Feb 02 10:41:48 EST 2011
TestStep: Warning if text # of char=0


When running the Maven project, it seems that the plugin is trying to find libraries that do not exist inside the eviware repository. This is the warning message I receive when running the Maven project:

[WARNING] POM for 'junit:junit:pom:4.4:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'commons-jexl:commons-jexl:pom:1.0:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.
[WARNING] POM for 'xalan:xalan:pom:2.7.1:runtime' is invalid.
Its dependencies (if any) will NOT be available to the current build.


I checked in the repository at http://www.eviware.com/repository/maven2/, and indeed all those libraries do not exist in the repository. Can someone take a look and make sure the repository is up-to-date with soapui's dependencies. The problem exists for v3.5.1 and v3.6.1 of the soapui plugin.

Thanks,
-hd

11 Replies

  • jkester's avatar
    jkester
    Occasional Contributor
    For me only adding junit dependency was not enough. I also had to add dependency for xmlbeans. Adding junit dep did help me a lot though, as it made the reason why this was failing more visible.
    My failing asserts gave me a runtime exception now:
    : RuntimeException: Trying XBeans
    path engine... Trying XQRL... Trying delegated path engine... FAILED on //Response[1]/e[1]/tags[1]/e[1]/text()

    I first checked with testrunner that the same test did work using soapui without maven:
    bin\testrunner.bat -s layerId-stable C:\develop\SOAPUIprojects\FunctionalTests123.xml
    As these were working fine, it had to be a classpath issue.

    I checked in the lib directory of soapui installation, and noticed a jar xbean_xpath-2.4.0.jar. Due to its name, that was my best candidate.
    The jar had been renamed for soapui installation, but inside the jar I could see which packages were required. Now on maven repository I could track the second missing dep:
    <dependency>
    <groupId>org.apache.xmlbeans</groupId>
    <artifactId>xmlbeans-xpath</artifactId>
    <version>2.4.0</version>
    </dependency>

    Seems to be working now.