Forum Discussion

SKoneru's avatar
SKoneru
Contributor
11 years ago

[R] Compilation errors on com.eviware.soapui.junit.*

Hi,

I am implementing Custom Junit Reports by extending JUnitSecurityReportCollector class.
In my maven project I defined the dependency as follows
<dependency>
<groupId>eviware</groupId>
<artifactId>soapui-pro</artifactId>
<version>4.5.1</version>
</dependency>
This dependency is available from http://www.soapui.org/repository/maven2 ... oapui-pro/ repository.

But the custom class that I wrote didn't compile and complained "The type com.eviware.soapui.junit.Testcase can not be resolved.It is indirectly referenced from required .class files".
But it worked when I changed the dependency to the SOAPUI jar that existed in the lib folder of the downloaded SOAPUI-PRO application.

<dependency>
<groupId>eviware</groupId>
<artifactId>soapui</artifactId>
<version>4.5.2</version>
<scope>system</scope>
<systemPath>/Applications/soapUI-Pro-4.5.2.app/Contents/java/app/lib/soapui-4.5.2.jar</systemPath>
</dependency>

Question:-
1- I didn't find 4.5.2 jar is SOAPUI or SOAPUI-PRO maven repo.
2- How did pointing to 4.5.2 resolve this issue. I am expecting "com.eviware.soapui.junit.*" package should have existed in 4.5.1. But as said I see an issue with 4.5.1

Any help or suggestions will be appreciated.

10 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    Note that this may not be covering answers to your questions, rather posting what I noticed.
    com.eviware.soapui.junit - package is not there in following files. This might be the reason for getting the error.
    1. soapui-pro-4.5.1.jar
    2. soapui-4.5.1.jar
    3. soapui-pro-SNAPSHOT.jar (this is from maven repo you mentioned, may be it is not renamed to 4.5.2 on the maven repo, a guess)

    Got a 4.5.1 version. Noticed below and hoping it would be same 4.5.2 as well.
    Not sure if it is noticed, soapui-pro-4.5.1.jar file (of same size) is available under $SOAPUI_HOME/bin, $SOAPUI_HOME/lib directories.
    And soapui-4.5.1.jar of $SOAPUI_HOME/lib is huge file than other file.

    May be the class you were looking for might be available in $SOAPUI_HOME/lib/soapui-4.5.2.jar.
  • >>May be the class you were looking for might be available in $SOAPUI_HOME/lib/soapui-4.5.2.jar.
    That is exactly what I said, it works when I set the dependency in maven to my systempath
    <systemPath>/Applications/soapUI-Pro-4.5.2.app/Contents/java/app/lib/soapui-4.5.2.jar</systemPath>

    I received an email that they have created a task (SOAP-434) for this issue on issue tracking system.
    They will update once the issue is resolved.
  • nmrao's avatar
    nmrao
    Champion Level 3
    Thank you for the info.

    Not sure why file soapui-pro-4.x.x.jar is shipped in two places as well.
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi,

    soapui-pro 4.5.1: prior to the 4.5.2 version, soapui poms are not correct, they do not declare any dependencies. As a workaround, you can make your project depends on maven-soapui-pro-plugin with declare the dependencies

    4.5.2 artifacts: they are not currently deployed in the maven soapui repository, see viewtopic.php?f=1&t=19207
  • Thank you for the response.
    Currently in maven I am referring to 4.5.2 which is in SOAPUI app(that is downloaded).
    Will change this dependency setting once the jar is available in the repo.
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi SKoneru,

    As you mentioned, the maven plugin hasn't yet been released after 4.5.1. We'll make sure to notify you once we have a new jar in the maven repo, and it's looking like it will be some time after the soon coming SoapUI 4.6 REST-focused release.

    Regards,
    Arian
    SmartBear Sweden
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi,
    I've just found why there are compilation errors with soapui 4.5.1 dependency
    Classes in the com.eviware.soapui.junit are generated from xml schema.

    Starting from soapui 4.5.2, all generated classes from xml schema are directly stored in the soapui jar.
    But before, they were stored in various jar.

    So if you want to compile with soapui 4.5.1 and access to the com.eviware.soapui.junit classes, you need to add the following dependency (remember the soapui 4.5.1 pom does not declare any dependency)

    <dependency>
    <groupId>eviware</groupId>
    <artifactId>ext-xmlbeans</artifactId>
    <version>1.2</version>
    <dependency>
  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi,

    I just wanted to let you know that a new version of the SoapUI maven plugin was recently released

    Don't hesitate to ask questions if any come up.

    Regards,
    Arian
    SmartBear Sweden
  • @Arian, the original question that was posted is related 4.5.2 artifacts: they are not currently deployed in the maven soapui repository.
    With the new release, I don't think there is any news related to new version deployed in soapui maven repo.

    @redfish, I did try the suggestion that you posted. I setup dependency as follows and now noticed a different compilation issue "The type com.eviware.soapui.config.TestStepConfig cannot be resolved. It is indirectly referenced from required .class files". So for now, I will flip back to 4.5.2 dependency as I said at the beginning of this thread.

    <dependency>
    <groupId>eviware</groupId>
    <artifactId>soapui</artifactId>
    <version>4.5.1</version>
    </dependency>
    <dependency>
    <groupId>eviware</groupId>
    <artifactId>ext-xmlbeans</artifactId>
    <version>1.2</version>
    </dependency>

    Thanks
    Surya
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    SKoneru the class your are looking for (com.eviware.soapui.config.TestStepConfig) is in
    <dependency>
    <groupId>eviware</groupId>
    <artifactId>soapui-xmlbeans</artifactId>
    <version>4.5.1</version>
    </dependency>