How to Set Maven Parameters in OpenShift

最后都变了- 提交于 2020-01-16 03:57:05

问题


I'm completely new to OpenShift and so far ran in hundreds of bugs while trying to create my first application. Now I want to configure Maven to use my own goals. So far I tried:

  • adding a Jenkins and configuring the Maven Build - the Jenkins didn't take up the changes and finally stopped building altogether
  • adding a file .openshift/action_hook/pre_build with the content export MAVEN_ARGS="clean package -Popenshift" as explained here
  • adding a file .openshift/action_hook/build with the content mvn clean package -Popenshift as explained there

Evidently, the documentation is somewhat obsolete... so what is the correct way?


回答1:


I finally managed to get the Jenkins to build with my goals. The misconception was that it would use the configured Maven goals INSTEAD of the default ones, when it would just use them additionally (he never had to, since the shell script failed). So deleting the script and adding a custom Maven build works.



来源:https://stackoverflow.com/questions/23744881/how-to-set-maven-parameters-in-openshift

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!