简体   繁体   English

在Heroku上运行Maven构建的多项目Webapp?

[英]Running a multi project Maven-built webapp on Heroku?

I'm migrating my multi project Java webapp from Cloudbees to Heroku . 我正在将我的多项目Java webapp从CloudbeesHeroku I have one main webapp that depends on 3 other library projects that I have written (also Maven+Java ). 我有一个主要的Web应用程序,该应用程序依赖于我编写的其他3个库项目(还有Maven + Java )。 On Cloudbees this was simple, you just build everything through Jenkins , the JARs get poked into their Maven repos then the main webapp gets built taking its dependencies from that Maven repos. Cloudbees这很简单,您只需通过Jenkins构建所有内容,然后将JAR插入其Maven仓库中,然后从该Maven仓库中获取其依赖项来构建主Web应用程序。

However, I can't for the life of me find a way of doing this on Heroku without doing something horrendous like this: 但是,我无法终生找到一种在Heroku上做到这一点的方法,而不必做这样可怕的事情:

https://devcenter.heroku.com/articles/local-maven-dependencies https://devcenter.heroku.com/articles/local-maven-dependencies

By doing so it would mean that every time I changed a library I would have to remember to deploy the built JAR to the main webapp project and push this to Git, somewhat defeating the point of using Maven! 这样做意味着每次更改库时,我都必须记住将构建的JAR部署到主要的webapp项目并将其推送到Git,这在一定程度上打破了使用Maven的观点!

I understand that the way to deploy your webapp on Heroku is essentially by doing a git push to their repo, but how can I tell heroku at the other end to find my library dependencies without having to bundle them in the main webapp like this article suggests? 我了解在Heroku上部署WebApp的方法实质上是通过对其仓库进行git push,但是我如何才能告诉另一端的Heroku查找我的库依赖项,而不必像本文所述将它们捆绑在主webapp中?

I would assume that there is some way to set up a private maven repos on your heroku account but I can't find anything like this. 我认为可以通过某种方式在您的heroku帐户上设置私有Maven仓库,但是我找不到这样的东西。

I think the best solution is to use a private Maven repository, and then add the config for that repo in the settings.xml of your main project. 我认为最好的解决方案是使用私有Maven存储库,然后在主项目的settings.xml中添加该存储库的配置。 This article on using a custom settings.xml describes how to do that. 有关使用自定义settings.xml介绍了如何执行此操作。

There are some services that host private Maven repos for you, such as JFrog . 有一些服务可以为您托管私有Maven仓库,例如JFrog But I've even read of people using Github to host a Maven repo , too. 但是我什听说有人使用Github托管Maven存储库

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Maven多模块项目和Webapp项目 - Maven multi-module project and webapp project 在Maven内置的JAR中找不到Jersey邮件正文阅读器 - Jersey message body reader not found in maven-built JAR 测试Maven构建的Java库与GWT的适用性 - Testing a maven-built java library for suitability with GWT Maven构建的模块中的Jahia6.6部署错误 - Jahia6.6 deployment error in maven-built module 在Maven构建的JAR中多次包含具有不同名称的文件 - Include a file multiple times with different names in a Maven-built JAR 使用 heroku 部署多模块 maven 项目 - deploy multi-module maven project with heroku 如何使用 RAD 为 IBM WAS 调试 Maven 构建的应用程序? - How can I debug a Maven-built app for IBM WAS using RAD? 当我通过 IDEA 构建 webApp maven 项目时,IDEA 显示错误,为什么? 当我在 cmd 中构建我的项目时,它可以成功吗? - when I built a webApp maven project by IDEA,IDEA shows me an error,why? when i built my project in cmd ,it can success? jTDS - 运行 Maven 构建项目时没有合适的驱动程序异常 - jTDS - No Suitable Driver Exception when running a Maven built project 如何在多模块 Maven 项目中使用以前构建的 jars? - How can I use previously built jars in a multi-module maven project?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM