将 SoapUI maven 插件与 GitLab 一起使用 - 无法解析依赖关系

Using SoapUI maven plugin with GitLab - dependencies could not be resolved

我在 Gitlab 管道中设置 SoapUI 测试时遇到了一些困难。起初我原则上成功地让他们达到 运行。到目前为止,我已经将我的真实测试添加到项目中,并在 JDBC 步骤中遇到了一些问题。我的步骤中有 Oracle 和 Postgres 连接。你们中的一些人能告诉我我做错了什么吗?

起初我遇到左右连接错误。然后我意识到我可能需要添加依赖项。我添加了

              <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>42.2.8</version>
              </dependency>

但没有任何改变。我还添加了 oracle 驱动程序,但现在我得到

[ERROR] Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:5.5.0:test (default) on project dsa-otsusetugi-soapui-tests: Execution default of goal com.smartbear.soapui:soapui-maven-plugin:5.5.0:test failed: Plugin com.smartbear.soapui:soapui-maven-plugin:5.5.0 or one of its dependencies could not be resolved: Failed to collect dependencies at com.smartbear.soapui:soapui-maven-plugin:jar:5.5.0 -> com.oracle:ojdbc8:jar:12.2.0.1.0: Failed to read artifact descriptor for com.oracle:ojdbc8:jar:12.2.0.1.0: Could not transfer artifact com.oracle:ojdbc8:pom:12.2.0.1.0 from/to rmv_repo (http://repo.rmv/nexus/repository/maven-public/): Transfer failed for http://repo.rmv/nexus/repository/maven-public/com/oracle/ojdbc8/12.2.0.1.0/ojdbc8-12.2.0.1.0.pom: Unknown host repo.rmv: Name or service not known -> [Help 1]

有趣的是我在下载阶段没有遇到任何错误.. https://pastebin.com/1HGXytJk

目前我的包含依赖项的 pom 文件如下所示:

<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>blaa.blaah</groupId>
<artifactId>blaa-blaah</artifactId>
<version>1.0-SNAPSHOT</version>
<name>BLAAHSoapUITests</name>

<properties>
    <maven.compiler.source>${java.version}</maven.compiler.source>
    <maven.compiler.target>${java.version}</maven.compiler.target>
    <maven.version>3.0.0</maven.version>
    <soapui.version>5.5.0</soapui.version>
    <surefire.version>2.20</surefire.version>
</properties>
<pluginRepositories>
    <pluginRepository>
        <id>SmartBearPluginRepository</id>
        <url>http://smartbearsoftware.com/repository/maven2/</url>
    </pluginRepository>
</pluginRepositories>
    <build>
    <plugins>
      <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>properties-maven-plugin</artifactId>
         <version>1.0.0</version>
         <executions>
           <execution>
             <phase>initialize</phase>
             <goals>
               <goal>read-project-properties</goal>
             </goals>
             <configuration>
               <files>
                 <file>${project.basedir}/test.properties</file>
               </files>
             </configuration>
           </execution>
         </executions>
      </plugin>
        <plugin>
            <groupId>com.smartbear.soapui</groupId>
            <artifactId>soapui-maven-plugin</artifactId>
            <version>${soapui.version}</version>
            <configuration>
              <soapuiProperties>
                    <property>
                    <name>soapui.logroot</name>
                    <value>${project.basedir}/build-testlog/build-testlog-</value>
                    </property>
              </soapuiProperties>
                <projectFile>${project.basedir}/${projectfile}</projectFile>
                <projectProperties>
                    <value>END_POINT=${END_POINT}</value>
                    <value>USER_ID=${USER_ID}</value>
                </projectProperties>
                <outputFolder>${project.basedir}/build-testlog</outputFolder>
                <printReport>true</printReport>
                <junitReport>true</junitReport>
            </configuration>
            <dependencies>
              <dependency>
                  <groupId>com.smartbear.soapui</groupId>
                  <artifactId>soapui</artifactId>
                  <version>${soapui.version}</version>
                  <exclusions>
                      <exclusion>
                          <groupId>javafx</groupId>
                          <artifactId>jfxrt</artifactId>
                      </exclusion>
                  </exclusions>
              </dependency>
              <dependency>
                  <groupId>com.oracle</groupId>
                  <artifactId>ojdbc8</artifactId>
                  <version>12.2.0.1.0</version>
              </dependency>
              <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>42.2.8</version>
              </dependency>
              <dependency>
                 <groupId>com.jgoodies</groupId>
                 <artifactId>forms</artifactId>
                 <version>1.2.1</version>
             </dependency>
            </dependencies>
            <executions>
                <execution>
                    <phase>test</phase>
                    <goals>
                        <goal>test</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>
<reporting>
    <outputDirectory>${project.basedir}/build/reports/html</outputDirectory>
</reporting>

我是不是做错了什么?我使用了错误的依赖项吗?

提前致谢。

如果有人遇到类似的事情,那么我的问题就是 Gitlab runner 没有访问 postgres 数据库的权限。它确实获得了驱动程序,但由于安全设置无法连接。

无论如何,我仍然对 oracle 驱动程序有疑问,因为它没有在 smartbear 存储库中公开。我所做的是借助本教程在本地添加驱动程序:https://gist.github.com/timmolderez/92bea7cc90201cd3273a07cf21d119eb

所以最后我的 pom 看起来像这样:

<pluginRepositories>
    <pluginRepository>
        <id>SmartBearPluginRepository</id>
        <url>https://rapi.tools.ops.smartbear.io/nexus/content/groups/public/</url>
    </pluginRepository>
    <pluginRepository>
        <id>in-project</id>
        <name>In Project Repo</name>
        <url>file://${project.basedir}/lib</url>
    </pluginRepository>
</pluginRepositories>

             <dependency>
                 <groupId>oracle</groupId>
                 <artifactId>ojdbc</artifactId>
                 <version>6.0</version>
             </dependency>

groupId、artifactId 和版本(当然还有文件夹名称和 jar、pom 文件)按照教程所述命名。