我最近發現了貨物,並且對於它允許開發人員使用maven始終如一地自動測試Web工件的潛力感到非常興奮 - 但我無法正確配置它。無論好壞,我們都是WebLogic商店,但我一直無法找到一個使用Cargo的Maven插件配置WebLogic Local Standalone的好例子,因爲插件無法找到org.codehaus.cargo.container.weblogic。 WebLogic103xStandaloneLocalConfiguration類。配置類未找到WebLogic本地獨立與貨物maven插件
爲了簡化問題,我開始與原型(包括樣品永遠服務器EXCEPT的weblogic ....哎呀感謝),改變pluginManagement下的插件看起來像這樣:
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.5</version>
<configuration>
<container>
<containerId>weblogic103x</containerId>
<type>standalone</type>
<home>${weblogic.10.3.server}</home>
</container>
<configuration>
<type>local</type>
<properties>
<cargo.servlet.port>8001</cargo.servlet.port>
</properties>
</configuration>
</configuration>
</plugin>
一些這可能是多餘的(我不是非常有經驗與Maven的配置文件),但我還添加了一個額外的配置文件,並使其默認:
<profile>
<id>weblogic103x</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>1.4.5</version>
<configuration>
<container>
<containerId>weblogic103x</containerId>
<type>standalone</type>
<home>${weblogic.10.3.server}</home>
</container>
<configuration>
<type>local</type>
<implementation>org.codehaus.cargo.container.weblogic.WebLogic103xStandaloneLocalConfiguration</implementation>
<properties>
<cargo.servlet.port>8001</cargo.servlet.port>
</properties>
</configuration>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</profile>
而且我得到的例外是:
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Custom configuration implementation [org.codehaus.cargo.container.weblogic.WebLogic103xStandaloneLocalConfiguration] cannot be loaded
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Custom configuration implementation [org.codehaus.cargo.container.weblogic.WebLogic103xStandaloneLocalConfiguration] cannot be loaded
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
[snip]... several more
Caused by: org.apache.maven.plugin.MojoExecutionException: Custom configuration implementation [org.codehaus.cargo.container.weblogic.WebLogic103xStandaloneLocalConfiguration] cannot be loaded
at org.codehaus.cargo.maven2.configuration.Configuration.createConfiguration(Configuration.java:266)
[snip]... several more
Caused by: java.lang.ClassNotFoundException: org.codehaus.cargo.container.weblogic.WebLogic103xStandaloneLocalConfiguration
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at org.codehaus.classworlds.RealmClassLoader.loadClassDirect(RealmClassLoader.java:195)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:255)
at org.codehaus.classworlds.DefaultClassRealm.loadClass(DefaultClassRealm.java:274)
at org.codehaus.classworlds.RealmClassLoader.loadClass(RealmClassLoader.java:214)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:266)
at org.codehaus.cargo.maven2.configuration.Configuration.createConfiguration(Configuration.java:259)
... 24 more
我只是缺少一些設置?或者我從根本上誤解貨運應該如何運作?或者是其他東西?