首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Openshift jobssas 7云正在构建这场战争,但没有部署它。

Openshift jobssas 7云正在构建这场战争,但没有部署它。
EN

Stack Overflow用户
提问于 2015-10-31 01:30:39
回答 1查看 27关注 0票数 0

Openshift建立了战争,但没有部署它。

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

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

如何自动复制生成的战争?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2015-10-31 01:30:39

首先,openshift jbossas7云需要使用pom.xml来构建代码,然后将其抛出git push命令。其次,在构建生成的war之后自动部署它,用pom.xml编写

代码语言:javascript
复制
<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>
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/33447141

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档