Apache IVY Tutorial
Selected Reading
- Apache IVY - Discussion
- Apache IVY - Useful Resources
- Apache IVY - Quick Guide
- Apache IVY - Public Repository
- Apache IVY - Shared Repository
- Apache IVY - Local Repository
- Apache IVY - Resolvers
- Apache IVY - info
- Apache IVY - publish
- Apache IVY - cachepath
- Apache IVY - retrieve
- Apache IVY - install
- Apache IVY - resolve
- Apache IVY - Eclipse Ivy Plugin
- Apache IVY - Settings File
- Apache IVY - Terminology
- Apache IVY - Environment Setup
- Apache IVY - Overview
- Apache IVY - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Apache IVY - Shared Repository
Apache IVY - Shared Repository
A shared repository is a team level shared repository of a team. It is very common to be overridden in organizations.
Default Location
By default, shared repository is present in ${ivy.default.ivy.user.dir}/shared folder. If you want to change it, the use the ivy.shared.default.root variable in ant file.
build.xml
<target name="resolve"> <property name="ivy.shared.default.root" value="/opt/ivy/repository/shared"/> <ivy:resolve /> </target>
Other properties pke ivy pattern and artifact pattern can also be customized as follows −
build.xml
<target name="resolve"> <property name="ivy.shared.default.root" value="/opt/ivy/repository/shared"/> <property name="ivy.shared.default.ivy.pattern" value="[organisation]/[module]/[revision]/ivy.xml"/> <property name="ivy.shared.default.artifact.pattern" value="[organisation]/[module]/[revision]/[artifact].[ext]"/> <ivy:resolve /> </target>
Overriding ivysettings defaults
By default ivy has its configurations in ivysettings.xml present in ivy.jar.
ivysettings.xml
<ivysettings> <settings defaultResolver="default"/> <include url="${ivy.default.settings.dir}/ivysettings-pubpc.xml"/> <include url="${ivy.default.settings.dir}/ivysettings-shared.xml"/> <include url="${ivy.default.settings.dir}/ivysettings-local.xml"/> <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/> <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/> </ivysettings>
To override shared repository setting, update the contents of ivysettings-shared.xml.
ivysettings-shared.xml
<ivysettings> <property name="ivy.shared.default.root" value="${ivy.default.ivy.user.dir}/shared" override="false"/> <property name="ivy.shared.default.ivy.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/> <property name="ivy.shared.default.artifact.pattern" value="[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" override="false"/> <resolvers> <filesystem name="shared"> <ivy pattern="${ivy.shared.default.root}/${ivy.shared.default.ivy.pattern}" /> <artifact pattern="${ivy.shared.default.root}/${ivy.shared.default.artifact.pattern}" /> </filesystem> </resolvers> </ivysettings>Advertisements