List of usage examples for org.apache.maven.project DefaultProjectBuilderConfiguration setLocalRepository
public ProjectBuilderConfiguration setLocalRepository(ArtifactRepository localRepository)
From source file:com.cedarsoft.fish.maven.MavenCompletionGenerator.java
public void execute() throws MojoExecutionException, MojoFailureException { getLog().info("Executing..."); try {/*from w w w .j av a 2s . c om*/ DefaultProjectBuilderConfiguration configuration = new DefaultProjectBuilderConfiguration(); configuration.setLocalRepository(localRepository); project = projectBuilder.buildStandaloneSuperProject(configuration); addDefaultPlugins(); addMojoHausPlugins(); addOtherPlugins(); //plugin.setGroupId("net.sourceforge.cobertura"); //plugin.setArtifactId("cobertura"); //plugin.setVersion("2.1.1"); // //plugin.setGroupId("com.cedarsoft.fish"); //plugin.setArtifactId("maven"); //plugin.setVersion("1.0.0-SNAPSHOT"); // ////Old plugin? //plugin.setGroupId("maven-plugins"); //plugin.setArtifactId("maven-cobertura-plugin"); //plugin.setVersion("1.4"); for (Plugin plugin : plugins) { printCompletion(plugin); } } catch (ProjectBuildingException | PluginManagerException | ArtifactResolutionException | PluginNotFoundException | PluginVersionNotFoundException | InvalidPluginException | ArtifactNotFoundException | PluginVersionResolutionException | InvalidVersionSpecificationException e) { throw new RuntimeException(e); } }