开发者

How to maintain different maven environments for production and development?

开发者 https://www.devze.com 2023-03-18 21:46 出处:网络
In a Java world where people use Maven/Ivy to manage dependencies, how should one maintain multiple environments/repositories (artifactory) for production and development environments?

In a Java world where people use Maven/Ivy to manage dependencies, how should one maintain multiple environments/repositories (artifactory) for production and development environments?

The developers need to have a local rep开发者_运维技巧ository for development (and sharing prototype libraries) where as a few of the jars need to be available in the Production repository. Some of the projects should build seamlessly in development environment and production.

This can be achieved by maintaining separate repository URL's in different environment, but what is the best way to do it , with minimal changes in configurations (pom.xml).

What can be the approaches to automate this?

Update : Also a good feature to have would be least config (e.g pom.xml) required to start a new project. But it is ok set up the development machine once with a settings file (e.g $M2_HOME/settings.xml)


You may want to consider profiles. They support repository override. http://maven.apache.org/guides/introduction/introduction-to-profiles.html

0

精彩评论

暂无评论...
验证码 换一张
取 消