joelittlejohn / embedmongo-maven-plugin

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

MVN repo and downloads of mongo artifact #69

Closed neodem closed 7 years ago

neodem commented 7 years ago

It seems that the plugin doesn't attempt to load the mongo artifact from the current mvn repo and instead caches it in a .embedmongo dir. Is there a way to use the mvn repo? My build agents don't have access to the outside internet and can only get stuff from our nexus. Thoughts?

joelittlejohn commented 7 years ago

Hi. You can specify your own local mirror for downloads that will be used instead of fastdl.mongodb.org. Mongo binaries aren't Maven artifacts so I don't think Nexus is a good place for these.

neodem commented 7 years ago

how would I specify the mirror? Can you let me know?

joelittlejohn commented 7 years ago

You need to use the downloadPath config option and point this at your own server. There's an example in the README.md.

To understand how to organise the files in your mirror, you can check this method:

https://github.com/flapdoodle-oss/de.flapdoodle.embed.mongo/blob/0909e54b0486de4e37bd14b1cac5e5dc6c14b97f/src/main/java/de/flapdoodle/embed/mongo/Paths.java#L83

The basic layout is:

{platform}/mongodb-{platform}-{bitSize}-{version}.{archiveType}

for example:

https://fastdl.mongodb.org/linux/mongodb-linux-x86_64-amazon-3.4.0.tgz

neodem commented 7 years ago

super cool.. thank you