我有一个应用程序运行在WebSphere have中。通过mvn安装命令,我需要将我的应用程序部署到自由应用程序目录,因为我没有使用下拉列表目录。
Bellow是工作的maven插件代码,我可以从它部署到下拉列表目录。
<plugin>
<groupId>net.wasdev.wlp.maven.plugins</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>start-server</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<verifyTimeout>60</verifyTimeout>
</configuration>
</execution>
<execution>
<id>deploy</id>
<phase>install</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
<configuration>
<serverHome>${wlp.dir}</serverHome>
<serverName>${server}</serverName>
<appArtifact>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</appArtifact>
<appDeployName>${project.artifactId}.${project.packaging}</appDeployName>
</configuration>
</plugin>我在任何地方都找不到需要添加/更改什么配置才能将应用程序直接部署到apps目录。有人能告诉我这里缺少什么吗?
发布于 2017-05-24 09:04:46
添加安装-应用程序执行步骤而不是部署(部署执行步骤将部署应用程序仅部署到下拉文件夹)步骤将解决这个问题。版本必须更新为1.3,这是目前最新的版本
参考文献:https://github.com/WASdev/ci.maven/blob/master/docs/install-apps.md
完整的maven插件代码如下所示
<plugin>
<groupId>net.wasdev.wlp.maven.plugins</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>1.3</version>
<executions>
<execution>
<id>start-server</id>
<phase>pre-integration-test</phase>
<goals>
<goal>start-server</goal>
</goals>
<configuration>
<verifyTimeout>60</verifyTimeout>
</configuration>
</execution>
<execution>
<id>install-apps</id>
<phase>pre-integration-test</phase>
<goals>
<goal>install-apps</goal>
</goals>
<configuration>
<appsDirectory>apps</appsDirectory>
<installAppPackages>project</installAppPackages>
</configuration>
</execution>
</executions>
<configuration>
<serverHome>${wlp.dir}</serverHome>
<serverName>${server}</serverName>
<appArtifact>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<type>${project.packaging}</type>
</appArtifact>
<appDeployName>${project.artifactId}.${project.packaging}</appDeployName>
</configuration>
</plugin>发布于 2017-05-24 14:40:23
您也可以尝试当前2.0快照版本的插件。只需包含父pom和插件的一小部分配置即可。2.0版将于6月初发布。
如果您不想包含父pom,您只需从父pom复制<pluginManagement/>部分,其中包含from plugin目标到Maven默认构建生命周期的绑定。请参阅https://github.com/WASdev/ci.maven/blob/master/docs/parent-pom.md
<parent>
<groupId>net.wasdev.wlp.maven.parent</groupId>
<artifactId>liberty-maven-app-parent</artifactId>
<version>2.0-SNAPSHOT</version>
</parent>
<repositories>
<repository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/
</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sonatype-nexus-snapshots</id>
<name>Sonatype Nexus Snapshots</name>
<url>https://oss.sonatype.org/content/repositories/snapshots/
</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
...
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
...
<plugin>
<groupId>net.wasdev.wlp.maven.plugins</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>2.0-SNAPSHOT</version>
<configuration>
<assemblyArtifact>
<groupId>com.ibm.websphere.appserver.runtime</groupId>
<artifactId>wlp-webProfile7</artifactId>
<version>17.0.0.1</version>
<type>zip</type>
</assemblyArtifact>
<serverName>${project.artifactId}Server</serverName>
<configFile>src/main/liberty/config/server.xml</configFile>
</configuration>
</plugin>
</plugins>
...
</build>https://stackoverflow.com/questions/44148471
复制相似问题