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 Michael Shea <mi...@nitido.com> on 2010/04/01 23:54:58 UTC
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 - testdeveloper1@nitido.com [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 - testdeveloper1@nitido.com [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.
Re: publishing via http
Posted by "Steele, Richard" <ri...@steelezone.net>.
I wish I had a good answer for you, but we pretty much ran into the same
problem. We figured that because no one else seemed to be reporting our
problem it must be something we were doing wrong in our setup, so you can
imagine my joy to see we're not alone.
We ended up working around the issue by doing gets with HTTP and puts with
SSH; this isn't ideal, but we kind of needed to get on with things. We now
have some time to make this right, so I'm very interested if anyone else has
any suggestions.
Rich
On Tue, Apr 6, 2010 at 11:58 AM, Michael Shea <mi...@nitido.com> wrote:
> 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 <mi...@nitido.com>
>> To: ivy-user@ant.apache.org
>> 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 - testdeveloper1@nitido.com [01/Apr/2010:17:38:56 -0400]
>> "HEAD /lib/nitido/project24/1.0.0.0/zips/project24-resources.zipHTTP/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 - testdeveloper1@nitido.com [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.
>>
>>
>>
>>
>>
>
>
Re: publishing via http (with Apache and webdav)
Posted by Michael Shea <mi...@nitido.com>.
Hey Anthony -
This is kinda on the back burner for me for now, since I've been using
the SSH resolver for publishing for awhile... But thanks for sharing
your solution! If I need to get this running in future, I'll definitely
take a look back at this =).
Mike.
> Michael Shea-2 wrote:
>
>> I will try to figure out how to configure Apache to support creating the
>> dirs automatically when I have some time for it... In the meanwhile, I
>> have also worked around the issue by setting up openssh on the target
>> server so that I can use an SSH resolver.
>>
>>
>
> Hi,
>
> I just wanted to share my solution. I haven't thoroughly tested it, but it
> seems to be working fine with Ivy 2.2.0-rc1. Basically, I added a mod_perl
> handler to Apache to catch any PUT requests, extract the full path, create
> all the directories, then let it continue its work.
>
> There is definitely some setup. You basically need four things:
> 1) Apache 2 (I used 2.2.x)
> 2) Perl (I used ActivePerl 5.10) - Ensure it's in your system PATH for
> Apache to pick up!
> 3) mod_perl for Apache (I installed the ActivePerl 5.10 PPM package from
> http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages)
> 4) Apache webdav modules (they came standard with my Apache install)
>
> If you haven't clued in yet, I'm using Windows. The requirements are the
> same in Linux and UNIX, except where you grab perl, apache, and the perl
> module for apache is up to you to figure out. :-P
>
> In your apache base directory create the sub-directory "ApachePerl". In
> there create an empty Perl module file called "AutoMKCOL.pm". Edit it and
> copy/paste the following:
>
> ###########################################################
> #
> # This is a PerlFixupHandler that will take any PUT
> # requests, determine the path required, and if it doesn't
> # exist, creates the whole path. If there is a problem
> # creating the path, an error is generated.
> #
> ###########################################################
> package ApachePerl::AutoMKCOL;
>
> use strict;
> use warnings;
>
> use Apache2::RequestRec ();
> use Apache2::ServerRec ();
> use Apache2::Log ();
>
> use File::Path qw(make_path);
> use File::Basename qw(dirname);
>
> # Compile constants
> use Apache2::Const -compile => qw(DECLINED);
>
> sub handler {
> my $r = shift;
>
> # Create directories if processing a put request.
> if ($r->method() eq "PUT")
> {
> # The full file system path to the file requested is a concat of the
> request filename and path_info.
> my $fullpath = $r->filename() . $r->path_info();
> my $dirname = dirname($fullpath);
>
> # If the directory doesn't exist, create it
> if (!(-d $dirname))
> {
> $r->log->info("Creating directory structure for PUT request: '" .
> $dirname . "'.");
> my @dirlist = make_path ($dirname);
>
> # If at least one directory wasn't created, there was a problem
> die "Failed to create directory structure: '" . $dirname . "'." unless
> $#dirlist > -1;
> }
> }
>
> # Allow next handler to run
> return Apache2::Const::DECLINED;
> }
> 1;
>
> Now we turn our attention towards Apache's configuration file
> (conf/httpd.conf):
> - Ensure the mod_perl module is loaded:
> LoadModule perl_module modules/mod_perl.so
>
> - Ensure the webdav modules are loaded:
> LoadModule dav_module modules/mod_dav.so
> LoadModule dav_fs_module modules/mod_dav_fs.so
> LoadModule dav_lock_module modules/mod_dav_lock.so
>
> Activate WebDav file locking by adding this line near the top:
> DavLockDB "/path/to/Apache/DavLock"
>
> In the Directory directive of the path you want to enable the PUT method
> (Ivy publishing) add the following:
> <Directory "/path/to/Apache/htdocs/ivy/repository">
> Dav On
> PerlFixupHandler +ApachePerl::AutoMKCOL
> </Directory>
>
> And that's about it. Restart Apache and if you did everything right it
> should start fine and you can begin publishing with Ivy via the url
> resolver. In the httpd.conf file, if you change LogLevel to "debug"
> temporarily you will see the messages generated by the perl module and
> potentially other messages if you are having problems.
>
> Good luck!
>
Re: publishing via http (with Apache and webdav)
Posted by antd <an...@gmail.com>.
Michael Shea-2 wrote:
>
> I will try to figure out how to configure Apache to support creating the
> dirs automatically when I have some time for it... In the meanwhile, I
> have also worked around the issue by setting up openssh on the target
> server so that I can use an SSH resolver.
>
Hi,
I just wanted to share my solution. I haven't thoroughly tested it, but it
seems to be working fine with Ivy 2.2.0-rc1. Basically, I added a mod_perl
handler to Apache to catch any PUT requests, extract the full path, create
all the directories, then let it continue its work.
There is definitely some setup. You basically need four things:
1) Apache 2 (I used 2.2.x)
2) Perl (I used ActivePerl 5.10) - Ensure it's in your system PATH for
Apache to pick up!
3) mod_perl for Apache (I installed the ActivePerl 5.10 PPM package from
http://perl.apache.org/docs/2.0/os/win32/install.html#PPM_Packages)
4) Apache webdav modules (they came standard with my Apache install)
If you haven't clued in yet, I'm using Windows. The requirements are the
same in Linux and UNIX, except where you grab perl, apache, and the perl
module for apache is up to you to figure out. :-P
In your apache base directory create the sub-directory "ApachePerl". In
there create an empty Perl module file called "AutoMKCOL.pm". Edit it and
copy/paste the following:
###########################################################
#
# This is a PerlFixupHandler that will take any PUT
# requests, determine the path required, and if it doesn't
# exist, creates the whole path. If there is a problem
# creating the path, an error is generated.
#
###########################################################
package ApachePerl::AutoMKCOL;
use strict;
use warnings;
use Apache2::RequestRec ();
use Apache2::ServerRec ();
use Apache2::Log ();
use File::Path qw(make_path);
use File::Basename qw(dirname);
# Compile constants
use Apache2::Const -compile => qw(DECLINED);
sub handler {
my $r = shift;
# Create directories if processing a put request.
if ($r->method() eq "PUT")
{
# The full file system path to the file requested is a concat of the
request filename and path_info.
my $fullpath = $r->filename() . $r->path_info();
my $dirname = dirname($fullpath);
# If the directory doesn't exist, create it
if (!(-d $dirname))
{
$r->log->info("Creating directory structure for PUT request: '" .
$dirname . "'.");
my @dirlist = make_path ($dirname);
# If at least one directory wasn't created, there was a problem
die "Failed to create directory structure: '" . $dirname . "'." unless
$#dirlist > -1;
}
}
# Allow next handler to run
return Apache2::Const::DECLINED;
}
1;
Now we turn our attention towards Apache's configuration file
(conf/httpd.conf):
- Ensure the mod_perl module is loaded:
LoadModule perl_module modules/mod_perl.so
- Ensure the webdav modules are loaded:
LoadModule dav_module modules/mod_dav.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule dav_lock_module modules/mod_dav_lock.so
Activate WebDav file locking by adding this line near the top:
DavLockDB "/path/to/Apache/DavLock"
In the Directory directive of the path you want to enable the PUT method
(Ivy publishing) add the following:
<Directory "/path/to/Apache/htdocs/ivy/repository">
Dav On
PerlFixupHandler +ApachePerl::AutoMKCOL
</Directory>
And that's about it. Restart Apache and if you did everything right it
should start fine and you can begin publishing with Ivy via the url
resolver. In the httpd.conf file, if you change LogLevel to "debug"
temporarily you will see the messages generated by the perl module and
potentially other messages if you are having problems.
Good luck!
--
View this message in context: http://old.nabble.com/publishing-via-http-tp28114003p29453487.html
Sent from the ivy-user mailing list archive at Nabble.com.
Re: publishing via http
Posted by Michael Shea <mi...@nitido.com>.
I enabled PUT requests by adding this to my site configuration:
Alias /ivy /home/ivy
<Directory /home/ivy/>
DAV On
<LimitExcept MKCOL GET HEAD OPTIONS PUT>
Allow from all
</LimitExcept>
AuthType Basic
AuthName "Ivy Repository"
AuthBasic Provider ldap
# Followed by LDAP configuration directives.
</Directory>
I'm running Ubuntu, and I have a stock Apache2 webserver installed, via
apt-get (version 2.2.12). I didn't need to enable mod_put or anything
for this to work with a standard curl command that just puts a file into
/home/ivy. eg:
curl -u [username:password] -T [file] http://[server]/ivy/[target filename]
Using curl to issue MKCOL commands also works:
curl -u [username:password] -X MKCOL http://[server]/ivy/[dir to create]
I haven't been able to find much about mod_put on google - is it still
relevant? My hypothesis is that the functionality it provides is now
built-in to the webserver or provided by another module, since I am
definitely able to do PUTs without it. This, which I just found,
indicates that the functionality is now provided by mod_dav, which I
have enabled:
http://objectmix.com/apache/651126-mod_put-apache2.html
Is there a reason that Ivy can't or shouldn't simply issue the MKCOL
requests before issuing the PUT request? That seems like it would be a
more elegant solution than requiring customizations to the webserver to
create the subdirectories.
eg: publishing www.myserver.com/ivy/org/product/1.0/ivys/ivy.xml
results in:
MKCOL www.myserver.com/ivy
MKCOL www.myserver.com/ivy/org
MKCOL www.myserver.com/ivy/org/product
MKCOL www.myserver.com/ivy/org/product/1.0
MKCOL www.myserver.com/ivy/org/product/1.0/ivys
PUT www.myserver.com/ivy/org/product/1.0/ivys/ivy.xml
I will try to figure out how to configure Apache to support creating the
dirs automatically when I have some time for it... In the meanwhile, I
have also worked around the issue by setting up openssh on the target
server so that I can use an SSH resolver.
Thanks,
Mike.
> How did you enable the PUT requests in Apache?
>
> I think the mod_put modules listed here might create the missing directories:
> http://www.gknw.net/development/apache/httpd-2.0/unix/modules/
>
> I couldn't try them though, so I might be mistaken...
>
> Maarten
>
>
> ----- Original Message ----
> From: Michael Shea <mi...@nitido.com>
> To: ivy-user@ant.apache.org
> Sent: Tue, April 6, 2010 5:58:46 PM
> Subject: Re: publishing via http
>
> 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 <mi...@nitido.com>
>> To: ivy-user@ant.apache.org
>> 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 - testdeveloper1@nitido.com [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 - testdeveloper1@nitido.com [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.
>>
>>
>>
>>
>>
>>
>
>
>
>
>
Re: publishing via http
Posted by Maarten Coene <ma...@yahoo.com>.
How did you enable the PUT requests in Apache?
I think the mod_put modules listed here might create the missing directories:
http://www.gknw.net/development/apache/httpd-2.0/unix/modules/
I couldn't try them though, so I might be mistaken...
Maarten
----- Original Message ----
From: Michael Shea <mi...@nitido.com>
To: ivy-user@ant.apache.org
Sent: Tue, April 6, 2010 5:58:46 PM
Subject: Re: publishing via http
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 <mi...@nitido.com>
> To: ivy-user@ant.apache.org
> 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 - testdeveloper1@nitido.com [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 - testdeveloper1@nitido.com [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.
>
>
>
>
>
Re: publishing via http
Posted by Michael Shea <mi...@nitido.com>.
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 <mi...@nitido.com>
> To: ivy-user@ant.apache.org
> 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 - testdeveloper1@nitido.com [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 - testdeveloper1@nitido.com [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.
>
>
>
>
>
Re: publishing via http
Posted by Maarten Coene <ma...@yahoo.com>.
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 <mi...@nitido.com>
To: ivy-user@ant.apache.org
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 - testdeveloper1@nitido.com [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 - testdeveloper1@nitido.com [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.