Combining Maven, SoapUi and HermesJMS

让人想犯罪 __ 提交于 2019-12-08 05:00:47

问题


I need to automate a SoapUI-project that uses HermesJMS with Maven2. The Problem I get is that SoapUI does fail on integrating the HermesJMS into its Classpath.

2012-09-20 15:48:21,340 ERROR [SoapUI] An error occured [java.lang.NullPointerException], see error log for details
2012-09-20 15:48:21,465 ERROR [errorlog] java.lang.NullPointerException
java.lang.NullPointerException
at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.addHermesJarsToClasspath(HermesUtils.java:120)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.getHermes(HermesUtils.java:74)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.hermesContext(HermesUtils.java:55)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.util.HermesUtils.getHermes(HermesUtils.java:200)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.HermesJmsRequestTransport.getHermes(HermesJmsRequestTransport.java:211)
at com.eviware.soapui.impl.wsdl.submit.transports.jms.HermesJmsRequestTransport.init(HermesJmsRequestTransport.java:102)

Seems like the integration is not quite as smooth as I thought it would be.

Here the Plugin configuration:

<plugin>
        <groupId>eviware</groupId>
        <artifactId>maven-soapui-plugin</artifactId>
        <version>4.5.1</version>
        <dependencies>
                <!-- Start IBM DB2 Support -->
                <dependency>
                        <groupId>com.ibm.db2</groupId>
                        <artifactId>db2jcc</artifactId>
                        <version>3.1.57</version>
                </dependency>
                <dependency>
                        <groupId>com.ibm.db2</groupId>
                        <artifactId>db2jcc_license_cu</artifactId>
                        <version>3.1.57</version>
                </dependency>
                <dependency>
                        <groupId>com.ibm.db2</groupId>
                        <artifactId>db2jcc_license_cisuz</artifactId>
                        <version>3.1.57</version>
                </dependency>
                <!-- End IBM DB2 Support -->
                <dependency>
                        <groupId>hermesjms</groupId>
                        <artifactId>hermes</artifactId>
                        <version>1.14</version>
                </dependency>
        </dependencies>
        <configuration>
                <projectFile>src/test/resources/config/BATS-soapui.xml</projectFile>
                <testSuite>BATS</testSuite>
                <outputFolder>${basedir}/target/soapui</outputFolder>
                <projectProperties>
                        <value>outputFileLocation=${outputFileLocation}</value>
                        <value>malpakke=${malpakke}</value>
                        <value>fagomrade=${fagomrade}</value>
                        <value>useDatabase=${useDatabase}</value>
                </projectProperties>
        </configuration>
        <executions>
                <execution>
                        <phase>integration-test</phase>
                        <goals>
                                <goal>test</goal>
                        </goals>
                </execution>
        </executions>
</plugin>

I guess SoapUI does not find Hermes correctly - but how do I fix that?


回答1:


I have this up and running with the following steps:

  • Add the hermes-1.14 dependency in the pom.xml
  • Copy a hermesJMS installation to the filesystem of the buildserver
  • Add hermes-config.xml to the project, but copy it to the filesystem before every build
  • Add soapui-settings.xml to the project and use it with the -tag in the soapui-maven-plugin
  • Update soapui-settings.xml with the path of your hermesJMS installation
  • Update the SoapUI projectfile with the path of the location of your hermes-config.xml

(Keep in mind that path locations in configuration files are best to be kept OS agnostic).




回答2:


I finally solved this problem. Turns out, the dependencies for hermes in pom.xml do not make hermes available to soapUi. We ended up with including the hermes folder inside our /src/test/resources folder and pointed towards this folder inside the project XML.




回答3:


I know its late, but anyway it will be helpful for others.

I got Hermes working with Maven by specifying the location of SOAPUI settings XML within pom xml under configuration element:

<settingsFile>C:/softwares/soapui/soapui-settings.xml</settingsFile>

By this way, we dont need to copy hermes folder.



来源:https://stackoverflow.com/questions/12514808/combining-maven-soapui-and-hermesjms

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!