嗨,我只是想實現一個簡單的任務,即使用maven運行一個簡單的測試SOAP UI項目。所以我的簡單項目在SOAP UI 5.0.0 IDE中運行時沒有任何問題。我的POM文件是:「無法加載sopaui項目文件」與maven
<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>SmartBearPluginRepository</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>5.0.0</version>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
</dependencies>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<projectFile>${project.basedir}/Test-soapui-project</projectFile>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
出於某種原因,該插件使用默認的項目文件名,甚至是id指定的事實配置/項目文件paramenter內。這是錯誤:
C:\Users\Carlos\maven-soapui>mvn com.smartbear.soapui:soapui-maven-plugin:5.0.0:test
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven 2 SoapUI Sample 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- soapui-maven-plugin:5.0.0:test (default-cli) @ soapui-maven2-plugin ---
SoapUI 5.0.0 Maven2 TestCase Runner
17:13:13,910 WARN [SoapUI] Missing folder [C:\Users\Carlos\maven-soapui\ext] for external libraries
17:13:14,061 INFO [DefaultSoapUICore] initialized soapui-settings from [C:\Users\Carlos\soapui-settings.xml]
17:13:16,807 INFO [SoapUI] File [C:\Users\Carlos\maven-soapui\soapui-maven2-plugin-soapui-project.xml] does not exist, tryin
g URL instead
17:13:16,808 ERROR [SoapUI] An error occurred [no protocol: soapui-maven2-plugin-soapui-project.xml], see error log for detai
ls
java.net.MalformedURLException: no protocol: soapui-maven2-plugin-soapui-project.xml
at java.net.URL.<init>(URL.java:585)
at java.net.URL.<init>(URL.java:482)
at java.net.URL.<init>(URL.java:431)
at com.eviware.soapui.impl.wsdl.WsdlProject.<init>(WsdlProject.java:236)
at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:45)
at com.eviware.soapui.impl.wsdl.WsdlProjectFactory.createNew(WsdlProjectFactory.java:28)
at com.eviware.soapui.tools.SoapUITestCaseRunner.runRunner(SoapUITestCaseRunner.java:341)
at com.eviware.soapui.tools.AbstractSoapUIRunner.run(AbstractSoapUIRunner.java:162)
at com.eviware.soapui.maven2.TestMojo.execute(TestMojo.java:117)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
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:318)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:153)
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:601)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:414)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:357)
[ERROR] java.lang.Exception: Failed to load SoapUI project file [soapui-maven2-plugin-soapui-project.xml]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.920s
[INFO] Finished at: Mon Jul 21 17:13:16 BOT 2014
[INFO] Final Memory: 15M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.smartbear.soapui:soapui-maven-plugin:5.0.0:test (default-cli) on project soapui-maven2-plu
gin: SoapUI Test(s) failed: SoapUI Test(s) failed:
[ERROR] Failed to load SoapUI project file [soapui-maven2-plugin-soapui-project.xml]
[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/display/MAVEN/MojoFailureException
任何人都可以指出我在哪裏,這可能是什麼?
謝謝回覆!我有一個非Pro項目。項目文件在基本目錄下出現名爲Test-soapui.project.xml。我確實修改了POM: ' soapui-maven-plugin Test-soapui-project.xml projectFile>' 仍給我同樣的錯誤。 –
carlosgmercado
你可以試試以前的版本嗎? – SiKing
你的意思是插件的另一個版本?我確實看到4.6.1到4.6.4可用,任何特定的? T – carlosgmercado