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

查看:137
本文介绍了使用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的版本构建针对特定版本和客户的构建。 - samblake 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天全站免登陆