From ivy-user-return-6884-apmail-ant-ivy-user-archive=ant.apache.org@ant.apache.org Tue Jun 08 16:34:56 2010
Return-Path:
Delivered-To: apmail-ant-ivy-user-archive@www.apache.org
Received: (qmail 82435 invoked from network); 8 Jun 2010 16:34:56 -0000
Received: from unknown (HELO mail.apache.org) (140.211.11.3)
by 140.211.11.9 with SMTP; 8 Jun 2010 16:34:56 -0000
Received: (qmail 3976 invoked by uid 500); 8 Jun 2010 16:34:55 -0000
Delivered-To: apmail-ant-ivy-user-archive@ant.apache.org
Received: (qmail 3928 invoked by uid 500); 8 Jun 2010 16:34:55 -0000
Mailing-List: contact ivy-user-help@ant.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: ivy-user@ant.apache.org
Delivered-To: mailing list ivy-user@ant.apache.org
Received: (qmail 3920 invoked by uid 99); 8 Jun 2010 16:34:54 -0000
Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 16:34:54 +0000
X-ASF-Spam-Status: No, hits=4.9 required=10.0
tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_NOVOWEL
X-Spam-Check-By: apache.org
Received-SPF: pass (nike.apache.org: domain of eralmas7@gmail.com designates 209.85.214.173 as permitted sender)
Received: from [209.85.214.173] (HELO mail-iw0-f173.google.com) (209.85.214.173)
by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Jun 2010 16:34:48 +0000
Received: by iwn10 with SMTP id 10so701466iwn.4
for ; Tue, 08 Jun 2010 09:34:27 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=gamma;
h=domainkey-signature:mime-version:received:received:in-reply-to
:references:date:message-id:subject:from:to:content-type;
bh=ruwxLvEVgqNy6bWtO9c2/qii+ZF0XNsXZLBq2Q66Kww=;
b=LCtqrXJjkg/sgIVNib3EYOLUpEpZyqHYsBtC+RqGU85StVl4iPpHvSX8w4Jy/QNIts
/7rd+NA+b19MHF6qHQmDkHUVREwUyWv3gl45viwb0TIfvSudTJu8jYBdoWLR7YPn/2ad
HR9eHSaYgJF+NuCTfSqh3gMMsfjdEbnmU0N3Y=
DomainKey-Signature: a=rsa-sha1; c=nofws;
d=gmail.com; s=gamma;
h=mime-version:in-reply-to:references:date:message-id:subject:from:to
:content-type;
b=HwJ0YVmLt0qHW1nEcsRqDj47IRLcwmbXl33I4uRdbwOiXsQjsvFR9f4QZghk9e+UWF
aLyzA+mvD1WEvrlLvxF1sMmMxXYiNedMPu51QimM/SrZdf1gIcDDWAWnc4cPFAiMdMkb
2/QT7qFyCTKxbeAnGvCC0jmpiSBvU7sx0G5gs=
MIME-Version: 1.0
Received: by 10.224.26.193 with SMTP id f1mr9596689qac.83.1276014866269; Tue,
08 Jun 2010 09:34:26 -0700 (PDT)
Received: by 10.220.158.135 with HTTP; Tue, 8 Jun 2010 09:34:26 -0700 (PDT)
In-Reply-To: <572056.64986.qm@web30808.mail.mud.yahoo.com>
References:
<572056.64986.qm@web30808.mail.mud.yahoo.com>
Date: Tue, 8 Jun 2010 22:04:26 +0530
Message-ID:
Subject: Re: Issue with Ivy custome resolver
From: Shaikh Almas
To: ivy-user@ant.apache.org
Content-Type: multipart/alternative; boundary=00c09f8a4da8d50f8d0488875cba
X-Virus-Checked: Checked by ClamAV on apache.org
--00c09f8a4da8d50f8d0488875cba
Content-Type: text/plain; charset=ISO-8859-1
Hi Maarten,
For below mentioned issue, here is the ivysettings.xml (Issue #1 is given in
my below mail and ivysettings.xml is for the same)
*Issue #1*
>
>
And here's the code for ProxyUrlResolver
package com.xyz.ivy;
import org.apache.ivy.plugins.repository.url.URLRepository;
import org.apache.ivy.plugins.resolver.URLResolver;
import org.apache.ivy.util.Message;
public class ProxyUrlResolver extends URLResolver{
private void setProxy(){
System.setProperty("http.proxyHost", System.getProperty("proxyHost", "
proxy.xxxxxxx.net"));
System.setProperty("http.proxyPort", System.getProperty("proxyPort",
"8443"));
}
public ProxyUrlResolver(){
Message.verbose("About to set the proxy");
setProxy();
setRepository(new URLRepository());
Message.verbose("About to reset the proxy");
resetProxy();
}
private void resetProxy(){
System.setProperty("http.proxyHost", null);
System.setProperty("http.proxyPort", null);
}
}
I know that this is the wrong way. Can you please help me to get the correct
way out of it please?
*Issue#2*
I have certain jar files without revision number. But as rev is mandatory
attribute for ivy dependency, i am providing the revision attribute. But i
have something like (-[revision]) in url resolver. but its taking the module
number instead of ignoring the revision attribute. I know it wont ignore the
revision attribute as its not null.
Following is the output that i get
default-cache: no cached resolved revision for
perltools#perltools;latest.integration [ivy:retrieve] tried [ivy:retrieve]
listing all in [ivy:retrieve] using privateRepo to list all in
[ivy:retrieve] ApacheURLLister found URL=[
httP://myrepo/ivyRepository/perltools/jars/perltools.jar]. [ivy:retrieve]
found 1 resources [ivy:retrieve] found revs: [perltools.jar] [ivy:retrieve]
HTTP response status: 404 url=
httP://myrepo/ivyRepository/perltools/jars/perltools.jar/perltools-perltools.jar.jar[ivy:retrieve]
CLIENT ERROR: Not Found url=
httP://myrepo/ivyRepository/perltools/jars/perltools.jar/perltools-perltools.jar.jar
Can somebody please explain why its taking module.ext as revision where
revision i specified is latest.integration and in myrepo, i dont have
revision attribute. its just has
[http://myrepo/ivyRepository/perltools/jars//perltools.jar]
Can somebody please help me so that i can avoid revision attribute?
*Issue #3*
I ma using dual resolver and having a problem.
Following is what i get when i run through ant in debug and verbose mode([
http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/axis2-working@commons-lang.jar
])
[ivy:retrieve] resolved ivy file produced in
c:\temp\ivy\resolved-stratus-stratus-working@WPRMW07536F4BS.xml[ivy:retrieve]
:: downloading artifacts :: [ivy:retrieve] [NOT REQUIRED]
config#ego;4.3.1!ego.conf [ivy:retrieve] trying [
http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/axis2-working@commons-lang.jar]
[ivy:retrieve] tried [
http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/axis2-working@commons-lang.jar]
[ivy:retrieve] HTTP response status: 404 url=[
http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/axis2-working@commons-lang.jar]
[ivy:retrieve] CLIENT ERROR: Not Found url=[
http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/axis2-working@commons-lang.jar]
[ivy:retrieve] ibiblio: resource not reachable for
axis2#axis2;working@commons-lang: res=[
http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/axis2-working@commons-lang.jar]
[ivy:retrieve] WARN: [NOT FOUND ] axis2#axis2;working@commons-lang!axis2.jar
(235ms) [ivy:retrieve] WARN: ==== commons-lang: tried [ivy:retrieve] WARN:
==== ibiblio: tried [ivy:retrieve] WARN: [
http://repo1.maven.org/maven2/axis2/axis2/working@commons-lang/axis2-working@commons-lang.jar]
[ivy:retrieve] [NOT REQUIRED] axis#axis-saaj;1.4!axis-saaj.jar
[ivy:retrieve] [NOT REQUIRED] axis#axis-wsdl4j;1.5.1!axis-wsdl4j.jar
Can you please tell me what is wrong with my ivysetting file or wrong with
ivy file?
Following is excerpt from ivysettings.xml
The problem (may be) is for each and every dependancy that i defined i have
seperate ivy.xml. and just one reolver as above? like just for an exampe,
for axis2.jar i have two dependancies in another ivy.xml, the dependencies
are axis-saaj and axis-wsdl4j.
Please help
*Issue #4*
I am using packager resolver and that packager resolver resolves the zip
file, unzip it, extracts the jar file from it in temp build file, but it
stays temporarily and only the jar file which i specified as a module name
gets copied to destination rest of all are ignored. Is there a way i can get
all the jar files? I use preseverBuildDirectories but is there a better way
to do it?
*Issue #5*
Also is it possible for me to publish an artifact to svn using normal ivy? I
got error while i was trying to use ivy 2.1.0 on XP using ant 1.8.0
java.illegalArguementException saying authorization failed. Is there a way i
can work through ivy:publish?
*Issue #6*
Is there a way i can use ivy variable in packager.xml?
Please help.
Thanks,
Almas
On Mon, Jun 7, 2010 at 2:27 AM, Maarten Coene wrote:
> Can you post your settings.xml so we can see what you already have done?
>
> Maarten
>
>
>
> ----- Original Message ----
> From: Shaikh Almas
> To: ivy-user@ant.apache.org
> Sent: Sun, June 6, 2010 11:24:06 AM
> Subject: Issue with Ivy custome resolver
>
> Hi,
> Can anyone help me with creating custom ivy resolver. I wish to extend
> URLResolver, such that it will have a new class say called ProxyURLResolver
> where i will set the proxy, resolve the artifact and then remove the proxy
> setting. I tried extending URLResolver directly before calling
> setRepository
> method and reseting after and had typedef as well in ivysettings.xml, but
> it
> didn't worked. Can you please help me by telling the exact steps that i
> need
> to follow to create new cutom resolver?
>
> Almas
>
>
>
>
>
--00c09f8a4da8d50f8d0488875cba--