You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Johan Oskarsson <jo...@oskarsson.nu> on 2007/09/26 19:28:41 UTC

Set resolver for publish only?

Hi.

I'm trying to setup a few of our projects to use ivy 2.0 alpha 2 for the 
first time.

I've setup an internal webserver to contain our jar files and ivy xml 
files. The idea is that this can be accessed from our servers and dev 
machines as read only. The publishing would be done using the sftp 
resolver. I imagine this would be a fairly normal solution, but after 
reading some posts and docs I wonder if everyone out there uses shared 
directories instead.

The problem with this approach is that you can't have the sftp resolver 
be publish only. Instead it tries to use that to read files that it 
already tried to read from the url resolver, asking me for the password 
every time.

What is the suggested solution to have a passwordless retrieve but a 
password protected resolve? It's also worth noting that our repository 
is behind a firewall so we have to ssh tunnel to reach it from some 
machines.

/Johan

Re: Set resolver for publish only?

Posted by Jing Xue <ji...@digizenstudio.com>.
Quoting Johan Oskarsson <jo...@oskarsson.nu>:

>   <settings defaultResolver="chained"/>

Maybe try to move the sftp resolver out of the chain, which is the
default resolver for resolving. That's probably why it always gets
called.  Try giving it a name and specifying it in the publish task.

HTH.
-- 
Jing Xue


Re: Set resolver for publish only?

Posted by Johan Oskarsson <jo...@oskarsson.nu>.
Jing Xue wrote:
> On Wed, Sep 26, 2007 at 06:28:41PM +0100, Johan Oskarsson wrote:
>> The problem with this approach is that you can't have the sftp resolver 
>> be publish only. Instead it tries to use that to read files that it 
>> already tried to read from the url resolver, asking me for the password 
>> every time.
> 
> Can you post your ivysettings.xml?
> 

Certainly, here's the latest version:

<ivysettings>
   <resolvers>
     <chain name="chained">
       <url name="ourcompany">
         <ivy 
pattern="http://ivy.int.ourcompany.com/[organisation]/[module]/[revision]/ivy-[revision].xml" 
/>
         <artifact 
pattern="http://ivy.int.ourcompany.com/[organisation]/[module]/[revision]/[artifact].[ext]" 
/>
         <artifact 
pattern="http://ivy.int.ourcompany.com/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]" 
/>
       </url>

       <ivyrep name="ivyrep"/>
       <sftp user="someuser" host="ivy.int.ourcompany.com">
         <ivy 
pattern="/var/www/[organisation]/[module]/[revision]/ivy-[revision].xml"/>
         <artifact 
pattern="/var/www/[organisation]/[module]/[revision]/[artifact].[ext]"/>
       </sftp>
     </chain>
   </resolvers>

   <settings defaultResolver="chained"/>
   <include url="${ivy.default.conf.dir}/ivyconf-public.xml"/>
   <include url="${ivy.default.conf.dir}/ivyconf-shared.xml"/>
   <include url="${ivy.default.conf.dir}/ivyconf-local.xml"/>
   <include url="${ivy.default.conf.dir}/ivyconf-main-chain.xml"/>
   <include url="${ivy.default.conf.dir}/ivyconf-default-chain.xml"/>
</ivysettings>

Re: Set resolver for publish only?

Posted by Jing Xue <ji...@digizenstudio.com>.
On Wed, Sep 26, 2007 at 06:28:41PM +0100, Johan Oskarsson wrote:
> The problem with this approach is that you can't have the sftp resolver 
> be publish only. Instead it tries to use that to read files that it 
> already tried to read from the url resolver, asking me for the password 
> every time.

Can you post your ivysettings.xml?

-- 
Jing Xue