Forum Discussion

JKowalczyk's avatar
JKowalczyk
Occasional Contributor
13 years ago

Maven-Soaui-Pro-Plugin-4.5.1 problems

Hi,

I have installed the maven-soapui-pro-plugin as advised in http://www.soapui.org/Test-Automation/maven-2x.html

My pom.xml file contains the following:


<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>com.smartbear.samples</groupId>
<artifactId>soapui-maven2-plugin</artifactId>
<packaging>jar</packaging>
<version>1.0-SNAPSHOT</version>
<name>Maven 2 soapUI Sample</name>
<url>http://maven.apache.org</url>
<pluginRepositories>
<pluginRepository>
<id>eviwarePluginRepository</id>
<url>http://www.eviware.com/repository/maven2/eviware/soapui-pro/4.5.1/</url>
</pluginRepository>
</pluginRepositories>
<build>
<plugins>
<plugin>
<groupId>eviware</groupId>
<artifactId>maven-soapui-plugin</artifactId>
<version>4.5.1</version>
<configuration>
<projectFile>API-CIVITAS-EVENTS/Events-soapui-project.xml</projectFile>
<outputFolder>API-CIVITAS-EVENTS</outputFolder>
<host>"https://civdev1.civitas.testingnet.com/api/events"</host>
<junitReport>true</junitReport>
<printReport>true</printReport>
<exportAll>true</exportAll>
</configuration>

<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>

</execution>
</executions>
<dependencies>
<dependency>
<groupId>xmlunit</groupId>
<artifactId>xmlunit</artifactId>
<version>1.3</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
</dependency>
<dependency>
<groupId>jgoodies</groupId>
<artifactId>looks</artifactId>
<version>2.2.0</version>
<dependency>
<groupId>fife</groupId>
<artifactId>rsyntaxtextarea</artifactId>
<version>1.3.4</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>


when i run the command (mvn eviware:maven-soapui-plugin:test) from terminal, I am getting the following error:

[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven 2 soapUI Sample 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-soapui-plugin:4.5.1:test (default-cli) @ soapui-maven2-plugin ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.305s
[INFO] Finished at: Thu Jul 19 15:23:27 BST 2012
[INFO] Final Memory: 2M/81M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal eviware:maven-soapui-plugin:4.5.1:test (default-cli) on project soapui-maven2-plugin: Execution default-cli of goal eviware:maven-soapui-plugin:4.5.1:test failed: A required class was missing while executing eviware:maven-soapui-plugin:4.5.1:test: com/eviware/soapui/tools/SoapUITestCaseRunner
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>eviware:maven-soapui-plugin:4.5.1
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/Users/sneha/.m2/repository/eviware/maven-soapui-plugin/4.5.1/maven-soapui-plugin-4.5.1.jar
[ERROR] urls[1] = file:/Users/sneha/.m2/repository/xmlunit/xmlunit/1.3/xmlunit-1.3.jar
[ERROR] urls[2] = file:/Users/sneha/.m2/repository/junit/junit/4.8.2/junit-4.8.2.jar
[ERROR] urls[3] = file:/Users/sneha/.m2/repository/jgoodies/looks/2.2.0/looks-2.2.0.jar
[ERROR] urls[4] = file:/Users/sneha/.m2/repository/fife/rsyntaxtextarea/1.3.4/rsyntaxtextarea-1.3.4.jar
[ERROR] urls[5] = file:/Users/sneha/.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]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[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


Can you please let me know which class is missing ?
  • amirsliem's avatar
    amirsliem
    Occasional Contributor
    it seems like the following tags are being ignored, I'm experiencing the same problem.

    <projectFile>C:\SoapUI\Projects\xx\MyProject-SoapUIPro-Project.xml</projectFile>
    <settingsFile>C:\SoapUI\EnvSettings\soapui-settings.xml</settingsFile>

    and the default location is being called, based criteria ,

    default value is ${pom.artifactId}-soapui-project.xml

    hence solution is to do the following

    <groupId>SoapUIPro</groupId>
    <artifactId>MyProject</artifactId>
    <packaging>jar</packaging>
    <version>##-SNAPSHOT</version>
    <name>Maven 2 soapUI</name>
    <url>http://repo.maven.apache.org/maven2/org/apache/maven/plugins/</url>
  • Hello all,

    I'm also facing a problem in maven plugin for soapUi 4.0 version.
    I'm trying to create a execution report for test cases using maven.
    And part of my pom.xml looks like:
    <build>
    <plugins>
    <plugin>
    <groupId>eviware</groupId>
    <artifactId>maven-soapui-plugin</artifactId>
    <version>4.0</version>
    <executions>
    <execution>
    <phase>generate-test-sources</phase>
    <goals>
    <goal>test</goal>
    </goals>
    </execution>
    </executions>
    <configuration>
    <projectFile>xxx-soapui-project.xml</projectFile>
    <endpoint>url</endpoint>
    <junitReport>true</junitReport>
    <testSuite>${soapui.testsuite}</testSuite>
    <testCase>${soapui.testcase}</testCase>
    <outputFolder>${basedir}/report/soapui</outputFolder>
    <printReport>true</printReport>
    <testFailIgnore>true</testFailIgnore>
    </configuration>
    <dependencies>
    <-- placed all the dependencies-->
    </dependencies>
    </plugin>
    </plugins>
    </build>
    I have placed the maven-soapui-plugin-4.0.0.jar file in the maven lib folder.
    Upon executing i'm getting the following error:

    [ERROR] Plugin eviware:maven-soapui-plugin:4.0 or one of its dependencies could
    not be resolved: Failed to read artifact descriptor for eviware:maven-soapui-plugin:jar:4.0: Failure to find eviware:maven-soapui-plugin:pom:4.0 in URL(displayed URl is company's central repository where all the maven artifacts has kept)- was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
    [ERROR]

    Could anyone help me on this?
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi, what maven version are you using which with java version?
    you should not put anything related to the plugin in the maven lib directory

    I think your problem is that you have a typo in the plugin version. Replace 4.0 by 4.0.0

    Tell me if it is ok
  • Hi,
    I replaced 4.0 with 4.0.0 and after that also I'm getting the same error.
    Let me explain what I'm trying to do , I need to create the test execution report for testsuite. For that I'm invoking pom.xml via maven.
    1.I have downloaded the maven-soapui-plugin 4.0.0 and placed in the location "User_Home\.m2\repository\eviware\maven-soapui-plugin\4.0.0"
    and all the dependency jars like derbytools and oracle are placed in the "User_Home\.m2\repository\oracle" and "User_Home\.m2\repository\org\apache\derby" . For all the dependencies I have placed the similar folder structure.

    Since I have loaded and placed all the jars locally , i have modified the maven settings.xml to point the local repository.
    <localRepository>User_Home/.m2/repository</localRepository> and provided <offline>true</offline> such that it will not look into internet.
    But upon running mvn from command prompt as: mvn test, I'm getting the following error:

    [WARNING] The POM for eviware:maven-soapui-plugin:jar:4.0.0 is missing, no dependency information available
    [ERROR] Plugin eviware:maven-soapui-plugin:4.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for eviware:maven-soapui-plugin:jar:4.0.0: The repository system is offline but the artifact eviware:maven
    -soapui-plugin:pom:4.0.0 is not available in the local repository. -> [Help 1]
    org.apache.maven.plugin.PluginResolutionException: Plugin eviware:maven-soapui-plugin:4.0.0 or one of its dependencies could not be resolved: Failed to read artifact descriptor for eviware:maven-soapui-plugin:jar:4.0.0

    I don't know what to do after this. Could anyone help me on this like whether any other dependency required for maven-soapui-plugin
    and my pom.xml is:

    <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>Regression</groupId>
    <artifactId>WebServiceRegression</artifactId>
    <name>WebServiceRegression</name>
    <packaging>pom</packaging>
    <version>1.0</version>
    <build>
    <plugins>
    <plugin>
    <groupId>eviware</groupId>
    <artifactId>maven-soapui-plugin</artifactId>
    <version>4.0.0</version>
    <executions>
    <execution>
    <phase>generate-test-sources</phase>
    <goals>
    <goal>test</goal>
    </goals>
    </execution>
    </executions>
    <configuration>
    <projectFile>WebServiceRegression-soapui-project.xml</projectFile>

    <junitReport>true</junitReport>
    <testSuite>${soapui.testsuite}</testSuite>
    <testCase>${soapui.testcase}</testCase>
    <outputFolder>${basedir}/report/soapui</outputFolder>
    <printReport>true</printReport>
    <testFailIgnore>true</testFailIgnore>
    </configuration>
    <dependencies>
    <dependency>
    <groupId>org.apache.derby</groupId>
    <artifactId>derbytools</artifactId>
    <version>10.5.3.0_1</version>
    </dependency>
    <dependency>
    <groupId>oracle</groupId>
    <artifactId>ojdbc14_g</artifactId>
    <version>1.0</version>
    </dependency>
    <dependency>
    <groupId>jsch</groupId>
    <artifactId>jsch</artifactId>
    <version>0.1.41</version>
    </dependency>
    <dependency>
    <groupId>commons-vfs</groupId>
    <artifactId>commons-vfs</artifactId>
    <version>2.0</version>
    </dependency>
    <dependency>
    <groupId>com.zehon</groupId>
    <artifactId>zehon-file-transfer</artifactId>
    <version>1.1.6</version>
    </dependency>
    <dependency>
    <groupId>org.bouncycastle</groupId>
    <artifactId>bcprov-jdk15</artifactId>
    <version>1.43</version>
    </dependency>
    </dependencies>
    </plugin>
    </plugins>
    </build>
    <reporting>
    <plugins>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-project-info-reports-plugin</artifactId>
    <reportSets>
    <reportSet>
    <reports>
    </reports>
    </reportSet>
    </reportSets>
    </plugin>
    <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-report-plugin</artifactId>
    <version>2.5</version>
    <inherited>true</inherited>
    <configuration>
    <outputName>Automation-Execution Report</outputName>
    <outputDirectory>report</outputDirectory>
    <reportsDirectory>${basedir}/report/soapui</reportsDirectory>
    </configuration>
    </plugin>
    </plugins>
    </reporting>
    </project>

    Request someone to have a look at my pom and update me whether anything i need to modify in pom.xml and need to use any dependency jars
  • redfish4ktc2's avatar
    redfish4ktc2
    Super Contributor
    hi
    did you also put the pom files in your local repository?
    i cannot reproduce your issue
    why don't you configure remote repositories to make maven retrieve all dependencies?

    you seem using maven 3.x. There is some misunderstanding when using the offline mode, see
    * http://obscuredclarity.blogspot.fr/2012 ... fline.html
    * http://jira.codehaus.org/browse/MNG-5181
    * http://jira.codehaus.org/browse/MNG-5185

    If you are in this situation, give a try to maven 3.1.x. You will have a better error message and you can use the new -llr option (see http://maven.apache.org/ref/3.1.0/maven ... r/cli.html)
  • Thanks for your reply.
    As you suggested I did changes in the pom.xml and added the plugin repositories such a way that maven to download all the dependencies and i have not given anything in the settings.xml other than the structure.

    Now its working fine.
    I have added the following in my pom.xml
    <pluginRepositories>
    <pluginRepository>
    <id>eviwarePluginRepository</id>
    <url>http://www.soapui.org/repository/maven2/</url>
    </pluginRepository>
    <pluginRepository>
    <id>eviwarePluginRepository</id>
    <url>http://mvnrepository.com/artifact/</url>
    </pluginRepository>
    </pluginRepositories>