根据指南-https://github.com/WASdev/ci.maven#deploy,我做了pom.xml如下所示
<plugin>
<groupId>net.wasdev.wlp.maven.plugins</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>1.0</version>
<configuration>
<serverHome>D:\eclipses\eGovFrameDev-2.7.0-64bit_Liberty\wlp</serverHome>
<serverName>defaultServer</serverName>
</configuration>
<executions>
<execution>
<id>deploy-app</id>
<phase>post-integration-test</phase>
<goals>
<goal>deploy</goal>
</goals>
<configuration>
<appArchive>D:\eclipses\eGovFrameDev-2.7.0-64bit_Liberty\workspace\Test\target\Test-0.0.1-SNAPSHOT.war</appArchive>
</configuration>
</execution>
</executions>当我运行'mvn -X When :deploy‘时,我得到了以下异常
错误未能在项目测试上执行目标net.wasdev.wlp.maven.plugins:liberty-maven-plugin:1.0:deploy (默认-cli):CWWKM2155E:没有按appArchive属性 -> Help 1 CWWKM2155E指定的应用程序在项目测试:CWWKM2155E上执行目标net.wasdev.wlp.maven.plugins:liberty-maven-plugin:1.0:deploy (默认-cli):CWWKM2155E:没有按appArchive属性指定的应用程序部署在org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217) 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:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)在org.apache.maven.cli.MavenCli.main(MavenCli.java:141) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:94) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:55)在java.lang.reflect.Method.invoke(Method.java:619) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds。org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)的launcher.Launcher.launch(Launcher.java:230)由: org.apache.maven.plugin.MojoExecutionException: CWWKM2155E: CWWKM2155E引起:没有按org.codehaus.mojo.pluginsupport.MojoSupport.execute(MojoSupport.java:129) at org.apache.maven.plugin的appArchive属性指定的应用程序部署。DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) . 19多个原因是: org.apache.maven.plugin.MojoExecutionException: CWWKM2155E: CWWKM2155E:没有按net.wasdev.wlp.maven.plugins.applications.DeployAppMojo.doExecute(DeployAppMojo.java:76) at org.codehaus.mojo.pluginsupport.MojoSupport.execute(MojoSupport.java:122)的appArchive属性指定的应用程序部署
. 21
请给我专家建议如何解决这个问题,然后用maven在IBM上部署应用程序
谢谢,
发布于 2014-07-08 16:49:23
使用Maven命令行,您可以执行一个目标(如在本例中所做的)或生命周期阶段(例如,安装)。在您所附加的pom.xml片段中,您有一个插件级配置(使用serverHome和serverName)和执行级配置(使用appArchive)。问题是,当从命令行执行插件的特定目标时,只使用插件级别的配置。这就是插件看不到appArchive配置的原因。但是,如果您是执行Maven阶段(如安装),则将使用执行级别的配置(在正确的时间)并部署应用程序。
如果希望部署目标从命令行运行,只需将appArchive配置移动到插件级配置即可。另外,以下内容可能会有所帮助:http://maven.apache.org/guides/mini/guide-default-execution-ids.html
https://stackoverflow.com/questions/23808021
复制相似问题