gpt4 book ai didi

java - Openshift jobssas 7 云正在制造 war ,但没有部署它

转载 作者:行者123 更新时间:2023-12-01 10:59:25 24 4
gpt4 key购买 nike

Openshift 正在制造 war ,但没有部署它

enter image description here

如果要部署生成的war,必须通过命令复制

cp app-root/runtime/repo/target/GameStore-0.0.1-SNAPSHOT.war app-root/dependencies/jbossas/deployments/ROOT.war

如何自动复制生成的war?

最佳答案

首先,openshift jbossas7 云需要存在 pom.xml 才能在推送后构建代码,抛出 git push 命令。其次,要在构建后自动部署生成的 war ,请在 pom.xml

中写入
<profiles>
<profile>
<!-- When built in OpenShift the 'openshift' profile will be used when
invoking mvn. -->
<!-- Use this profile for any OpenShift specific customization your app
will need. -->
<!-- By default that is to put the resulting archive into the 'deployments'
folder. -->
<!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
<id>openshift</id>
<build>
<finalName>GameStore</finalName>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<outputDirectory>deployments</outputDirectory>
<warName>ROOT</warName>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

关于java - Openshift jobssas 7 云正在制造 war ,但没有部署它,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33447141/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com