Java 在不使用 GIT 的情况下将 WAR 文件部署到 Openshift?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/23264517/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 21:34:41  来源:igfitidea点击:

Deploy WAR file to Openshift without using GIT?

javagittomcatjbossopenshift

提问by JAN

I want to upload a WAR file to my Openshiftaccount , but it forces me to use GIT ot GITHUB (here). Please forgive me for saying this , but this is very very annoying .

我想将 WAR 文件上传到我的Openshift帐户,但它迫使我使用 GIT 或 GITHUB(此处)。请原谅我这样说,但这是非常非常烦人的。

Is there any way upload a WAR file straight to my application without using some third party ?

有什么方法可以在不使用第三方的情况下将 WAR 文件直接上传到我的应用程序?

My application (in the Openshift) consists of : Tomcat 7 (JBoss EWS 2.0), MySQL 5.5 .

我的应用程序(在 Openshift 中)包括: Tomcat 7 (JBoss EWS 2.0), MySQL 5.5 。

Much appreciated

非常感激

采纳答案by user3568087

Please follow the instructions in the following link

请按照以下链接中的说明进行操作

https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear

https://www.openshift.com/kb/kb-e1088-how-to-deploy-pre-compiled-java-applications-war-and-ear-files-onto-your-openshift-gear

More details :

更多细节 :

You can use like this :

你可以这样使用:

Hit gitand log into the git bash , and then do this:

点击git并登录 git bash ,然后执行以下操作:

scp <your local file name> <your hash number>@<your app name>-<your domain name>.rhcloud.com:~/<app name>/data/

example:

例子:

scp hello.csv [email protected]:~/cdapp/data/

External Sources : from here

外部来源:从这里

回答by Ravi Shekhar

You may refer https://developers.openshift.com/en/tomcat-deployment-options.html

您可以参考https://developers.openshift.com/en/tomcat-deployment-options.html

Steps:

脚步:

  1. git cloneto download the source code

  2. remove srcand pom.xmlfrom repo and push

  3. Use Win Scp/ FileZillato log into your app

  4. Paste ROOT.warhere /var/lib/openshift/{APP_ID}/app-root/runtime/dependencies/jbossews/webapps

  1. git clone下载源代码

  2. 删除 srcpom.xml从回购和推

  3. 使用Win Scp/FileZilla登录您的应用

  4. 粘贴ROOT.war在这里/var/lib/openshift/{APP_ID}/app-root/runtime/dependencies/jbossews/webapps

or simply app-root/runtime/dependencies/jbossews/webappsfrom the landing directory.

或者只是app-root/runtime/dependencies/jbossews/webapps从登陆目录。