Java Code Examples for org.eclipse.m2e.core.project.IMavenProjectFacade#getMavenProject()
The following examples show how to use
org.eclipse.m2e.core.project.IMavenProjectFacade#getMavenProject() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MavenProjectConfigurator.java From gwt-eclipse-plugin with Eclipse Public License 1.0 | 6 votes |
@Override public AbstractBuildParticipant getBuildParticipant(final IMavenProjectFacade projectFacade, MojoExecution execution, final IPluginExecutionMetadata executionMetadata) { Activator.log("MavenProjectConfigurator.getBuildParticipant for Maven invoked"); // Run the execution generate-module for maven2 plugin // Don't run on war for gwt maven plugin1 MojoExecutionBuildParticipant build = null; MavenProject mavenProject = projectFacade.getMavenProject(); if (mavenProject != null && isGwtMavenPlugin2(mavenProject)) { Activator.log("MavenProjectConfigurator.getBuildParticipant adding build participant for generate-module."); build = new MojoExecutionBuildParticipant(execution, true, true); } return build; }
Example 2
Source File: FlexMavenPackagedProjectStagingDelegate.java From google-cloud-eclipse with Apache License 2.0 | 5 votes |
private static IPath getFinalArtifactPath(IProject project) throws CoreException { IMavenProjectRegistry projectManager = MavenPlugin.getMavenProjectRegistry(); IMavenProjectFacade projectFacade = projectManager.create(project, new NullProgressMonitor()); MavenProject mavenProject = projectFacade.getMavenProject(new NullProgressMonitor()); String buildDirectory = mavenProject.getBuild().getDirectory(); String finalName = mavenProject.getBuild().getFinalName(); String finalArtifactPath = buildDirectory + "/" + finalName + "." + mavenProject.getPackaging(); return new Path(finalArtifactPath); }