I'm new to m2e development. I intend to integrate m2e in our company rcp.
What I want to achieve is a "simple" mvn install:install-file.
final DefaultMavenExecutionRequest defaultMavenExecutionRequest = new DefaultMavenExecutionRequest();
defaultMavenExecutionRequest.setGoals(Lists.newArrayList("install:install-file"));
defaultMavenExecutionRequest.setInteractiveMode(false);
final Properties properties = new Properties();
properties.setProperty("file", artifact.getFile().getAbsolutePath());
properties.setProperty("groupId", artifact.getGroupId());
properties.setProperty("artifactId", artifact.getArtifactId());
properties.setProperty("version", artifact.getVersion());
properties.setProperty("packaging", artifact.getType());
properties.setProperty("generatePom", String.valueOf(generatePom));
defaultMavenExecutionRequest.setSystemProperties(properties);
return MavenPlugin.getMaven().execute(defaultMavenExecutionRequest, new NullProgressMonitor());
It works. But the execute(MavenExecutionRequest,IProgressMonitor) is deprecated in the version I use (1.5.x).
I can't find how to properly do that in sources.
Thanks for the help.