我正在使用两个命名不一致的常春藤存储库,我正在寻找使用命名空间来帮助映射,但命名空间会影响“安装”之外的操作,例如“resolve”吗?
答案 0 :(得分:0)
我刚刚在手册中找到了namespace doco ....我认为这种做法过于复杂。
我建议使用适当的文件系统模式创建两个存储库声明:
<ivysettings>
<settings defaultResolver="central"/>
<resolvers>
<!-- Default resolver used to resolve 3rd party software from Maven Central -->
<ibiblio name="central" m2compatible="true"/>
<!-- Team1's repository. ivy and artifact patterns can be customized -->
<filesystem name="team1-repo">
<ivy pattern="${ivy.settings.dir}/repo/1/[organisation]/[module]/ivys/ivy-[revision].xml"/>
<artifact pattern="${ivy.settings.dir}/repo/1/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
<!-- Team2's repository. ivy and artifact patterns can be customized -->
<filesystem name="team2-repo">
<ivy pattern="${ivy.settings.dir}/repo/2/[organisation]/[module]/ivys/ivy-[revision].xml"/>
<artifact pattern="${ivy.settings.dir}/repo/2/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"/>
</filesystem>
</resolvers>
<!-- This optional section tells which resolver to use.
Alternative setup a chain resolver above -->
<modules>
<module organisation="team1" name=".*" resolver="team1-repo" />
<module organisation="team2" name=".*" resolver="team2-repo" />
</modules>
</ivysettings>
注意: