@Override
    protected void downloadPlugin(File pluginFile, PluginCoordinates coordinates) {
        String testM2Path = System.getProperty("apiman.test.m2-path"); //$NON-NLS-1$
        if (testM2Path == null) {
            return;
        }
        File testM2Dir = new File(testM2Path).getAbsoluteFile();

        if (!testM2Dir.exists()) {
            // Try to resolve via resources
            testM2Dir = toAbsolutePathFromResources(testM2Path);

            // If still no good, then...
            if (!testM2Dir.exists()) {
                System.err.println("apiman.test.m2-path is set as " + testM2Path +
                    " but it does not seem to exist on the filesystem or Java resources");
            }
        }

        File pluginArtifactFile = new File(testM2Dir, PluginUtils.getMavenPath(coordinates));
        if (!pluginArtifactFile.isFile()) {
            return;
        }
        try {
            FileUtils.copyFile(pluginArtifactFile, pluginFile);
        } catch (IOException e) {
            pluginArtifactFile.delete();
        }
    }
@see io.apiman.manager.api.core.plugin.AbstractPluginRegistry#downloadPlugin(java.io.File, io.apiman.common.plugin.PluginCoordinates)
manager/test/api/src/main/java/io/apiman/manager/test/server/ApiManagerTestPluginRegistry.java