class ComponentManagerService {

    public String deploy(final String pluginGAV) {
        final String pluginPath = ofNullable(pluginGAV)
                .map(gav -> mvnCoordinateToFileConverter.toArtifact(gav))
                .map(Artifact::toPath)
                .orElseThrow(() -> new IllegalArgumentException("Plugin GAV can't be empty"));

        final Path m2 = instance.getContainer().getRootRepositoryLocationPath();
        final String plugin =
                instance.addWithLocationPlugin(pluginGAV, m2.resolve(pluginPath).toAbsolutePath().toString());
        lastUpdated = new Date();
        if (started) {
            deployedComponentEvent.fire(new DeployedComponent());
        }
        return plugin;
    }

}