Wednesday, March 7, 2012

NuGet Server in pure Java

There are many implementations of NuGet Feed. Most of those implementations are .NET Based. To host them you need to have .NET Framework, IIS, Windows. Recently I saw posts promoting java enterprise-level implementations of NuGet Feed from Artifactory and Nexus.

For some reason one may need to have micro-to-small NuGet Feed server running on some old/small hardware probably under Linux.

You may know that TeamCity 7.0 provides a NuGet Feed as well. Sources of the NuGet support are Apache 2.0 licensed and stored under GitHub. The idea was to reuse the source-base to provide standalone NuGet Feed in pure Java.

The work resulted in some refactorings performed in a new branch in the repository. My goal is to use the branch as a base for further TeamCity plugin development. Some refactorings are still necessary and will be done in the future. I also have an idea (let me know if you need it!) to provide .war package for hosting the feed under Java application servers like Tomcat, Jetty and others.

Note. To run the server you need to have Java Runtime Environment 1.6. For more details, see tools/README.txt

Feel free to download it and get it a try. I need your feedback

Sources of the server are found under GitHub.

NuGet tool package with java code: http://nuget.org/packages/NuGet.Java.Server

You may download it from: http://packages.nuget.org/api/v1/package/NuGet.Java.Server/0.7.13.5, change the extension of the file to .zip.

3 comments:

Espen Strømsnes said...

Excellent work!

This was exactly what I was looking for; the possibility to host a NuGet Feed on some cheap hardware without IIS.

Дмитрий Свиридов said...

Look this:
http://code.google.com/p/jnuget/
we use our custom NuGet server/

Gil Shinar said...

Hi,

Thanks a lot for the great work!!

I can list and get packages but cannot push. I get the following error message:
The underlying connection was closed: An unexpected error occurred on a receive

Is there a certain reason for that?

Thanks