private boolean overwrite = true;
@Override
public void execute() throws MojoExecutionException, MojoFailureException
{
Furnace forge = new FurnaceImpl();
if (!addonRepository.exists())
{
addonRepository.mkdirs();
}
else if (overwrite)
{
try
{
deleteDirectory(addonRepository);
addonRepository.mkdirs();
}
catch (IOException e)
{
throw new MojoExecutionException("Could not delete " + addonRepository, e);
}
}
AddonRepository repository = forge.addRepository(AddonRepositoryMode.MUTABLE, addonRepository);
MavenAddonDependencyResolver addonResolver = new MavenAddonDependencyResolver(this.classifier);
addonResolver.setSettings(settings);
addonResolver.setResolveAddonAPIVersions(!skipAddonAPIVersionResolution);
AddonManager addonManager = new AddonManagerImpl(forge, addonResolver);