Search code examples
scalamavennexusartifactoryarchiva

embedded maven remote repository


I am writing a scala client that should perform several reads from maven remote repository (dependency tree evaluation).

To perform e2e tests to my code I need a running maven repository (artifactory, nexus, archiva etc...) with several artifacts deployed.

I am looking for a way I can use test utility that will allow me to start embedded server with code configured artifacts and dependency relationship. That way I can set it up just before my test, use it and stop it.

If possible - I want to avoid using filesystem

Of course - that library can be either scala or java


Solution

  • There is a MockRepositoryServer in the Mojohaus project run by the Maven committers and others that does what you need. It is specifically designed for that exact testing purpose.

    You can also use a full blown Nexus Repository Manager in a local install. Either will work.