使用 Maven 发布不同的配置 [英] Release different configurations with Maven

查看:25
本文介绍了使用 Maven 发布不同的配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在将我们的构建过程从 Ant 迁移到 Maven.我们的应用程序部署到许多不同的客户,每个客户都有一组独特的依赖项和配置.我可以实现不同的配置文件来对它们进行建模并从中构建所需的战争.然而,这是一个在编译时发生的过程.

I'm currently migrating our build process to Maven from Ant. Our application is deployed to many different customers, each with a unique set of dependencies and and configuration. I can implement different profiles to model these and build the required wars from them. However this is a process that happens at compile time.

每个版本都在 SVN 下标记并上传到我们的内部 Nexus 存储库.我希望能够采用定义的版本并根据配置文件重建它.有没有办法做这样的事情?除了个人资料之外,还有什么我应该使用的吗?

Each release is tagged under SVN as well as uploaded to our internal Nexus repository. I want to be able to take a defined release and reconstruct it based a profile. Is there a way to do something like this? Is there something other than profiles I should be using?

推荐答案

我最终做了一些稍微不同的事情.我们没有将发布存储在我们的内部存储库中.相反,我们正在使用 Hudson 和一个多配置项目(每个客户一个配置/配置文件)进行构建.这样,当发布发布时,运行 Hudson 作业来为所有客户构建不同的战争.然后将它们存储在 Hudson 服务器而不是 Nexus 上.也可以随时从 Nexus 中的版本构建针对特定版本和客户的构建.– 桑布莱克 2011 年 3 月 16 日 12:32

I ended up doing something slightly different. We're not storing the releases in our internal repository. Instead we're building using Hudson and a multi-configuration project (one configuration/profile for each customer). This way when a release is made the Hudson job is run to build different wars for all customers. They are then stored on the Hudson server instead of Nexus. Builds for specific versions and customers can also be built at any time from the releases in Nexus. – samblake Mar 16 '11 at 12:32

这篇关于使用 Maven 发布不同的配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆