Forum Discussion

Seshan's avatar
Seshan
New Contributor
11 years ago

Issue with running SOAPUI testsuite on maven

Hi,

I want to use SOAPUI in my project to automate the webservices (REST and SOAP).
I have installed soapui-4.6.2 and maven 3.0.5 on my system
I have created a small testsuite for REST services from SOAPUI 4.6.2. Executed the testsuite on the SOAPUI GUI and its working fine.
Now, I want to run this on Maven.

I created a maven project
%M2_HOME%\bin\mvn archetype:create -DgroupId=com.OMT_SOAPUI_test -DartifactId=test
this created src and pom.xml

I followed below links to configure the POM.xml
http://www.soapui.org/Test-Automation/maven-2x.html

when i execute >mvn com.smartbear.soapui:soapui-maven-plugin:4.6.2:test
i get below error

[ERROR] Plugin com.smartbear.soapui:soapui-maven-plugin:4.6.2 or one of its dependencies could not be resolved: Failed to read artifact descriptor for com.smartbear.soapui:soapui-maven-plugin:jar:4.6.2: Failure to find com.smartbear.soapui:
soapui-project:pom:4.6.2 in http://xxx:8081/artifactory/all-repos w
as cached in the local repository, resolution will not be reattempted until the
update interval of all-repos has elapsed or updates are forced -> [Help 1]

I even downloaded the soapui-maven-plugin-4.6.2.jar and soapui-maven-plugin-4.6.2.pom to the local repository. But still, I am getting this issue.
Need your help to resolve this at the earliest.

10 Replies

  • SiKing's avatar
    SiKing
    Community Expert
    I am pretty sure the command is
    mvn com.smartbear.soapui:soapui-maven-plugin:test:4.6.2
    and I am absolutely certain it is safe to drop the version
    mvn com.smartbear.soapui:soapui-maven-plugin:test
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi,
    It seems that you use a mirror for all repositories as you only get an error saying that the following http://xxx:8081/artifactory/all-repos does not let you download the plugin

    have you check this artifactory instance define a proxy to the soapui maven repository?
  • Seshan's avatar
    Seshan
    New Contributor
    Hi redfish4ktc2,

    can you please help me on defining the proxy. I havent defined a proxy for this artifactory .

    Regards,
    Seshan
  • Seshan's avatar
    Seshan
    New Contributor
    Now, I am getting the following error message

    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:4.6.2:test (default-cli) on project soapui_maven: Execution default-cli of goal com.smartbear.soapui:soapui-
    maven-plugin:4.6.2:test failed: A required class was missing while executing com.smartbear.soapui:soapui-maven-plugin:4.6.2:test: com/eviware/soapui/tools/SoapUITestCaseRunner
    [ERROR] -----------------------------------------------------
    [ERROR] realm = plugin>com.smartbear.soapui:soapui-maven-plugin:4.6.2
    [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    [ERROR] urls[0] = file:/C:/Users/xxxx/.m2/repository/com/smartbear/soapui/soapui-maven-plugin/4.6.2/soapui-maven-plugin-4.6.2.jar
    [ERROR] urls[1] = file:/C:/Users/xxxx/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
    [ERROR] Number of foreign imports: 1
    [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
    [ERROR]
    [ERROR] -----------------------------------------------------: com.eviware.soapui.tools.SoapUITestCaseRunner
    [ERROR] -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:4.6.2:test (default-cli) on project soapui_maven: Execution
    default-cli of goal com.smartbear.soapui:soapui-maven-plugin:4.6.2:test failed: A required class was missing while executing com.smartbear.soapui:soapui-maven-plugin:4.6.2:test: co
    m/eviware/soapui/tools/SoapUITestCaseRunner
    -----------------------------------------------------
    realm = plugin>com.smartbear.soapui:soapui-maven-plugin:4.6.2
    strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    urls[0] = file:/C:/Users/xxxx/.m2/repository/com/smartbear/soapui/soapui-maven-plugin/4.6.2/soapui-maven-plugin-4.6.2.jar
    urls[1] = file:/C:/Users/xxxx/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
    Number of foreign imports: 1
    import: Entry[import from realm ClassRealm[maven.api, parent: null]]

    -----------------------------------------------------

    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:224)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
    Caused by: org.apache.maven.plugin.PluginExecutionException: Execution default-cli of goal com.smartbear.soapui:soapui-maven-plugin:4.6.2:test failed: A required class was missing
    while executing com.smartbear.soapui:soapui-maven-plugin:4.6.2:test: com/eviware/soapui/tools/SoapUITestCaseRunner
    -----------------------------------------------------
    realm = plugin>com.smartbear.soapui:soapui-maven-plugin:4.6.2
    strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    urls[0] = file:/C:/Users/xxxx/.m2/repository/com/smartbear/soapui/soapui-maven-plugin/4.6.2/soapui-maven-plugin-4.6.2.jar
    urls[1] = file:/C:/Users/xxxx/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
    Number of foreign imports: 1
    import: Entry[import from realm ClassRealm[maven.api, parent: null]]

    -----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    ... 19 more
    Caused by: org.apache.maven.plugin.PluginContainerException: A required class was missing while executing com.smartbear.soapui:soapui-maven-plugin:4.6.2:test: com/eviware/soapui/to
    ols/SoapUITestCaseRunner
    -----------------------------------------------------
    realm = plugin>com.smartbear.soapui:soapui-maven-plugin:4.6.2
    strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
    urls[0] = file:/C:/Users/xxxx/.m2/repository/com/smartbear/soapui/soapui-maven-plugin/4.6.2/soapui-maven-plugin-4.6.2.jar
    urls[1] = file:/C:/Users/xxxx/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
    Number of foreign imports: 1
    import: Entry[import from realm ClassRealm[maven.api, parent: null]]

    -----------------------------------------------------

    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:130)
    ... 20 more
    Caused by: java.lang.NoClassDefFoundError: com/eviware/soapui/tools/SoapUITestCaseRunner
    at com.eviware.soapui.maven2.TestMojo.execute(TestMojo.java:51)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
    ... 20 more
    Caused by: java.lang.ClassNotFoundException: com.eviware.soapui.tools.SoapUITestCaseRunner
    at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass(ClassRealm.java:259)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:235)
    at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:227)
    ... 22 more
    [ERROR]
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/disp ... rException
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi,
    this is strange, as the maven plugin as a dependeny on soapui, could you send again your pom if you have modified it?
  • Seshan's avatar
    Seshan
    New Contributor
    below is the pom.xml

    <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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.soapui.maven</groupId>
    <artifactId>soapui_maven</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>soapui_maven</name>
    <description>web services soapUI-maven integration tests</description>
    <url>http://maven.apache.org</url>

    <pluginRepositories>
    <pluginRepository>
    <id>SmartBearPluginRepository</id>
    <url>http://www.soapui.org/repository/maven2/</url>
    </pluginRepository>
    <pluginRepository>
    <id>eviwarePluginRepository</id>
    <url>http://www.soapui.org/repository/maven2/</url>
    </pluginRepository>

    </pluginRepositories>

    <build>
    <plugins>
    <plugin>
    <groupId>com.smartbear.soapui</groupId>
    <artifactId>soapui-maven-plugin</artifactId>
    <version>4.6.2</version>


    <configuration>
    <projectFile>src/test/soapui/soapui_maven-soapui-project.xml</projectFile>
    <testSuite>Testsuite_test</testSuite>
    <outputFolder>target/surefire-reports</outputFolder>
    <settingsFile></settingsFile>
    <junitReport>true</junitReport>
    <printReport>true</printReport>
    <exportAll>true</exportAll>
    <settingsFile>${user.home}/soapui-settings.xml</settingsFile>
    <soapuiProperties>
    <property>
    <name>soapui.logroot</name>
    <value>target/soapui/logs/</value>
    </property>
    </soapuiProperties>
    </configuration>
    <executions>
    <execution>
    <id>soapui_maven</id>
    <goals>
    <goal>test</goal>
    </goals>
    <phase>test</phase>
    </execution>
    </executions>
    </plugin>
    </plugins>
    </build>
    </project>
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    Hi,
    I had a look on your pom file, it looks fine.
    do you have the same issue when running mvn com.smartbear.soapui:soapui-maven-plugin:4.6.2:test or mvn test?
    have you check with several maven versions?

    could you check the soapui jar in your local repository? it may be corrupted (maven cannot detect this because the soapui maven repository does not provide checksum file)
    • kxramas's avatar
      kxramas
      New Contributor

      Hi,

       

      Is this issue solved ? I am having the same problem 

       

      [ERROR] Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:5.3.1-RC:test (default-cli) on project soapui.test.automation: Execution default-cli of goal com.smartbear.soapui:soapui-maven-plugin:5.3.1-RC:test failed: A required class was missing while executing com.smartbear.soapui:soapui-maven-plugin:5.3.1-RC:test: com/eviware/soapui/tools/SoapUITestCaseRunner
      [ERROR] -----------------------------------------------------
      [ERROR] realm = plugin>com.smartbear.soapui:soapui-maven-plugin:5.3.1-RC
      [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
      [ERROR] urls[0] = file:/C:/Users/user/.m2/repository/com/smartbear/soapui/soapui-maven-plugin/5.3.1-RC/soapui-maven-plugin-5.3.1-RC.jar
      [ERROR] urls[1] = file:/C:/Users/user/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
      [ERROR] Number of foreign imports: 1
      [ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
      [ERROR]
      [ERROR] -----------------------------------------------------: com.eviware.soapui.tools.SoapUITestCaseRunner

       

      I look forward to hearing from you.

       

      Thanks!