Openshift jobssas 7 云正在构建 war 但未部署它
Openshift jobssas 7 cloud was building the war but not deploying it
Openshift 正在构建 war 但未部署它
如果要部署生成的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
才能在 push it throw 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>
Openshift 正在构建 war 但未部署它
如果要部署生成的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
才能在 push it throw 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>