A quick attempt to answer your questions.
Issue #1:
It won't work since the proxy handling is done dynamically: everytime a
resource is downloaded. So setting/resetting the proxy in the constructor won't
do anything since nothing is downloaded there...
But I think you want to avoid Ivy to use a proxy for your private repository.
Right? Although I didn't test it, I think you can use the system property
http.nonProxyHosts for this (if you don't have commons-httpclient in Ivy's
classpath).
Issue #2:
Could you try setting the rev attribute to an empty string instead of
'latest.integration' for those dependencies without revision?
Issue #3:
It seems to me that Ivy thinks that 'work...@commons-lang' is the revision of
your axis dependency. Did you specify a revision in the axis2/ivy/ivy.xml of
your commons-lang repository?
Issue #4 and #6:
I don't have any idea. Anyone else around here who can answer this
packager-resolver question?
Issue #5:
Ivy hasn't built-in support for publishing artifacts into SVN. But there is an
SVN resolver available (check the links on the website) which I think support
SVN publishing.
regards,
Maarten
- Original Message
From: Shaikh Almas eralm...@gmail.com
To: ivy-user@ant.apache.org
Sent: Tue, June 8, 2010 6:34:26 PM
Subject: Re: Issue with Ivy custome resolver
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*
ivysettings
settings defaultResolver=chained defaultConflictManager=all /
typedef name=almas classname=com.xyz.ivy.ProxyUrlResolver/
resolvers
almas name=privateRepo m2compatible=true
artifact pattern=
http://www.ibiblio.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]/http://www.ibiblio.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]%22/
/almas
url name=private
artifact pattern=
http://www.internalCorporateRepo.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]/http://www.internalcorporaterepo.org/maven2/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]%22/
/url
!-- Order in which the dependency would be resolved --
chain name=chained returnFirst=true
resolver ref=privateRepo /
resolver ref=private /
/chain
/resolvers
/ivysettings
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.xxx.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/work...@commons-lang/axis2-work...@commons-lang.jar
])
[ivy:retrieve] resolved ivy file produced in
c:\temp\ivy\resolved