hschott / ready-websocket-plugin

Websocket Test Steps Plugin for Ready! API and SoapUI
Apache License 2.0
11 stars 14 forks source link

Nonexistent dependency needed by ReadyAPI prevents the plugin from compiling #14

Closed jacopo-salamina closed 4 months ago

jacopo-salamina commented 4 years ago

Trying to compile the project at first results in the Maven repository raising a 501 error code (HTTPS Required); editing the repositories changing http into https and compiling the project again, Maven is not able to retrieve the artifact opencsv:opencsv. These are the full Maven logs before (compile-log-with-http-repositories.log) and after(compile-log-with-https-repositories.log) changing the repositories' protocols.

I've tried to dig more into this problem and I found out what seems to be the main culprit. The ReadyAPI dependency currently used (1.4.0, its pom.xml can be found at https://rapi.tools.ops.smartbear.io/nexus/content/groups/public/com/smartbear/ready-api/1.4.0/ready-api-1.4.0.pom) relies on Opencsv 1.8, but the artifact ReadyAPI points to seems to be outdated: more specifically, ReadyAPI depends on opencsv:opencsv version 1.8, but the latter doesn't exist anymore on the two configured repositories. What's even more interesting, the same pom.xml also specifies a dependency against a newer version of the same library, net.sf.opencsv:opencsv version 2.3. This artifact, however, does exist, so it's likely that the developers tried to upgrade the Opencsv library and forgot to remove the old dependency. The fact that the dependency against opencsv:opencsv was removed from version 1.5.0 onwards (the 1.5.0-AT2 pom.xml can be found at https://rapi.tools.ops.smartbear.io/nexus/content/groups/public/com/smartbear/ready-api/1.5.0-AT2/ready-api-1.5.0-AT2.pom) reinforces this hypotesis.

jacopo-salamina commented 4 years ago

As there's very little that can be done to directly tackle this issue, I made a first attempt to work around this problem. All I did was explicitly exclude the dependency against opencsv:opencsv:

<dependency>
    <groupId>com.smartbear</groupId>
    <artifactId>ready-api-ui</artifactId>
    <version>1.4.0</version>
    <scope>provided</scope>
    <exclusions>
        <exclusion>
            <groupId>opencsv</groupId>
            <artifactId>opencsv</artifactId>
        </exclusion>
    </exclusions>
</dependency>

I haven't fully tested this plugin yet, but in my production environment it seems to work. Another option could simply be upgrading com.smartbear:ready-api-ui to 1.5.0 or a later version, but this may be riskier.

hschott commented 4 months ago

Fixed with changing dependency to

<groupId>com.smartbear</groupId>
<artifactId>ready-api-soapui-pro</artifactId>
<version>3.53.0</version>