Skip to content

Instantly share code, notes, and snippets.

@fbricon
Created May 4, 2013 16:17
Show Gist options
  • Save fbricon/5517966 to your computer and use it in GitHub Desktop.
Save fbricon/5517966 to your computer and use it in GitHub Desktop.
tried :
IMavenExecutionContext context = MavenPlugin.getMaven().createExecutionContext();
version = context.execute(new ICallable<String>() {
public String call(IMavenExecutionContext context, IProgressMonitor monitor) throws CoreException {
return MavenPlugin.getMaven().resolvePluginVersion(groupId, artifactId, context.getSession());
}
}, new NullProgressMonitor());
and got
Caused by: org.apache.maven.plugin.version.PluginVersionResolutionException: Error resolving version for plugin 'org.apache.maven.plugins:maven-compiler-plugin' from the repositories [local (D:\Dev\maven\repository)]: Plugin not found in any plugin repository
at org.apache.maven.plugin.version.internal.DefaultPluginVersionResolver.selectVersion(DefaultPluginVersionResolver.java:237)
at org.apache.maven.plugin.version.internal.DefaultPluginVersionResolver.resolveFromRepository(DefaultPluginVersionResolver.java:149)
at org.apache.maven.plugin.version.internal.DefaultPluginVersionResolver.resolve(DefaultPluginVersionResolver.java:97)
at org.eclipse.m2e.core.internal.embedder.MavenImpl.resolvePluginVersion(MavenImpl.java:1248)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment