Home > Java > Deploying large files with Maven

Deploying large files with Maven

At a customer site we are using Sonatype Nexus as a local Maven repository. It stores our own artifacts as well as binary third-party components. Nexus runs as a web application in Tomcat 6 behind an Apache 2.2 web server. Yesterday I had a very frustrating problem: it was impossible to deploy large files with deploy:deploy-file. Small files worked every time.

What to do? I tried all Apache and Tomcat options I could find that seemed relevant. I also configured Maven to use dav instead of http. That required the use of a local dummy pom:


With this in place and -DgeneratePom=true on the command line I could deploy to dav:http://server/path. Still no luck, though.

I finally found a solution. If Apache is configured to use keep-alives it works! Edit httpd.conf and set:

KeepAlive On

With this configuration it is possible to deploy large files both with dav and with plain http.

Categories: Java
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: