joelittlejohn / embedmongo-maven-plugin

Maven plugin wrapper for the flapdoodle.de embedded MongoDB API
Apache License 2.0
88 stars 51 forks source link

Make download base URL configurable #23

Closed dietrichatadobe closed 11 years ago

dietrichatadobe commented 11 years ago

It would be nice if the base URL for downloads was configurable, since not all MongoDB versions seem to be available on http://fastdl.mongodb.org/. Or someone could use an internal server to host the binaries.

joelittlejohn commented 11 years ago

Definitely a possibility.

As a workaround for internally hosting the binaries, you could create a network share and have people mount it at ~/.embedmongo. This would stop the plugin ever needing to download binaries as it would always find them in its cache. Not a particularly elegant solution I know but it might just work :)

michaelmosmann commented 11 years ago

Would you like to have a different download URL for all versions or more or less a version depending rule to do so?

michaelmosmann commented 11 years ago

Maybe this could work for you: https://github.com/flapdoodle-oss/embedmongo.flapdoodle.de#customize-download-url

dietrichatadobe commented 11 years ago

There are two things that I would be interested in:

  1. point the download to "downloads.mongodb.org" instead of "fastdl.mongodb.org"
  2. point the download to an internal server for self-hosting the MongoDB binaries

Whether the first works depends on the paths being consistent between servers and more/all versions of MongoDB being available on "downloads.mongodb.org". Not actually sure about that.

For the second I would simply make sure that the paths on the internal server match "fastdl.mongodb.org".

In either case, the Maven plugin would need to expose the download path as a configurable item, I guess.

joelittlejohn commented 11 years ago

Okay great, it sounds like the DownloadConfigBuilder provides what we need. I'll look at adding this in the next version (or feel free to make the changes yourself and raise a PR).

dietrichatadobe commented 11 years ago

I just noticed why I had problems using our version of MongoDB: the plugin always tries to download the Windows 2008 build on my machine, which doesn't seem to be available pre-2.0.3.

Being able to configure the download path might still come in handy, so I'll send a PR if you're ok with it.

joelittlejohn commented 11 years ago

Closed by #24.