Hello,
We are using Ivy as our dependency resolver and would like to build our
intranet enterprise Read/Write repository. We provided the user credentials and
host details in 'settings' tag in our build file at the time of loading the
ivy-settings. However it seems it is able to authenticate the user but not able
to authorize it. We would like to form our local enterprise repository from the
maven2 repository and other available repositories. I have attached my
build.xml and ivy-settings.xml for your reference. Kindly help us to resolve
the issue.
Thanks and Regards,
Vijay Pande
----------------------------------------------------------------------------
Vijay Pande | Software Engineer | Persistent Systems
[email protected]<mailto:[email protected]> | Cell: +91
99234 06280 | Tel: +91 (20) 3023 4136
Innovation in software product design, development and delivery-
www.persistentsys.com<http://www.persistentsys.com/>
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the
property of Persistent Systems Ltd. It is intended only for the use of the
individual or entity to which it is addressed. If you are not the intended
recipient, you are not authorized to read, retain, copy, print, distribute or
use this message. If you have received this communication in error, please
notify the sender and delete all copies of this message. Persistent Systems
Ltd. does not accept any liability for virus infected mails.
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
-->
<ivysettings>
<settings defaultConflictManager="all" />
<properties file="${basedir}/ivysettings.properties"/>
<resolvers>
<chain name="resolver-chain">
<ibiblio name="maven2" m2compatible="true" />
<url name="ncicb-ivy-repo" m2compatible="false">
<artifact pattern="${nci.ivy.repo}/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" />
<ivy pattern="${nci.ivy.repo}/[organisation]/[module]/[revision]/ivy.xml" />
</url>
<filesystem name="my-repository">
<artifact pattern="${repository.dir}/[organisation]/[module]/[revision]/[artifact].[ext]" />
<ivy pattern="${repository.dir}/[organisation]/[module]/[revision]/lvy.xml" />
</filesystem>
<filesystem name="local-lib" m2compatible="true">
<artifact pattern="${local.lib}/[organisation]/[module]/[revision]/[artifact].[ext]" />
<ivy pattern="${local.lib}/[organisation]/[module]/[revision]/lvy.xml" />
</filesystem>
<url name="SVN-REPO" m2compatible="true" username="Test" >
<artifact pattern="${svn.url}/svn/Test/trunk/Test/[organisation]/[module]/[revision]/[artifact].[ext]" />
<ivy pattern="${svn.url}/svn/Test/trunk/Test/[organisation]/[module]/[revision]/lvy.xml" />
</url>
</chain>
</resolvers>
</ivysettings>
<?xml version ="1.0"?>
<!--Ant Script for create Build for caTissue Suite-->
<project name="my Repository" default="installmyRepository" xmlns:ivy="antlib:org.apache.ivy.ant">
<!--define require dir and Properties -->
<taskdef resource="net/sf/antcontrib/antcontrib.properties">
<classpath>
<pathelement location="./lib/ant-contrib.jar" />
</classpath>
</taskdef>
<property file="myRepository.properties" />
<property name="lib.dir" value="${basedir}/lib" />
<property name="local.lib" location="${basedir}/ExtraLib"/>
<property name="maven2.repository" value="maven2" />
<property name="my.repository" value="my-repository" />
<property name="svn.repo" value="SVN-REPO" />
<property name="from.local.resolver" value="local-lib" />
<property name="ncicb.ivy.repo" value="ncicb-ivy-repo" />
<path id="ivy.classpath">
<fileset dir="${lib.dir}" >
<include name="**/*.jar" />
</fileset>
</path>
<taskdef resource="org/apache/ivy/ant/antlib.xml" uri="antlib:org.apache.ivy.ant" classpathref="ivy.classpath" />
<setproxy proxyhost="${proxy.host}" proxyport="${proxy.port}" proxyuser="${proxy.user}" proxypassword="${proxy.password}"/>
<ivy:settings id="basic.settings" file="${basedir}/ivy-settings.xml" refid="ivy.classpath">
<credentials host="${svn.host}" realm="${svn.realm}" username="${svn.username}" passwd="${svn.password}" />
</ivy:settings>
<target name="clean">
<ivy:cleancache settingsRef="basic.settings"/>
<mkdir dir="${basedir}/../../my-repository" />
<delete dir="${basedir}/../../my-repository" />
</target>
<target name="installmyRepository" depends="clean" description="ANT task to install my repositoty using ivy.">
<antcall target="installFromMaven" />
<antcall target="installFromNcicb" />
<antcall target="installFromMavenToLocalSVN" />
</target>
<target name="installFromMaven">
<ivy:install settingsRef="basic.settings" transitive="true" overwrite="true" organisation="xerces" module="xerces" revision="2.4.0" from="${maven2.repository}" to="${my.repository}" />
</target>
<target name="installFromNcicb">
<ivy:install settingsRef="basic.settings" transitive="true" overwrite="true" organisation="ncicb" module="csm" revision="3.2" from="${ncicb.ivy.repo}" to="${my.repository}" />
</target>
<target name="installFromMavenToLocalSVN">
<ivy:install settingsRef="basic.settings" transitive="true" overwrite="true" organisation="xerces" module="xerces" revision="2.4.0" from="${maven2.repository}" to="${svn.repo}" />
</target>
</project>