Hi Maarten,
Yes, my apache server is configured to accept HTTP PUT requests.
I've done some debugging using curl to PUT files on the server, and
yeah, it looks like the server doesn't create the required
subdirectories. So... Is creating the necessary subdirectories (or
"collections", in webdav-speak?) when receiving a PUT request a standard
thing that webservers do? I presume that it isn't.
So the question I have is:
Is this a "bug" in Ivy, that Ivy doesn't send the necessary MKCOL
commands first? Or is this something that is undesirable to have Ivy do
for some reason? I know that there's the VFS stuff as well, presumably
that would issue the MKCOL commands. It's not really an option for me
though, since I want to use this in a production environment where we
require stability, and we're not too keen on using projects that haven't
ever actually been released (ie: commons-vfs).
Anyway - it just looks to me like the usefulness of using URL resolvers
for publishing is severely limited, given that what Ivy actually tries
to do when doing an http publish isn't supported by Apache webserver
without writing a custom put-script. Maybe if it's not a bug, something
in the docs would be useful?
Mike Shea.
Is your apache server configured to accept HTTP PUT requests?
If so, mabye you should use another put-script that creates the missing
directories?
Maarten
----- Original Message ----
From: Michael Shea <[email protected]>
To: [email protected]
Sent: Thu, April 1, 2010 11:54:58 PM
Subject: publishing via http
Hi folks,
I am trying to publish to an HTTP Ivy repository, and having some trouble with
it. I'm using ivy-2.1.0.
The resolver I am using in ivysettings.xml looks like this:
<url name="shared-publisher">
<ivy
pattern="http://${server}/${infrastructure.lib.dir}/${ivy.artifact.pattern}" />
<artifact
pattern="http://${server}/${infrastructure.lib.dir}/${ivy.artifact.pattern}" />
</url>
Basically, I get this in the logs from my ant build when I call ivy:publish:
Caused by: java.io.IOException: Access to URL
http://[server]/lib/nitido/project24/1.0.0.0/zips/project24-resources.zip was
refused by the server
If I check the apache logs on the server, I see this:
<snip>
192.168.13.68 - - [01/Apr/2010:17:38:56 -0400] "HEAD
/lib/nitido/project24/1.0.0.0/zips/project24-resources.zip HTTP/1.1" 401 224 "-" "Apache
Ivy/2.1.0"
192.168.13.68 - [email protected] [01/Apr/2010:17:38:56 -0400] "HEAD
/lib/nitido/project24/1.0.0.0/zips/project24-resources.zip HTTP/1.1" 404 163 "-" "Apache
Ivy/2.1.0"
192.168.13.68 - - [01/Apr/2010:17:38:56 -0400] "PUT
/lib/nitido/project24/1.0.0.0/zips/project24-resources.zip HTTP/1.1" 401 741 "-" "Apache
Ivy/2.1.0"
192.168.13.68 - [email protected] [01/Apr/2010:17:38:56 -0400] "PUT
/lib/nitido/project24/1.0.0.0/zips/project24-resources.zip HTTP/1.1" 403 538 "-" "Apache
Ivy/2.1.0"
</snip>
It looks to me like it's trying to just run a PUT without creating the
necessary subdirectories first...?
I've also tried messing around with the vfs resolver (compiled my own
commons-vfs jar, based on the 1.0 tag from the vfs svn repo), but I didn't have
any luck with it.
I haven't found much about this on google... bits and pieces here and there,
but nothing that has really helped me yet. Is what I am trying to do even
possible currently? Or should I just abandon this approach, and set up an FTP
server to handle publishing instead? =)
Thanks,
Mike Shea.