我在Openshift上托管了一个Tomcat7应用程序。
我知道git push
会导致部署。此外,ctl_app deploy
或rhc app deploy
也会导致部署。
但是我想在maven中指定-U
命令行选项。我怎么能这样做?
答案 0 :(得分:1)
您应该能够通过执行以下操作直接执行mvn构建:
ssh到您的申请中:
rhc ssh <appname>
进入你的app dir:
cd $OPENSHIFT_REPO_DIR
执行mvn命令
示例:
$mvn install
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jbossas 1.0
[INFO] ------------------------------------------------------------------------
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom (7 KB at 13.0 KB/sec)
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/19/maven-plugins-19.pom
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-plugins/19/maven-plugins-19.pom (11 KB at 325.7 KB/sec)