Tips for uploading very large files to Nexus Repository 2

Visit for documentation on Nexus Repository version 2.

There are no artifact upload size limits in Nexus Repository 2.

There is one caveat to the above. If you're using Maven 2, you need to use the httpclient based wagon. The default wagon used in Maven 2 uses the built in JDK HTTP classes, and these load the entire request into memory before sending it. This could cause OOM's in Maven for very large artifacts.

To get Maven 2 to use the httpclient based wagon add the following to your pom file - making sure to use version 2.1, higher versions won't work with Maven2:


And change the server definition in your Maven settings.xml:


Note: Maven 3 uses the httpclient based wagon by default, so there isn't any need to configure anything when using it.

Have more questions? Submit a request


Article is closed for comments.