| //// |
| 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 |
| |
| https://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. |
| //// |
| |
| = classpath |
| |
| *Tag:* classpath |
| |
| [*__since 1.4__*] |
| |
| [ivysettings.classpath]#Includes a jar in the classpath used to load plugins.# |
| |
| This lets you add Ivy plugins without relying on an external classpath (the Ant classpath, for instance), therefore easing the use of Ivy in multiple execution environments (Ant, standalone, IDE plugins, ...). |
| |
| |
| == Attributes |
| |
| |
| [options="header",cols="15%,50%,35%"] |
| |======= |
| |Attribute|Description|Required |
| |url|the URL of a jar to add to the classpath|Yes, unless file is specified |
| |file|a jar to add to the classpath|Yes, unless url is specified |
| |======= |
| |
| |
| == Examples |
| |
| |
| [source, xml] |
| ---- |
| |
| <ivysettings> |
| <classpath file="${ivy.settings.dir}/custom-resolver.jar"/> |
| <typedef name="custom" classname="org.apache.ivy.resolver.CustomResolver"/> |
| <resolvers> |
| <custom name="custom"/> |
| </resolvers> |
| </ivysettings> |
| |
| ---- |
| |
| Adds the custom-resolver.jar (found in the same directory as the ivysettings.xml file) to the classpath, then defines a custom resolver and uses it. |
| |
| |
| ''' |
| |
| |
| [source, xml] |
| ---- |
| |
| <ivysettings> |
| <classpath url="http://www.myserver.com/ivy/custom-resolver.jar"/> |
| <typedef name="custom" classname="org.apache.ivy.resolver.CustomResolver"/> |
| <resolvers> |
| <custom name="custom"/> |
| </resolvers> |
| </ivysettings> |
| |
| ---- |
| |
| Same as above, but finds the jar on a web server. |