Index: tests/pom.xml
===================================================================
--- tests/pom.xml	(revision 32612)
+++ tests/pom.xml	(working copy)
@@ -1,10 +1,16 @@
 <project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.jboss.tools</groupId>
+		<artifactId>maven</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+	</parent>
 	<groupId>org.jboss.tools.maven</groupId>
 	<artifactId>tests</artifactId>
-	<name>maven.tests</name>
 	<version>0.0.1-SNAPSHOT</version>
+	<name>maven.tests</name>
 	<packaging>pom</packaging>
 	<modules>
 		<module>org.jboss.tools.maven.ui.bot.test</module>
Index: tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF	(revision 32612)
+++ tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF	(working copy)
@@ -27,25 +27,17 @@
  org.eclipse.datatools.connectivity.db.generic,
  org.jboss.tools.common,
  org.jboss.tools.tests,
- org.maven.ide.eclipse;bundle-version="0.12.0",
  org.jboss.ide.eclipse.as.core,
- org.maven.ide.eclipse.maven_model_edit;bundle-version="0.12.0",
  org.hamcrest,
  org.eclipse.datatools.enablement.hsqldb,
  org.eclipse.datatools.enablement.hsqldb.dbdefinition,
  org.eclipse.datatools.enablement.hsqldb.ui,
- org.maven.ide.eclipse.archetype_common;bundle-version="0.12.0",
- org.maven.ide.eclipse.dependency_tree;bundle-version="0.12.0",
- org.maven.ide.eclipse.editor;bundle-version="0.12.0",
- org.maven.ide.eclipse.editor.xml;bundle-version="0.12.0",
- org.maven.ide.eclipse.launching;bundle-version="0.12.0",
- org.maven.ide.eclipse.nexus_indexer;bundle-version="0.12.0",
- org.maven.ide.eclipse.pr;bundle-version="0.12.0",
- org.maven.ide.eclipse.refactoring;bundle-version="0.12.0",
  org.eclipse.jst.jee,
  org.eclipse.jst.jee.ejb,
  org.eclipse.jst.jee.ui,
- org.eclipse.jst.jee.web
+ org.eclipse.jst.jee.web,
+ org.eclipse.m2e.lifecyclemapping.defaults;bundle-version="[1.0,1.1)",
+ org.eclipse.m2e.launching;bundle-version="[1.0,1.1)"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Eclipse-RegisterBuddy: org.apache.log4j
Index: tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
===================================================================
--- tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java	(revision 32612)
+++ tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java	(working copy)
@@ -21,7 +21,6 @@
 import java.util.List;
 import java.util.Properties;
 
-import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IMarker;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IResource;
@@ -34,6 +33,7 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.jobs.Job;
 import org.eclipse.datatools.connectivity.ConnectionProfileConstants;
 import org.eclipse.datatools.connectivity.ConnectionProfileException;
 import org.eclipse.datatools.connectivity.ProfileManager;
@@ -45,12 +45,14 @@
 import org.eclipse.datatools.connectivity.drivers.IPropertySet;
 import org.eclipse.datatools.connectivity.drivers.PropertySetImpl;
 import org.eclipse.datatools.connectivity.drivers.models.TemplateDescriptor;
+import org.eclipse.m2e.core.internal.IMavenConstants;
+import org.eclipse.swt.SWT;
 import org.eclipse.swt.widgets.Display;
+import org.eclipse.swt.widgets.Event;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.swtbot.eclipse.finder.SWTWorkbenchBot;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotEditor;
 import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotView;
-import org.eclipse.swtbot.eclipse.finder.widgets.SWTBotViewMenu;
 import org.eclipse.swtbot.swt.finder.SWTBot;
 import org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException;
 import org.eclipse.swtbot.swt.finder.finders.UIThreadRunnable;
@@ -59,6 +61,7 @@
 import org.eclipse.swtbot.swt.finder.results.VoidResult;
 import org.eclipse.swtbot.swt.finder.utils.SWTBotPreferences;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotRadio;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotShell;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTree;
 import org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem;
@@ -85,7 +88,6 @@
 import org.jboss.tools.seam.core.project.facet.SeamRuntime;
 import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
 import org.jboss.tools.seam.core.project.facet.SeamVersion;
-import org.jboss.tools.test.util.JobUtils;
 import org.jboss.tools.test.util.ResourcesUtils;
 import org.junit.After;
 import org.junit.AfterClass;
@@ -93,12 +95,6 @@
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import org.maven.ide.components.pom.Model;
-import org.maven.ide.components.pom.Parent;
-import org.maven.ide.components.pom.util.PomResourceImpl;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.core.IMavenConstants;
-import org.maven.ide.eclipse.embedder.MavenModelManager;
 
 /**
  * @author Snjeza
@@ -107,7 +103,7 @@
 @RunWith(SWTBotJunit4ClassRunner.class)
 public class CreateMavenizedSeamProjectTest {
 	
-	protected static final int IDLE_TIME = 60000;
+	protected static final long IDLE_TIME = 20 * 60 * 1000L;
 
 	private static final String CONNECTION_PROFILE_NAME = "DefaultDS";
 
@@ -181,10 +177,11 @@
 		
 		String runtimeType = JBOSS_AS_RUNTIME_ID;
 		String serverType = JBOSS_AS_SERVER_ID;
-		
+		System.out.println("Creating a server from "+asLocation);
 		createJBossServer(new File(asLocation), serverType, runtimeType, JBOSS_AS_SERVER_NAME, JBOSS_AS_RUNTIME_NAME);
 		
 		String seamPath = SEAM_HOME_PROPERTY;
+		System.out.println("Using seam from "+seamPath);
 		createSeamRuntime(SEAM_RUNTIME_NAME, seamPath, SeamVersion.SEAM_2_2);
 		
 		createDriver(asLocation, HSQLDB_DRIVER_LOCATION);
@@ -201,7 +198,7 @@
 		SWTBotPreferences.KEYBOARD_LAYOUT = "EN_US";
 		SWTBotPreferences.TIMEOUT = 1000;
 		SWTBotPreferences.PLAYBACK_DELAY = 5;
-		JobUtils.waitForIdle(60000);
+		waitForIdle();
 		try {
 			SWTBotView view = bot.viewByTitle("Welcome");
 			if (view != null) {
@@ -259,10 +256,10 @@
 		wc.modifyModules(new IModule[] {} , modules, monitor);
 		wc.save(true, monitor);
 		server.publish(IServer.PUBLISH_INCREMENTAL, monitor);
-		JobUtils.waitForIdle(IDLE_TIME);
+		waitForIdle();
 		server.getRuntime().delete();
 		server.delete();
-		JobUtils.waitForIdle(IDLE_TIME);
+		waitForIdle();
 	}
 
 	protected static void switchPerspective(final String pid) {
@@ -310,7 +307,7 @@
 			ResourcesUtils.setBuildAutomatically(buildAutomatically);
 			ValidationFramework.getDefault().suspendAllValidation(false);
 		}
-		JobUtils.waitForIdle(IDLE_TIME);
+		waitForIdle();
 	}
 	
 	protected static void createJBossServer(File asLocation, String serverType, String runtimeType, String name, String runtimeName) throws CoreException {
@@ -457,7 +454,7 @@
 	}
 	
 	public static void createNewSeamWebProjectWizard(String projectName, String deployType) throws Exception {
-		JobUtils.waitForIdle(60000);
+		waitForIdle();
 		bot.menu("File").menu("New").menu("Seam Web Project").click();
 		 
 		SWTBotShell mainShell = bot.shell("New Seam Project");
@@ -488,16 +485,47 @@
 		bot.button("Next >").click();
 		
 		bot.comboBox(0).setSelection(SEAM_RUNTIME_NAME);
-		bot.radio(deployType).click();
+		String otherType = DEPLOY_TYPE_EAR;
+		if (DEPLOY_TYPE_EAR.equals(deployType)) {
+			otherType = DEPLOY_TYPE_WAR;
+		}
+		final SWTBotRadio radio = bot.radio(deployType);
+		final SWTBotRadio otherRadio = bot.radio(otherType);
+		radio.click();
+		Display.getDefault().syncExec(new Runnable() {
+
+			public void run() {
+				radio.widget.setSelection(true);
+				otherRadio.widget.setSelection(false);
+				Event event = new Event();
+				event.time = (int) System.currentTimeMillis();
+				event.widget = radio.widget;
+				event.display = Display.getCurrent();
+				radio.widget.notifyListeners(SWT.Selection, event);
+			}
+		});
+			
 		bot.comboBox(1).setSelection("HSQL");
 		bot.comboBox(2).setSelection(CONNECTION_PROFILE_NAME);
 		bot.button("Finish").click();
 		
-		JobUtils.waitForIdle(60000);
+		waitForIdle();
 		
 	}
 	
 	@Test
+	public void testAsLocation() {
+		String asLocation = JBOSS_AS_HOME;
+		assertTrue("Invalid JBoss AS location:" + asLocation, new File(asLocation).isDirectory());
+	}
+	
+	@Test
+	public void testSeamLocation() {
+		String seamLocation = SEAM_HOME_PROPERTY;
+		assertTrue("Invalid Seam Runtime location:" + seamLocation, new File(seamLocation).isDirectory());
+	}
+	
+	@Test
 	public void testErrors() throws Exception {
 		checkErrors(PROJECT_NAME);
 		checkErrors(EAR_PROJECT_NAME);
@@ -518,7 +546,9 @@
 		for (int i = 0; i < projectMarkers.length; i++) {
 			if (projectMarkers[i].getAttribute(IMarker.SEVERITY,
 					IMarker.SEVERITY_ERROR) == IMarker.SEVERITY_ERROR) {
-				markers.add(projectMarkers[i]);
+				if (!"org.eclipse.m2e.core.maven2Problem.lifecycleMapping".equals(projectMarkers[i].getType())) {
+						markers.add(projectMarkers[i]);
+				}
 			}
 		}
 		assertTrue("The '" + projectName + "' contains errors.", markers.size() == 0);
@@ -552,7 +582,7 @@
 		warProjectItem.select();
 		
 		SWTBotMenu runAs = tree.contextMenu("Run As");
-		runAs.menu("6 Maven build...").click();
+		runAs.menu("5 Maven build...").click();
 
 		SWTBotShell shell = bot.shell("Edit Configuration");
 		shell.activate();
@@ -560,7 +590,7 @@
 		bot.textWithLabel("Goals:").setText("clean package");
 		bot.button("Run").click();
 		
-		JobUtils.waitForIdle(IDLE_TIME);
+		waitForIdle();
 		
 		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(PROJECT_NAME_WAR);
 		project.refreshLocal(IResource.DEPTH_INFINITE, new NullProgressMonitor());
@@ -571,6 +601,46 @@
 		
 	}
 	
+	private static void waitForIdle() {
+		long start = System.currentTimeMillis();
+		int delay = 50;
+		while (!Job.getJobManager().isIdle()) {
+			delay(delay);
+			if ((System.currentTimeMillis() - start) > IDLE_TIME) {
+				Job[] jobs = Job.getJobManager().find(null);
+				StringBuffer str = new StringBuffer();
+				for (Job job : jobs) {
+					if (job.getThread() != null) {
+						str.append("\n").append(job.getName()).append(" (")
+								.append(job.getClass()).append(")");
+					}
+				}
+				throw new RuntimeException(
+						"Long running tasks detected:" + str.toString()); //$NON-NLS-1$
+			}
+		}
+	}
+
+	public static void delay(long waitTimeMillis) {
+		Display display = Display.getCurrent();
+		if (display != null) {
+			long endTimeMillis = System.currentTimeMillis() + waitTimeMillis;
+			while (System.currentTimeMillis() < endTimeMillis) {
+				if (!display.readAndDispatch())
+					display.sleep();
+			}
+			display.update();
+		}
+		// Otherwise, perform a simple sleep.
+		else {
+			try {
+				Thread.sleep(waitTimeMillis);
+			} catch (InterruptedException e) {
+				// Ignored.
+			}
+		}
+	}
+	
 	// see https://jira.jboss.org/browse/JBIDE-6767
 	@Test
 	public void testLibraries() throws Exception {
Index: tests/org.jboss.tools.maven.ui.bot.test/pom.xml
===================================================================
--- tests/org.jboss.tools.maven.ui.bot.test/pom.xml	(revision 32612)
+++ tests/org.jboss.tools.maven.ui.bot.test/pom.xml	(working copy)
@@ -1,15 +1,17 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>tests</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.tests</groupId>
-	<artifactId>org.jboss.tools.maven.ui.bot.test</artifactId> 
+	<artifactId>org.jboss.tools.maven.ui.bot.test</artifactId>
 	<version>1.0.0-SNAPSHOT</version>
 	<packaging>eclipse-test-plugin</packaging>
+
 	<properties>
 		<systemProperties>-Djbosstools.test.jboss.home.5.1=${requirement.build.root}/jboss-5.1.0.GA -Djbosstools.test.seam.2.0.1.GA.home=${requirement.build.root}/jboss-seam-2.2.0.GA</systemProperties>
 	</properties>
@@ -23,9 +25,9 @@
 					<useUIThread>false</useUIThread>
 					<useUIHarness>true</useUIHarness>
 					<testSuite>org.jboss.tools.maven.ui.bot.test</testSuite>
-                    <testClass>org.jboss.tools.maven.ui.bot.test.MavenAllBotTests</testClass> 
+					<testClass>org.jboss.tools.maven.ui.bot.test.MavenAllBotTests</testClass>
 				</configuration>
 			</plugin>
 		</plugins>
 	</build>
-</project>
+</project>
\ No newline at end of file
Index: site/pom.xml
===================================================================
--- site/pom.xml	(revision 32612)
+++ site/pom.xml	(working copy)
@@ -1,14 +1,15 @@
-<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-		
 		<groupId>org.jboss.tools</groupId>
-		<artifactId>org.jboss.tools.parent.pom</artifactId>
+		<artifactId>maven</artifactId>
 		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven</groupId>
-	<artifactId>maven.site</artifactId> 
+	<artifactId>maven.site</artifactId>
 	<name>maven.site</name>
 	<version>0.0.1-SNAPSHOT</version>
 	<packaging>eclipse-update-site</packaging>
-</project>
+</project>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java
===================================================================
--- plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java	(working copy)
@@ -1,10 +1,25 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.seam;
 
-import org.maven.ide.components.pom.Model;
-import org.maven.ide.components.pom.Parent;
-import org.maven.ide.components.pom.PomFactory;
-import org.maven.ide.eclipse.embedder.ProjectUpdater;
+import org.eclipse.m2e.model.edit.pom.Model;
+import org.eclipse.m2e.model.edit.pom.Parent;
+import org.eclipse.m2e.model.edit.pom.PomFactory;
+import org.jboss.tools.maven.core.xpl.ProjectUpdater;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class ParentAdder extends ProjectUpdater {
 
 	private static final PomFactory POM_FACTORY = PomFactory.eINSTANCE;
Index: plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
===================================================================
--- plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.seam;
 
 import java.io.File;
@@ -5,11 +15,12 @@
 import java.io.InputStream;
 import java.net.URL;
 import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Collections;
+import java.util.Iterator;
 import java.util.List;
-import java.util.Map;
 import java.util.Properties;
 
+import org.apache.maven.artifact.Artifact;
 import org.apache.maven.model.Build;
 import org.apache.maven.model.Dependency;
 import org.apache.maven.model.Exclusion;
@@ -26,14 +37,24 @@
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IStatus;
 import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.xmi.XMIResource;
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jdt.core.JavaModelException;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.internal.IMavenConstants;
+import org.eclipse.m2e.core.internal.MavenPluginActivator;
+import org.eclipse.m2e.core.internal.project.ResolverConfigurationIO;
+import org.eclipse.m2e.core.internal.project.registry.MavenProjectManager;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
+import org.eclipse.m2e.model.edit.pom.Configuration;
+import org.eclipse.m2e.model.edit.pom.Plugin;
+import org.eclipse.m2e.model.edit.pom.PluginExecution;
+import org.eclipse.m2e.model.edit.pom.PomFactory;
+import org.eclipse.m2e.model.edit.pom.util.PomResourceImpl;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
 import org.eclipse.wst.common.componentcore.ComponentCore;
@@ -46,26 +67,15 @@
 import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
 import org.jboss.tools.maven.core.IJBossMavenConstants;
 import org.jboss.tools.maven.core.MavenCoreActivator;
+import org.jboss.tools.maven.core.xpl.ProjectUpdater;
 import org.jboss.tools.seam.core.SeamUtil;
 import org.jboss.tools.seam.core.project.facet.SeamRuntime;
 import org.jboss.tools.seam.core.project.facet.SeamRuntimeManager;
 import org.jboss.tools.seam.core.project.facet.SeamVersion;
 import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
 import org.jboss.tools.seam.internal.core.project.facet.SeamFacetAbstractInstallDelegate;
-import org.maven.ide.components.pom.Configuration;
-import org.maven.ide.components.pom.Plugin;
-import org.maven.ide.components.pom.PluginExecution;
-import org.maven.ide.components.pom.PomFactory;
-import org.maven.ide.components.pom.util.PomResourceImpl;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.core.IMavenConstants;
-import org.maven.ide.eclipse.embedder.MavenModelManager;
-import org.maven.ide.eclipse.embedder.ProjectUpdater;
-import org.maven.ide.eclipse.project.MavenProjectManager;
-import org.maven.ide.eclipse.project.ResolverConfiguration;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.BundleContext;
-import org.osgi.framework.Version;
 import org.w3c.dom.Node;
 
 /**
@@ -188,7 +198,7 @@
 			parent.setRelativePath("../" + parentProjectName); //$NON-NLS-1$
 			model.setParent(parent);
 			
-			List dependencies = model.getDependencies();
+			List<Dependency> dependencies = model.getDependencies();
 			
 			Dependency dependency = new Dependency();
 			dependency.setGroupId("org.jboss.seam.embedded"); //$NON-NLS-1$
@@ -285,9 +295,6 @@
 				//build.setFinalName(testProjectName);
 				String sourceDirectory = MavenCoreActivator.getSourceDirectory(javaProject);
 				if (sourceDirectory != null) {
-					if (isM2eclipse010()) {
-						build.setSourceDirectory(sourceDirectory);
-					}
 					build.setTestSourceDirectory(sourceDirectory);
 				}		
 				String outputDirectory = MavenCoreActivator.getOutputDirectory(javaProject);	
@@ -324,17 +331,6 @@
 		
 	}
 
-	/**
-	 * @return
-	 */
-	private boolean isM2eclipse010() {
-		Bundle bundle = Platform.getBundle("org.maven.ide.eclipse"); //$NON-NLS-1$
-		if (bundle != null && bundle.getVersion().toString().startsWith("0.10")) { //$NON-NLS-1$
-			return true;
-		}
-		return false;
-	}
-
 	private void configureEarProject(IDataModel m2FacetModel,
 			IDataModel seamFacetModel) {
 		IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(earProjectName);
@@ -360,7 +356,7 @@
 			parent.setRelativePath("../" + parentProjectName); //$NON-NLS-1$
 			model.setParent(parent);
 			
-			List dependencies = model.getDependencies();
+			List<Dependency> dependencies = model.getDependencies();
 			
 			Dependency dependency = new Dependency();
 			dependency.setGroupId(m2FacetModel.getStringProperty(IJBossMavenConstants.GROUP_ID));
@@ -382,7 +378,7 @@
 			dependency.setVersion("${seam.version}"); //$NON-NLS-1$
 			dependency.setType("ejb"); //$NON-NLS-1$
 			dependency.setScope("compile"); //$NON-NLS-1$
-			List exclusions = dependency.getExclusions();
+			List<Exclusion> exclusions = dependency.getExclusions();
 			Exclusion exclusion = new Exclusion();
 			exclusion.setGroupId("javassist"); //$NON-NLS-1$
 			exclusion.setArtifactId("javassist"); //$NON-NLS-1$
@@ -567,12 +563,33 @@
 		
 	}
 
+	public void updateProject(IFile pomFile, ProjectUpdater updater) {
+		File pom = pomFile.getLocation().toFile();
+		PomResourceImpl resource = null;
+		try {
+			resource = MavenCoreActivator.loadResource(pomFile);
+			updater.update(resource.getModel());
+			resource.save(Collections.EMPTY_MAP);
+		} catch (Exception ex) {
+			String msg = "Unable to update " + pom;
+			log(ex, msg);
+		} finally {
+			if (resource != null) {
+				resource.unload();
+			}
+		}
+	}
+	
+	public void addDependency(IFile pomFile,
+			org.apache.maven.model.Dependency dependency) {
+		updateProject(pomFile, new DependencyAdder(dependency));
+	}
+	
 	private void configureWarProject(IDataModel m2FacetModel,IDataModel seamFacetModel) {
 		try {
 			IProject webProject = ResourcesPlugin.getWorkspace().getRoot().getProject(webProjectName);
 			
 			IFile pomFile = webProject.getFile(IMavenConstants.POM_FILE_NAME);
-			MavenModelManager modelManager = MavenPlugin.getDefault().getMavenModelManager();
 			
 			String artifactId = parentProjectName;
 			String groupId = m2FacetModel.getStringProperty(IJBossMavenConstants.GROUP_ID);
@@ -580,26 +597,26 @@
 			
 			String relativePath = "../" + parentProjectName; //$NON-NLS-1$
 			ParentAdder parentAdder = new ParentAdder(groupId, artifactId, version, relativePath);
-			modelManager.updateProject(pomFile, parentAdder);
+			updateProject(pomFile, parentAdder);
 			
 			Dependency dependency = getHibernateValidator();
 			//dependency.setScope("provided");
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = getHibernateAnnotations();
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.hibernate"); //$NON-NLS-1$
 			dependency.setArtifactId("hibernate-entitymanager"); //$NON-NLS-1$
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = getSeamDependency();
 			if (!SeamFacetAbstractInstallDelegate
 					.isWarConfiguration(seamFacetModel)) {
 				dependency.setScope("provided"); //$NON-NLS-1$
 			}
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.jboss.seam"); //$NON-NLS-1$
@@ -609,7 +626,7 @@
 			exclusion.setGroupId("org.jboss.seam"); //$NON-NLS-1$
 			exclusion.setArtifactId("jboss-seam"); //$NON-NLS-1$
 			exclusions.add(exclusion);
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.jboss.seam"); //$NON-NLS-1$
@@ -619,7 +636,7 @@
 			exclusion.setGroupId("org.jboss.seam"); //$NON-NLS-1$
 			exclusion.setArtifactId("jboss-seam"); //$NON-NLS-1$
 			exclusions.add(exclusion);
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.jboss.seam"); //$NON-NLS-1$
@@ -627,68 +644,68 @@
 			// FIXME
 			dependency.setVersion("${seam.version}"); //$NON-NLS-1$
 			
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.jboss.seam"); //$NON-NLS-1$
 			dependency.setArtifactId("jboss-seam-mail"); //$NON-NLS-1$
 			
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.jboss.seam"); //$NON-NLS-1$
 			dependency.setArtifactId("jboss-seam-pdf"); //$NON-NLS-1$
 			
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.jboss.seam"); //$NON-NLS-1$
 			dependency.setArtifactId("jboss-seam-remoting"); //$NON-NLS-1$
 			
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			if (FacetedProjectFramework.hasProjectFacet(webProject, ISeamFacetDataModelProperties.SEAM_FACET_ID, ISeamFacetDataModelProperties.SEAM_FACET_VERSION_21)) {
 				dependency = new Dependency();
 				dependency.setGroupId("org.jboss.seam"); //$NON-NLS-1$
 				dependency.setArtifactId("jboss-seam-excel"); //$NON-NLS-1$
 				
-				modelManager.addDependency(pomFile,dependency);
+				addDependency(pomFile,dependency);
 			}
 			
 			dependency = new Dependency();
 			dependency.setGroupId("javax.servlet"); //$NON-NLS-1$
 			dependency.setArtifactId("servlet-api"); //$NON-NLS-1$
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.richfaces.ui"); //$NON-NLS-1$
 			dependency.setArtifactId("richfaces-ui"); //$NON-NLS-1$
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = getRichFacesApi();
 			if (!SeamFacetAbstractInstallDelegate
 					.isWarConfiguration(seamFacetModel)) {
 				dependency.setScope("provided"); //$NON-NLS-1$
 			}
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("org.richfaces.framework"); //$NON-NLS-1$
 			dependency.setArtifactId("richfaces-impl"); //$NON-NLS-1$
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = getJSFApi();
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("javax.faces"); //$NON-NLS-1$
 			dependency.setArtifactId("jsf-impl"); //$NON-NLS-1$
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			dependency = new Dependency();
 			dependency.setGroupId("javax.el"); //$NON-NLS-1$
 			dependency.setArtifactId("el-api"); //$NON-NLS-1$
-			modelManager.addDependency(pomFile,dependency);
+			addDependency(pomFile,dependency);
 			
 			if (SeamFacetAbstractInstallDelegate
 					.isWarConfiguration(seamFacetModel)) {
@@ -697,20 +714,20 @@
 				dependency.setArtifactId("drools-compiler"); //$NON-NLS-1$
 				dependency.setType("jar"); //$NON-NLS-1$
 				dependency.setScope("compile"); //$NON-NLS-1$
-				modelManager.addDependency(pomFile,dependency);
+				addDependency(pomFile,dependency);
 				
 				dependency = new Dependency();
 				dependency.setGroupId("org.jbpm"); //$NON-NLS-1$
 				dependency.setArtifactId("jbpm-jpdl"); //$NON-NLS-1$
 				dependency.setType("jar"); //$NON-NLS-1$
 				dependency.setScope("compile"); //$NON-NLS-1$
-				modelManager.addDependency(pomFile,dependency);
+				addDependency(pomFile,dependency);
 				
 				dependency = new Dependency();
 				dependency.setGroupId("commons-digester"); //$NON-NLS-1$
 				dependency.setArtifactId("commons-digester"); //$NON-NLS-1$
-				modelManager.addDependency(pomFile,dependency);
-				modelManager.updateProject(pomFile, new WarProjectUpdater(webProject));
+				addDependency(pomFile,dependency);
+				updateProject(pomFile, new WarProjectUpdater(webProject));
 			}
 			
 			// ejb project
@@ -723,10 +740,10 @@
 				dependency.setVersion(m2FacetModel.getStringProperty(IJBossMavenConstants.VERSION));
 				dependency.setType("ejb"); //$NON-NLS-1$
 				dependency.setScope("provided"); //$NON-NLS-1$
-				modelManager.addDependency(pomFile,dependency);
+				addDependency(pomFile,dependency);
 			}
 			
-			modelManager.updateProject(pomFile, new WarProjectUpdater(webProject));
+			updateProject(pomFile, new WarProjectUpdater(webProject));
 			removeWTPContainers(m2FacetModel, webProject);
 		} catch (Exception e) {
 			MavenSeamActivator.log(e);
@@ -743,7 +760,7 @@
 		return webContentRoot;
 	}
 
-	private static Plugin getPlugin(org.maven.ide.components.pom.Build build,
+	private static Plugin getPlugin(org.eclipse.m2e.model.edit.pom.Build build,
 			String groupId, String artifactId) {
 		EList<Plugin> plugins = build.getPlugins();
 		for (Plugin plugin : plugins) {
@@ -946,11 +963,11 @@
 			location = location.append(parentProjectName);
 			MavenCoreActivator.createMavenProject(parentProjectName, null, model, false, location);
 			// disable workspace resolution
-			MavenProjectManager projectManager = MavenPlugin.getDefault().getMavenProjectManager();
+			MavenProjectManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManager();
 		    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(parentProjectName);
-		    ResolverConfiguration configuration = projectManager.getResolverConfiguration(project);
+		    ResolverConfiguration configuration = ResolverConfigurationIO.readResolverConfiguration(project);
 		    configuration.setResolveWorkspaceProjects(false);
-		    projectManager.setResolverConfiguration(project, configuration);
+		    ResolverConfigurationIO.saveResolverConfiguration(project, configuration);
 		} catch (Exception e) {
 			log(e);
 		} finally {
@@ -982,6 +999,11 @@
 		getDefault().getLog().log(status);
 	}
 	
+	public static void log(Throwable e, String message) {
+		IStatus status = new Status(IStatus.ERROR, PLUGIN_ID, message, e);
+		getDefault().getLog().log(status);
+	}
+	
 	public static void log(String message) {
 		IStatus status = new Status(IStatus.WARNING, PLUGIN_ID, message, null);
 		getDefault().getLog().log(status);
@@ -997,10 +1019,9 @@
 			webProject = project;
 		}
 
-		public void update(org.maven.ide.components.pom.Model projectModel) {
-			org.maven.ide.components.pom.Build build = projectModel.getBuild();
+		public void update(org.eclipse.m2e.model.edit.pom.Model projectModel) {
+			org.eclipse.m2e.model.edit.pom.Build build = projectModel.getBuild();
 			if (build == null) {
-				// FIXME
 				return;
 			}
 			IJavaProject javaProject = JavaCore.create(webProject);
@@ -1065,10 +1086,10 @@
 				build.setOutputDirectory(value);
 			}
 			
-			EList<org.maven.ide.components.pom.Resource> resources = build.getResources();
+			EList<org.eclipse.m2e.model.edit.pom.Resource> resources = build.getResources();
 			resources.clear();
 			for (IPath source:sources) {
-				org.maven.ide.components.pom.Resource resource = PomFactory.eINSTANCE.createResource();
+				org.eclipse.m2e.model.edit.pom.Resource resource = PomFactory.eINSTANCE.createResource();
 				String value = source.makeRelativeTo(javaProject.getPath()).toString();
 				if (value.startsWith(MavenCoreActivator.SEPARATOR)) {
 					value = MavenCoreActivator.BASEDIR + value;
@@ -1151,4 +1172,171 @@
 			}
 		}
 	}
+	
+	
+	public static class DependencyAdder extends ProjectUpdater {
+
+		private final org.apache.maven.model.Dependency dependency;
+
+		public DependencyAdder(org.apache.maven.model.Dependency dependency) {
+			this.dependency = dependency;
+		}
+
+		public void update(org.eclipse.m2e.model.edit.pom.Model model) {
+			org.eclipse.m2e.model.edit.pom.Dependency dependency = PomFactory.eINSTANCE
+					.createDependency();
+
+			dependency.setGroupId(this.dependency.getGroupId());
+			dependency.setArtifactId(this.dependency.getArtifactId());
+
+			if (this.dependency.getVersion() != null) {
+				dependency.setVersion(this.dependency.getVersion());
+			}
+
+			if (this.dependency.getClassifier() != null) {
+				dependency.setClassifier(this.dependency.getClassifier());
+			}
+
+			if (this.dependency.getType() != null //
+					&& !"jar".equals(this.dependency.getType()) //
+					&& !"null".equals(this.dependency.getType())) { // guard
+																	// against
+																	// MNGECLIPSE-622
+				dependency.setType(this.dependency.getType());
+			}
+
+			if (this.dependency.getScope() != null
+					&& !"compile".equals(this.dependency.getScope())) {
+				dependency.setScope(this.dependency.getScope());
+			}
+
+			if (this.dependency.getSystemPath() != null) {
+				dependency.setSystemPath(this.dependency.getSystemPath());
+			}
+
+			if (this.dependency.isOptional()) {
+				dependency.setOptional("true");
+			}
+
+			if (!this.dependency.getExclusions().isEmpty()) {
+
+				Iterator<org.apache.maven.model.Exclusion> it = this.dependency
+						.getExclusions().iterator();
+				while (it.hasNext()) {
+					Exclusion e = it.next();
+					org.eclipse.m2e.model.edit.pom.Exclusion exclusion = PomFactory.eINSTANCE
+							.createExclusion();
+					exclusion.setGroupId(e.getGroupId());
+					exclusion.setArtifactId(e.getArtifactId());
+					dependency.getExclusions().add(exclusion);
+				}
+			}
+
+			// search for dependency with same GAC and remove if found
+			Iterator<org.eclipse.m2e.model.edit.pom.Dependency> it = model
+					.getDependencies().iterator();
+			boolean mergeScope = false;
+			String oldScope = Artifact.SCOPE_COMPILE;
+			while (it.hasNext()) {
+				org.eclipse.m2e.model.edit.pom.Dependency dep = it.next();
+				if (dep.getGroupId().equals(dependency.getGroupId())
+						&& dep.getArtifactId().equals(
+								dependency.getArtifactId())
+						&& compareNulls(dep.getClassifier(),
+								dependency.getClassifier())) {
+					oldScope = dep.getScope();
+					it.remove();
+					mergeScope = true;
+				}
+			}
+
+			if (mergeScope) {
+				// merge scopes
+				if (oldScope == null) {
+					oldScope = Artifact.SCOPE_COMPILE;
+				}
+
+				String newScope = this.dependency.getScope();
+				if (newScope == null) {
+					newScope = Artifact.SCOPE_COMPILE;
+				}
+
+				if (!oldScope.equals(newScope)) {
+					boolean systemScope = false;
+					boolean providedScope = false;
+					boolean compileScope = false;
+					boolean runtimeScope = false;
+					boolean testScope = false;
+
+					// test old scope
+					if (Artifact.SCOPE_COMPILE.equals(oldScope)) {
+						systemScope = true;
+						providedScope = true;
+						compileScope = true;
+						runtimeScope = false;
+						testScope = false;
+					} else if (Artifact.SCOPE_RUNTIME.equals(oldScope)) {
+						systemScope = false;
+						providedScope = false;
+						compileScope = true;
+						runtimeScope = true;
+						testScope = false;
+					} else if (Artifact.SCOPE_TEST.equals(oldScope)) {
+						systemScope = true;
+						providedScope = true;
+						compileScope = true;
+						runtimeScope = true;
+						testScope = true;
+					}
+
+					// merge with new one
+					if (Artifact.SCOPE_COMPILE.equals(newScope)) {
+						systemScope = systemScope || true;
+						providedScope = providedScope || true;
+						compileScope = compileScope || true;
+						runtimeScope = runtimeScope || false;
+						testScope = testScope || false;
+					} else if (Artifact.SCOPE_RUNTIME.equals(newScope)) {
+						systemScope = systemScope || false;
+						providedScope = providedScope || false;
+						compileScope = compileScope || true;
+						runtimeScope = runtimeScope || true;
+						testScope = testScope || false;
+					} else if (Artifact.SCOPE_TEST.equals(newScope)) {
+						systemScope = systemScope || true;
+						providedScope = providedScope || true;
+						compileScope = compileScope || true;
+						runtimeScope = runtimeScope || true;
+						testScope = testScope || true;
+					}
+
+					if (testScope) {
+						newScope = Artifact.SCOPE_TEST;
+					} else if (runtimeScope) {
+						newScope = Artifact.SCOPE_RUNTIME;
+					} else if (compileScope) {
+						newScope = Artifact.SCOPE_COMPILE;
+					} else {
+						// unchanged
+					}
+
+					dependency.setScope(newScope);
+				}
+			}
+
+			model.getDependencies().add(dependency);
+		}
+
+		@SuppressWarnings("null")
+		private boolean compareNulls(String s1, String s2) {
+			if (s1 == null && s2 == null) {
+				return true;
+			}
+			if ((s1 == null && s2 != null) || (s2 == null && s1 != null)) {
+				return false;
+			}
+			return s1.equals(s2);
+		}
+	}
+
 }
Index: plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/FixClasspathConfigurator.java
===================================================================
--- plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/FixClasspathConfigurator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/FixClasspathConfigurator.java	(working copy)
@@ -26,16 +26,16 @@
 import org.eclipse.jdt.core.IClasspathEntry;
 import org.eclipse.jdt.core.IJavaProject;
 import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
 import org.jboss.tools.maven.seam.MavenSeamActivator;
-import org.maven.ide.eclipse.project.IMavenProjectFacade;
-import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
-import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
-import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
 
 /**
  * A workaround for https://issues.sonatype.org/browse/MNGECLIPSE-2433
  * 
- * @author Snjeza
+ * @author snjeza
  */
 public class FixClasspathConfigurator extends AbstractProjectConfigurator {
 
Index: plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
===================================================================
--- plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.seam.configurators;
 
 import java.io.File;
@@ -7,7 +17,6 @@
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.model.Dependency;
 import org.apache.maven.project.MavenProject;
 import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.core.resources.IFile;
@@ -36,6 +45,13 @@
 import org.eclipse.jst.j2ee.internal.common.classpath.J2EEComponentClasspathUpdater;
 import org.eclipse.jst.j2ee.internal.project.J2EEProjectUtilities;
 import org.eclipse.jst.j2ee.project.JavaEEProjectUtilities;
+import org.eclipse.m2e.core.internal.IMavenConstants;
+import org.eclipse.m2e.core.internal.MavenPluginActivator;
+import org.eclipse.m2e.core.internal.project.registry.MavenProjectManager;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
 import org.eclipse.wst.common.componentcore.ComponentCore;
 import org.eclipse.wst.common.componentcore.ModuleCoreNature;
 import org.eclipse.wst.common.componentcore.datamodel.properties.ICreateReferenceComponentsDataModelProperties;
@@ -65,15 +81,13 @@
 import org.jboss.tools.seam.internal.core.project.facet.ISeamFacetDataModelProperties;
 import org.jboss.tools.seam.internal.core.project.facet.SeamFacetInstallDataModelProvider;
 import org.jboss.tools.seam.ui.wizard.SeamWizardUtils;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.core.IMavenConstants;
-import org.maven.ide.eclipse.project.IMavenProjectFacade;
-import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
-import org.maven.ide.eclipse.project.MavenProjectManager;
-import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
-import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
 import org.osgi.service.prefs.BackingStoreException;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class SeamProjectConfigurator extends AbstractProjectConfigurator {
 
 	private static final String JBOSS_SEAM_ARTIFACT_PREFIX = "jboss-seam"; //$NON-NLS-1$
@@ -399,7 +413,7 @@
 					if (refProject.hasNature(IMavenConstants.NATURE_ID)) {
 						IFile pom = refProject.getFile(IMavenConstants.POM_FILE_NAME);
 						if (pom.exists()) {
-							MavenProjectManager projectManager = MavenPlugin.getDefault().getMavenProjectManager();
+							MavenProjectManager projectManager = MavenPluginActivator.getDefault().getMavenProjectManager();
 						     IMavenProjectFacade facade = projectManager.create(pom, true, null);
 						      if(facade!=null) {
 						        MavenProject mavenProject = facade.getMavenProject(null);
@@ -433,7 +447,7 @@
 						IFile pom = refProject
 								.getFile(IMavenConstants.POM_FILE_NAME);
 						if (pom.exists()) {
-							MavenProjectManager projectManager = MavenPlugin
+							MavenProjectManager projectManager = MavenPluginActivator
 									.getDefault().getMavenProjectManager();
 							IMavenProjectFacade facade = projectManager.create(
 									pom, true, null);
Index: plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/SeamLifecycleMapping.java
===================================================================
--- plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/SeamLifecycleMapping.java	(revision 0)
+++ plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/SeamLifecycleMapping.java	(revision 0)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.maven.seam;
+
+import org.eclipse.m2e.core.project.configurator.AbstractCustomizableLifecycleMapping;
+
+/**
+ * @author snjeza
+ */
+public class SeamLifecycleMapping extends AbstractCustomizableLifecycleMapping {
+
+}
Index: plugins/org.jboss.tools.maven.seam/plugin.xml
===================================================================
--- plugins/org.jboss.tools.maven.seam/plugin.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.seam/plugin.xml	(working copy)
@@ -2,23 +2,38 @@
 <?eclipse version="3.4"?>
 <plugin>
 
+	<extension
+         point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
+    </extension>
+   
+    <extension
+         point="org.eclipse.m2e.core.lifecycleMappings">
+      <lifecycleMapping
+            class="org.jboss.tools.maven.seam.SeamLifecycleMapping"
+            id="org.jboss.tools.maven.seam.SeamLifecycleMapping"
+            name="Seam Lifecycle mapping">
+      </lifecycleMapping>
+    </extension>
+    
 	<extension point="org.eclipse.wst.common.project.facet.core.listeners">
   		<listener class="org.jboss.tools.maven.seam.internal.project.facet.MavenPostInstallListener" 
   		eventTypes="POST_INSTALL"/>
 	</extension>
 	
-	<extension point="org.maven.ide.eclipse.projectConfigurators">
+	<extension point="org.eclipse.m2e.core.projectConfigurators">
       <configurator 
           id="org.jboss.tools.maven.seam.configurator"
           class="org.jboss.tools.maven.seam.configurators.SeamProjectConfigurator"
-          name="%Seam_Project_configurator" priority="200"/>
+          name="%Seam_Project_configurator" 
+          secondaryTo="org.maven.ide.eclipse.configuration.wtp.configurator"/>
     </extension>
     
-    <extension point="org.maven.ide.eclipse.projectConfigurators">
+    <extension point="org.eclipse.m2e.core.projectConfigurators">
       <configurator 
           id="org.jboss.tools.maven.seam.configurator.fixClasspathConfigurator"
           class="org.jboss.tools.maven.seam.configurators.FixClasspathConfigurator"
-          name="%Fix_classpath" priority="300"/>
+          name="%Fix_classpath" 
+          secondaryTo="org.eclipse.m2e.jdt.javaConfigurator"/>
     </extension>
     
     
Index: plugins/org.jboss.tools.maven.seam/build.properties
===================================================================
--- plugins/org.jboss.tools.maven.seam/build.properties	(revision 32612)
+++ plugins/org.jboss.tools.maven.seam/build.properties	(working copy)
@@ -9,4 +9,5 @@
                about.properties,\
                jboss_about.png,\
                poms/,\
-               plugin.properties
+               plugin.properties,\
+               lifecycle-mapping-metadata.xml
Index: plugins/org.jboss.tools.maven.seam/pom.xml
===================================================================
--- plugins/org.jboss.tools.maven.seam/pom.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.seam/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.plugins</groupId>
-	<artifactId>org.jboss.tools.maven.seam</artifactId> 
-	<version>1.1.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.seam</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
-</project>
+</project>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.seam/lifecycle-mapping-metadata.xml
===================================================================
--- plugins/org.jboss.tools.maven.seam/lifecycle-mapping-metadata.xml	(revision 0)
+++ plugins/org.jboss.tools.maven.seam/lifecycle-mapping-metadata.xml	(revision 0)
@@ -0,0 +1,71 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+
+	<pluginExecutions>
+		<pluginExecution>
+			<pluginExecutionFilter>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<versionRange>[2.0,)</versionRange>
+				<goals>
+					<goal>compile</goal>
+					<goal>testCompile</goal>
+				</goals>
+			</pluginExecutionFilter>
+			<action>
+				<configurator>
+					<id>org.jboss.tools.maven.seam.configurator.fixClasspathConfigurator</id>
+				</configurator>
+			</action>
+		</pluginExecution>
+	
+		<pluginExecution>
+			<pluginExecutionFilter>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<versionRange>[1.0,)</versionRange>
+				<goals>
+					<goal>war</goal>
+				</goals>
+			</pluginExecutionFilter>
+			<action>
+				<configurator>
+					<id>org.jboss.tools.maven.seam.configurator</id>
+				</configurator>
+			</action>
+		</pluginExecution>
+	
+		<pluginExecution>
+			<pluginExecutionFilter>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-ejb-plugin</artifactId>
+				<versionRange>[1.0,)</versionRange>
+				<goals>
+					<goal>ejb</goal>
+				</goals>
+			</pluginExecutionFilter>
+			<action>
+				<configurator>
+					<id>org.jboss.tools.maven.seam.configurator</id>
+				</configurator>
+			</action>
+		</pluginExecution>
+	
+		<pluginExecution>
+			<pluginExecutionFilter>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-ear-plugin</artifactId>
+				<versionRange>[1.0,)</versionRange>
+				<goals>
+					<goal>ear</goal>
+				</goals>
+			</pluginExecutionFilter>
+			<action>
+				<configurator>
+					<id>org.jboss.tools.maven.seam.configurator</id>
+				</configurator>
+			</action>
+		</pluginExecution>
+	</pluginExecutions>
+
+</lifecycleMappingMetadata>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF	(revision 32612)
+++ plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF	(working copy)
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.jboss.tools.maven.seam;singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Localization: plugin
 Bundle-Activator: org.jboss.tools.maven.seam.MavenSeamActivator
 Require-Bundle: org.eclipse.ui,
@@ -13,7 +13,6 @@
  org.jboss.tools.seam.core,
  org.jboss.tools.seam.ui,
  org.jboss.tools.common.model,
- org.maven.ide.eclipse.maven_model_edit;bundle-version="0.10.0";visibility:=reexport,
  org.eclipse.jst.j2ee.core,
  org.eclipse.jst.j2ee,
  org.eclipse.wst.common.emfworkbench.integration,
Index: plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java
===================================================================
--- plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java	(working copy)
@@ -1,7 +1,22 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.ui;
 
 import org.eclipse.osgi.util.NLS;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.jboss.tools.maven.ui.messages"; //$NON-NLS-1$
 	public static String ConfiguratorPreferencePage_Configure_Webxml_JSF20;
Index: plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java
===================================================================
--- plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java	(working copy)
@@ -1,10 +1,15 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.ui.internal.project.facet;
 
-import java.util.Map;
-import java.util.SortedSet;
-
-import javax.swing.JButton;
-
 import org.apache.maven.model.Model;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
@@ -12,6 +17,9 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
 import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.internal.IMavenConstants;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.layout.GridData;
 import org.eclipse.swt.layout.GridLayout;
@@ -37,10 +45,12 @@
 import org.jboss.tools.maven.core.IJBossMavenConstants;
 import org.jboss.tools.maven.ui.Activator;
 import org.jboss.tools.maven.ui.Messages;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.core.IMavenConstants;
-import org.maven.ide.eclipse.embedder.MavenModelManager;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class MavenFacetInstallPage extends DataModelWizardPage implements
 IFacetWizardPage {
 
@@ -151,7 +161,7 @@
 				} else if ("2.1".equals(seamFacetVersion.getVersionString())) { //$NON-NLS-1$ 
 					seamVersion.setText("2.1.1.GA"); //$NON-NLS-1$
 				} else if ("2.2".equals(seamFacetVersion.getVersionString())) { //$NON-NLS-1$
-					seamVersion.setText("2.2.0.GA"); //$NON-NLS-1$
+					seamVersion.setText("2.2.1.Final"); //$NON-NLS-1$
 				}
 				Button removeWTPContainers = new Button(composite,SWT.CHECK);
 				removeWTPContainers.setText(Messages.MavenFacetInstallPage_Remove_WTP_Classpath_containers);
Index: plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/ExclusionEditingSupport.java
===================================================================
--- plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/ExclusionEditingSupport.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/ExclusionEditingSupport.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.ui.internal.libprov;
 
 import org.eclipse.jface.viewers.CellEditor;
@@ -5,9 +15,13 @@
 import org.eclipse.jface.viewers.EditingSupport;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.TextCellEditor;
-import org.jboss.tools.maven.ui.Messages;
-import org.maven.ide.components.pom.Exclusion;
+import org.eclipse.m2e.model.edit.pom.Exclusion;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class ExclusionEditingSupport extends EditingSupport {
 
 	private CellEditor editor;
Index: plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/MavenUserLibraryProviderInstallPanel.java
===================================================================
--- plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/MavenUserLibraryProviderInstallPanel.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/MavenUserLibraryProviderInstallPanel.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.ui.internal.libprov;
 
 import java.io.File;
@@ -26,6 +36,11 @@
 import org.eclipse.jface.viewers.Viewer;
 import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
 import org.eclipse.jst.common.project.facet.ui.libprov.LibraryProviderOperationPanel;
+import org.eclipse.m2e.model.edit.pom.Dependency;
+import org.eclipse.m2e.model.edit.pom.Exclusion;
+import org.eclipse.m2e.model.edit.pom.Model;
+import org.eclipse.m2e.model.edit.pom.PomFactory;
+import org.eclipse.m2e.model.edit.pom.util.PomResourceImpl;
 import org.eclipse.osgi.util.NLS;
 import org.eclipse.swt.SWT;
 import org.eclipse.swt.events.DisposeEvent;
@@ -43,12 +58,12 @@
 import org.jboss.tools.maven.core.MavenCoreActivator;
 import org.jboss.tools.maven.core.libprov.MavenLibraryProviderInstallOperationConfig;
 import org.jboss.tools.maven.ui.Messages;
-import org.maven.ide.components.pom.Dependency;
-import org.maven.ide.components.pom.Exclusion;
-import org.maven.ide.components.pom.Model;
-import org.maven.ide.components.pom.PomFactory;
-import org.maven.ide.components.pom.util.PomResourceImpl;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class MavenUserLibraryProviderInstallPanel extends
 		LibraryProviderOperationPanel {
 
Index: plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/DependencyEditingSupport.java
===================================================================
--- plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/DependencyEditingSupport.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/DependencyEditingSupport.java	(working copy)
@@ -1,14 +1,28 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.ui.internal.libprov;
 
-import org.jboss.tools.maven.ui.Messages;
-import org.maven.ide.components.pom.Dependency;
 import org.eclipse.jface.viewers.CellEditor;
 import org.eclipse.jface.viewers.ColumnViewer;
 import org.eclipse.jface.viewers.ComboBoxCellEditor;
 import org.eclipse.jface.viewers.EditingSupport;
 import org.eclipse.jface.viewers.TableViewer;
 import org.eclipse.jface.viewers.TextCellEditor;
+import org.eclipse.m2e.model.edit.pom.Dependency;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class DependencyEditingSupport extends EditingSupport {
 
 	private static String[] scopes = {"","provided", "compile", "test", "runtime", "system","import"}; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ //$NON-NLS-5$ //$NON-NLS-6$ //$NON-NLS-7$
Index: plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java
===================================================================
--- plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java	(working copy)
@@ -1,21 +1,34 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.ui;
 
+import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.model.Dependency;
+import org.apache.maven.execution.MavenExecutionRequest;
+import org.apache.maven.execution.MavenExecutionResult;
 import org.apache.maven.project.MavenProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.core.runtime.Status;
-import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
-import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderFramework;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.internal.embedder.MavenImpl;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
-import org.eclipse.wst.common.project.facet.core.IFacetedProject;
-import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -43,7 +56,7 @@
 	public static final String CONFIGURE_JSF = "configureJSF"; //$NON-NLS-1$
 	
 	public static final boolean CONFIGURE_JSF_VALUE = true;
-
+	
 	public static final String CONFIGURE_WEBXML_JSF20 = "configureWebxmlJSF20"; //$NON-NLS-1$
 	
 	public static final boolean CONFIGURE_WEBXML_JSF20_VALUE = false;
@@ -133,4 +146,70 @@
 	    return null;
 	}
 	
+	@SuppressWarnings("restriction")
+	public String getDependencyVersion(Artifact artifact, List<ArtifactRepository> remoteRepos, String gid, String aid) {
+	    IMavenProjectFacade facade = MavenPlugin.getMavenProjectRegistry().getMavenProject(
+	    		artifact.getGroupId(), artifact.getArtifactId(), artifact.getVersion());
+		//If the artifact is a workspace dependency, the mavenProject is already loaded
+	    if (facade != null) {
+			return getDependencyVersion(facade.getMavenProject(), gid, aid);
+		}
+		
+	    //look at the artifact pom file and if it exists, load the corresponding MavenProject
+		File pom = getPomFile(artifact);
+		String version = null;
+	    if (pom != null) {
+		    MavenProject mavenProject = null;
+	    	MavenImpl maven = (MavenImpl)MavenPlugin.getMaven();
+		    try {
+		    	//Create a custom execution request
+		    	IProgressMonitor monitor = new NullProgressMonitor();
+		    	MavenExecutionRequest request = maven.createExecutionRequest(monitor);
+		    	for (ArtifactRepository repo : remoteRepos) {
+		    		request.addRemoteRepository(repo);
+		    	}
+		    	request.setPom(pom);
+		    	request.getProjectBuildingRequest().setResolveDependencies(true);
+
+		    	//Load the MavenProject
+		    	MavenExecutionResult result = maven.readProject(request, monitor);
+		    	//log errors
+		    	if (result.hasExceptions()) {
+		    		for (Throwable e : result.getExceptions()) {
+		    			log(e);
+		    		}
+		    	} else {
+		    		mavenProject = result.getProject();
+		    		if (mavenProject != null) {
+		    			//finally look at the dependency version
+						version = getDependencyVersion(mavenProject , gid, aid);
+				    	//Detach the mavenProject from the maven session to avoid memory leaks
+						maven.detachFromSession(mavenProject);
+		    		}		    		
+		    	}
+			} catch (CoreException e) {
+				//Don't crash on failures to read the dependency version
+				log(e);
+			} 
+	    }
+    	return version; 	
+	}
+
+	private File getPomFile(Artifact artifact) {
+		File artifactFile = artifact.getFile();
+		if (artifactFile != null) {
+			String path = artifactFile.getAbsolutePath();
+			int lastIndexOfDot = path.lastIndexOf("."); //$NON-NLS-1$
+			if (lastIndexOfDot > 0) {
+				String pomPath = path.substring(0, lastIndexOfDot)+".pom"; //$NON-NLS-1$
+				File pomFile = new File(pomPath);
+				if (pomFile.exists() && pomFile.canRead()) {
+					return pomFile;
+				}
+			}
+			//TODO look inside the artifact jar if pom isn't available
+		}
+		return null;
+	}
+	
 }
Index: plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java
===================================================================
--- plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java	(working copy)
@@ -1,11 +1,25 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.ui.preferences;
 
-
 import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
 import org.eclipse.core.runtime.preferences.DefaultScope;
 import org.eclipse.core.runtime.preferences.IEclipsePreferences;
 import org.jboss.tools.maven.ui.Activator;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class ConfiguratorPreferencesInitializer extends
 		AbstractPreferenceInitializer {
 
Index: plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java
===================================================================
--- plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.ui.preferences;
 
 import org.eclipse.core.runtime.Platform;
@@ -17,6 +27,11 @@
 import org.jboss.tools.maven.ui.Messages;
 import org.osgi.framework.Bundle;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class ConfiguratorPreferencePage extends PreferencePage implements
 		IWorkbenchPreferencePage {
 
Index: plugins/org.jboss.tools.maven.ui/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.jboss.tools.maven.ui/META-INF/MANIFEST.MF	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/META-INF/MANIFEST.MF	(working copy)
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.jboss.tools.maven.ui; singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Localization: plugin
 Bundle-Activator: org.jboss.tools.maven.ui.Activator
 Require-Bundle: org.eclipse.ui,
Index: plugins/org.jboss.tools.maven.ui/pom.xml
===================================================================
--- plugins/org.jboss.tools.maven.ui/pom.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.ui/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.plugins</groupId>
-	<artifactId>org.jboss.tools.maven.ui</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.ui</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
-</project>
+</project>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java
===================================================================
--- plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java	(working copy)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
 package org.jboss.tools.maven.jsf;
 
 import org.eclipse.core.runtime.IStatus;
@@ -13,6 +23,11 @@
 import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
 import org.osgi.framework.BundleContext;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class MavenJSFActivator extends AbstractUIPlugin {
 
 	// The plug-in ID
Index: plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/JSFLifecycleMapping.java
===================================================================
--- plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/JSFLifecycleMapping.java	(revision 0)
+++ plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/JSFLifecycleMapping.java	(revision 0)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.maven.jsf;
+
+import org.eclipse.m2e.core.project.configurator.AbstractCustomizableLifecycleMapping;
+
+/**
+ * @author snjeza
+ */
+public class JSFLifecycleMapping extends AbstractCustomizableLifecycleMapping {
+
+}
Index: plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
===================================================================
--- plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java	(working copy)
@@ -1,21 +1,25 @@
-/*************************************************************************************
- * Copyright (c) 2008-2011 Red Hat, Inc. and others.
- * All rights reserved. This program and the accompanying materials 
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- * 
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
  * Contributors:
- *     JBoss by Red Hat - Initial implementation.
- ************************************************************************************/
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
 package org.jboss.tools.maven.jsf.configurators;
 
 import java.io.File;
 import java.io.IOException;
+import java.util.List;
 
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.model.Plugin;
 import org.apache.maven.project.MavenProject;
 import org.codehaus.plexus.util.xml.Xpp3Dom;
+import org.eclipse.core.resources.IContainer;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
@@ -23,6 +27,11 @@
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.Path;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
+import org.eclipse.wst.common.componentcore.ComponentCore;
 import org.eclipse.wst.common.componentcore.ModuleCoreNature;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -37,11 +46,6 @@
 import org.jboss.tools.maven.jsf.MavenJSFActivator;
 import org.jboss.tools.maven.jsf.Messages;
 import org.jboss.tools.maven.ui.Activator;
-import org.maven.ide.eclipse.project.IMavenProjectFacade;
-import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
-import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
-import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
-import org.maven.ide.eclipse.wtp.WTPProjectsUtil;
 
 /**
  * 
@@ -53,13 +57,13 @@
 	private static final String JSF_API_GROUP_ID = "javax.faces"; //$NON-NLS-1$
 	private static final String JSF_API2_GROUP_ID = "com.sun.faces"; //$NON-NLS-1$
 	private static final String JSF_API_ARTIFACT_ID = "jsf-api"; //$NON-NLS-1$
-
+	
 	private static final String WEB_XML = "WEB-INF/web.xml";
 	private static final String WAR_SOURCE_FOLDER = "/src/main/webapp";
 
 	protected static final IProjectFacet dynamicWebFacet;
 	protected static final IProjectFacetVersion dynamicWebVersion;
-
+	
 	protected static final IProjectFacet jsfFacet;
 	protected static final IProjectFacetVersion jsfVersion20;
 	protected static final IProjectFacetVersion jsfVersion12;
@@ -67,100 +71,113 @@
 	protected static final IProjectFacet m2Facet;
 	protected static final IProjectFacetVersion m2Version;
 
+	private static final String JSF_VERSION_2_0 = "2.0";
+	
 	static {
 		dynamicWebFacet = ProjectFacetsManager.getProjectFacet("jst.web"); //$NON-NLS-1$
-		dynamicWebVersion = dynamicWebFacet.getVersion("2.5"); //$NON-NLS-1$
+		dynamicWebVersion = dynamicWebFacet.getVersion("2.5");  //$NON-NLS-1$
 		jsfFacet = ProjectFacetsManager.getProjectFacet("jst.jsf"); //$NON-NLS-1$
-		jsfVersion20 = jsfFacet.getVersion("2.0"); //$NON-NLS-1$
+		jsfVersion20 = jsfFacet.getVersion(JSF_VERSION_2_0); 
 		jsfVersion12 = jsfFacet.getVersion("1.2"); //$NON-NLS-1$
 		jsfVersion11 = jsfFacet.getVersion("1.1"); //$NON-NLS-1$
 		m2Facet = ProjectFacetsManager.getProjectFacet("jboss.m2"); //$NON-NLS-1$
 		m2Version = m2Facet.getVersion("1.0"); //$NON-NLS-1$
 	}
-
+	
 	@Override
 	public void configure(ProjectConfigurationRequest request,
 			IProgressMonitor monitor) throws CoreException {
 		MavenProject mavenProject = request.getMavenProject();
 		IProject project = request.getProject();
-		configureInternal(mavenProject, project, monitor);
+		configureInternal(mavenProject,project, monitor);
 	}
-
-	private void configureInternal(MavenProject mavenProject, IProject project,
+	
+	private void configureInternal(MavenProject mavenProject,IProject project,
 			IProgressMonitor monitor) throws CoreException {
 		IPreferenceStore store = Activator.getDefault().getPreferenceStore();
 		boolean configureJSF = store.getBoolean(Activator.CONFIGURE_JSF);
 		if (!configureJSF) {
 			return;
 		}
-
-		String packaging = mavenProject.getPackaging();
-		String jsfVersion = getJSFVersion(mavenProject);
-		if (jsfVersion != null) {
-			final IFacetedProject fproj = ProjectFacetsManager.create(project);
-			if (fproj != null && "war".equals(packaging)) { //$NON-NLS-1$
-				installWarFacets(fproj, jsfVersion, mavenProject, monitor);
-			}
+		
+    	final IFacetedProject fproj = ProjectFacetsManager.create(project);
+		if (fproj != null && fproj.hasProjectFacet(jsfFacet) && fproj.hasProjectFacet(m2Facet)) {
+			//everything already installed. Since there's no support for version update -yet- we bail
+			return;
 		}
+		
+		String packaging = mavenProject.getPackaging();
+	    String jsfVersion = getJSFVersion(mavenProject);
+	    if (fproj != null && jsfVersion != null && "war".equals(packaging)) { //$NON-NLS-1$
+	      installWarFacets(fproj, jsfVersion, mavenProject, monitor);
+	    }
 	}
 
+
 	@Override
 	public void mavenProjectChanged(MavenProjectChangedEvent event,
 			IProgressMonitor monitor) throws CoreException {
 		IMavenProjectFacade facade = event.getMavenProject();
-		if (facade != null) {
-			IProject project = facade.getProject();
-			if (isWTPProject(project)) {
-				MavenProject mavenProject = facade.getMavenProject(monitor);
-				configureInternal(mavenProject, project, monitor);
-			}
-		}
+	    if(facade != null) {
+	      IProject project = facade.getProject();
+	      if(isWTPProject(project)) {
+	        MavenProject mavenProject = facade.getMavenProject(monitor);
+	        configureInternal(mavenProject, project, monitor);
+	      }
+	    }
 		super.mavenProjectChanged(event, monitor);
 	}
 
 	private boolean isWTPProject(IProject project) {
-		return ModuleCoreNature.getModuleCoreNature(project) != null;
-	}
-
-	private void installM2Facet(IFacetedProject fproj, IProgressMonitor monitor)
-			throws CoreException {
+	    return ModuleCoreNature.getModuleCoreNature(project) != null;
+	 }
+	
+	private void installM2Facet(IFacetedProject fproj, IProgressMonitor monitor) throws CoreException {
 		if (!fproj.hasProjectFacet(m2Facet)) {
-			IDataModel config = (IDataModel) new MavenFacetInstallDataModelProvider()
-					.create();
-			config.setBooleanProperty(
-					IJBossMavenConstants.MAVEN_PROJECT_EXISTS, true);
+			IDataModel config = (IDataModel) new MavenFacetInstallDataModelProvider().create();
+			config.setBooleanProperty(IJBossMavenConstants.MAVEN_PROJECT_EXISTS, true);
 			fproj.installProjectFacet(m2Version, config, monitor);
 		}
 	}
 
-	private void installWarFacets(IFacetedProject fproj, String jsfVersion,
-			MavenProject mavenProject, IProgressMonitor monitor)
-			throws CoreException {
-
+	
+	private void installWarFacets(IFacetedProject fproj, 
+			String jsfVersion, MavenProject mavenProject,
+			IProgressMonitor monitor) throws CoreException {
+		
 		if (!fproj.hasProjectFacet(dynamicWebFacet)) {
-			Activator
-					.log(Messages.JSFProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet);
+			Activator.log(Messages.JSFProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet);
 		}
 		installJSFFacet(fproj, jsfVersion, mavenProject, monitor);
 		installM2Facet(fproj, monitor);
-
+		
 	}
 
-	private void installJSFFacet(IFacetedProject fproj,
+
+	private void installJSFFacet(IFacetedProject fproj, 
 			String jsfVersionString, MavenProject mavenProject,
-			IProgressMonitor monitor) throws CoreException {
+			IProgressMonitor monitor)
+			throws CoreException {
 		if (!fproj.hasProjectFacet(jsfFacet)) {
+			String warSourceDir = getWarSourceDirectory(mavenProject,fproj.getProject());
+			IPath facesConfigPath = new Path("WEB-INF/faces-config.xml");
+			IFile facesConfig = fproj.getProject().getFolder(warSourceDir).getFile(facesConfigPath);
+			IFile generatedFacesConfig = getFileFromUnderlyingresources(fproj.getProject(), facesConfigPath);
+
+			//faces-config.xml will not be created in the source folder and it doesn't exist yet
+			// => We'll have to fix it after setting the JSF facet
+			boolean shouldFixFacesConfig = !generatedFacesConfig.getLocation().equals(facesConfig.getLocation()) 
+					                    && !generatedFacesConfig.exists();  
+			
 			if (jsfVersionString.startsWith("1.1")) { //$NON-NLS-1$
-				IDataModel model = MavenJSFActivator.getDefault()
-						.createJSFDataModel(fproj, jsfVersion11);
-				fproj.installProjectFacet(jsfVersion11, model, monitor);
+				IDataModel model = MavenJSFActivator.getDefault().createJSFDataModel(fproj,jsfVersion11);
+				fproj.installProjectFacet(jsfVersion11, model, monitor);	
 			}
-			if (jsfVersionString.startsWith("1.2")) { //$NON-NLS-1$
-				IDataModel model = MavenJSFActivator.getDefault()
-						.createJSFDataModel(fproj, jsfVersion12);
-				fproj.installProjectFacet(jsfVersion12, model, monitor);
+			else if (jsfVersionString.startsWith("1.2")) { //$NON-NLS-1$
+				IDataModel model = MavenJSFActivator.getDefault().createJSFDataModel(fproj,jsfVersion12);
+				fproj.installProjectFacet(jsfVersion12, model, monitor);	
 			}
-			if (jsfVersionString.startsWith("2.0")) { //$NON-NLS-1$
+			else if (jsfVersionString.startsWith("2.0")) { //$NON-NLS-1$
 				String webXmlString = null;
 				IFile webXml = null;
 				webXml = getWebXml(fproj, mavenProject);
@@ -198,8 +215,29 @@
 					}
 				}
 			}
+
+			if (shouldFixFacesConfig && generatedFacesConfig.exists()) {
+				if (facesConfig.exists()) { 
+					//We have 2 config files. Delete the gen'd one
+					generatedFacesConfig.delete(true, monitor);
+				}
+				else { 
+					//move the gen'd config file to the appropriate source folder
+					IContainer destination = facesConfig.getParent();
+					if (destination != null && !destination.exists()) {
+						  destination.getLocation().toFile().mkdirs();
+					}
+					generatedFacesConfig.move(facesConfig.getFullPath(), true, monitor);
+				}
+			}
+			
 		}
 	}
+	
+	private IFile getFileFromUnderlyingresources(final IProject project, final IPath filePath) {
+			  IContainer underlyingFolder = ComponentCore.createComponent(project).getRootFolder().getUnderlyingFolder();
+			  return project.getFile(underlyingFolder.getProjectRelativePath().append(filePath));
+	}
 
 	private IFile getWebXml(IFacetedProject fproj, MavenProject mavenProject) {
 		IFile webXml;
@@ -289,13 +327,42 @@
 
 	private String getJSFVersion(MavenProject mavenProject) {
 		String version = null;
-		version = Activator.getDefault().getDependencyVersion(mavenProject,
-				JSF_API_GROUP_ID, JSF_API_ARTIFACT_ID);
+		version = Activator.getDefault().getDependencyVersion(mavenProject, JSF_API_GROUP_ID, JSF_API_ARTIFACT_ID);
+		if (version == null) {
+			version = Activator.getDefault().getDependencyVersion(mavenProject, JSF_API2_GROUP_ID, JSF_API_ARTIFACT_ID);
+		}
 		if (version == null) {
-			version = Activator.getDefault().getDependencyVersion(mavenProject,
-					JSF_API2_GROUP_ID, JSF_API_ARTIFACT_ID);
+			version = inferJsfVersionFromDependencies(mavenProject, JSF_API2_GROUP_ID, JSF_API_ARTIFACT_ID, JSF_VERSION_2_0);
 		}
-		return version;
+	    return version;
 	}
 
+	private String inferJsfVersionFromDependencies(MavenProject mavenProject, String groupId, String artifactId, String defaultVersion) {
+		boolean hasCandidates = false;
+		String jsfVersion = null;
+		List<ArtifactRepository> repos = mavenProject.getRemoteArtifactRepositories();
+		for (Artifact artifact : mavenProject.getArtifacts()) {
+			if (isKnownJsfBasedArtifact(artifact)) {
+				hasCandidates = true;
+				jsfVersion = Activator.getDefault().getDependencyVersion(artifact, repos, groupId, artifactId);
+				if (jsfVersion != null) {
+					//TODO should probably not break and take the highest version returned from all dependencies
+					break;
+				}
+			}
+		}
+		//Fallback to default JSF version
+		if (hasCandidates && jsfVersion == null) {
+			return defaultVersion;
+		}
+		return jsfVersion;
+	}
+
+	private boolean isKnownJsfBasedArtifact(Artifact artifact) {
+		return artifact.getGroupId().startsWith("org.jboss.seam.") 	//$NON-NLS-1$ 
+				&& artifact.getArtifactId().equals("seam-faces") 	//$NON-NLS-1$
+				&& artifact.getVersion().startsWith("3.");			//$NON-NLS-1$
+	}
+
+	
 }
Index: plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/Messages.java
===================================================================
--- plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/Messages.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/Messages.java	(working copy)
@@ -1,7 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
 package org.jboss.tools.maven.jsf;
 
 import org.eclipse.osgi.util.NLS;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.jboss.tools.maven.jsf.messages"; //$NON-NLS-1$
 	public static String JSFProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet;
Index: plugins/org.jboss.tools.maven.jsf/pom.xml
===================================================================
--- plugins/org.jboss.tools.maven.jsf/pom.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.jsf/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.plugins</groupId>
-	<artifactId>org.jboss.tools.maven.jsf</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.jsf</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
-</project>
+</project>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.jsf/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.jboss.tools.maven.jsf/META-INF/MANIFEST.MF	(revision 32612)
+++ plugins/org.jboss.tools.maven.jsf/META-INF/MANIFEST.MF	(working copy)
@@ -2,14 +2,13 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.jboss.tools.maven.jsf;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Activator: org.jboss.tools.maven.jsf.MavenJSFActivator
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.jboss.tools.maven.core,
  org.jboss.tools.maven.ui,
  org.jboss.tools.common.model,
- org.maven.ide.eclipse.maven_model_edit;bundle-version="0.10.0";visibility:=reexport,
  org.eclipse.jst.j2ee.core,
  org.eclipse.jst.j2ee,
  org.eclipse.wst.common.emfworkbench.integration,
Index: plugins/org.jboss.tools.maven.jsf/lifecycle-mapping-metadata.xml
===================================================================
--- plugins/org.jboss.tools.maven.jsf/lifecycle-mapping-metadata.xml	(revision 0)
+++ plugins/org.jboss.tools.maven.jsf/lifecycle-mapping-metadata.xml	(revision 0)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+  
+      <pluginExecutions>
+        <pluginExecution>
+          <pluginExecutionFilter>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <versionRange>[1.0,)</versionRange>
+            <goals>
+              <goal>war</goal>
+            </goals>
+          </pluginExecutionFilter>
+          <action>
+            <configurator>
+              <id>org.jboss.tools.maven.jsf.configurator</id>
+            </configurator>
+          </action>
+        </pluginExecution>
+      </pluginExecutions>
+
+</lifecycleMappingMetadata>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.jsf/build.properties
===================================================================
--- plugins/org.jboss.tools.maven.jsf/build.properties	(revision 32612)
+++ plugins/org.jboss.tools.maven.jsf/build.properties	(working copy)
@@ -8,4 +8,5 @@
                about.ini,\
                about.mappings,\
                about.properties,\
-               jboss_about.png
+               jboss_about.png,\
+               lifecycle-mapping-metadata.xml
Index: plugins/org.jboss.tools.maven.jsf/plugin.xml
===================================================================
--- plugins/org.jboss.tools.maven.jsf/plugin.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.jsf/plugin.xml	(working copy)
@@ -1,10 +1,24 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?eclipse version="3.4"?>
 <plugin>
-	<extension point="org.maven.ide.eclipse.projectConfigurators">
+    <extension
+         point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
+    </extension>
+   
+    <extension
+         point="org.eclipse.m2e.core.lifecycleMappings">
+      <lifecycleMapping
+            class="org.jboss.tools.maven.jsf.JSFLifecycleMapping"
+            id="org.jboss.tools.maven.jsf.JSFLifecycleMapping"
+            name="JSF Lifecycle mapping">
+      </lifecycleMapping>
+    </extension>
+ 
+	<extension point="org.eclipse.m2e.core.projectConfigurators">
       <configurator 
           id="org.jboss.tools.maven.jsf.configurator"
           class="org.jboss.tools.maven.jsf.configurators.JSFProjectConfigurator"
-          name="%JSF_Project_configurator" priority="150"/>
+          name="%JSF_Project_configurator"
+          secondaryTo="org.maven.ide.eclipse.configuration.wtp.configurator"/>
     </extension>
 </plugin>
Index: plugins/org.jboss.tools.maven.portlet/build.properties
===================================================================
--- plugins/org.jboss.tools.maven.portlet/build.properties	(revision 32612)
+++ plugins/org.jboss.tools.maven.portlet/build.properties	(working copy)
@@ -8,4 +8,5 @@
                about.ini,\
                about.mappings,\
                about.properties,\
-               jboss_about.png
+               jboss_about.png,\
+               lifecycle-mapping-metadata.xml
Index: plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java
===================================================================
--- plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java	(working copy)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
 package org.jboss.tools.maven.portlet.configurators;
 
 import org.apache.maven.project.MavenProject;
@@ -8,6 +18,10 @@
 import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryInstallDelegate;
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderFramework;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
 import org.eclipse.wst.common.componentcore.ModuleCoreNature;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -16,17 +30,18 @@
 import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
 import org.jboss.tools.maven.core.IJBossMavenConstants;
 import org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
-import org.jboss.tools.maven.ui.Activator;
 import org.jboss.tools.maven.portlet.MavenPortletActivator;
 import org.jboss.tools.maven.portlet.Messages;
+import org.jboss.tools.maven.ui.Activator;
 import org.jboss.tools.portlet.core.IPortletConstants;
 import org.jboss.tools.portlet.core.internal.project.facet.JSFPortletFacetInstallDataModelProvider;
 import org.jboss.tools.portlet.core.internal.project.facet.PortletFacetInstallDataModelProvider;
-import org.maven.ide.eclipse.project.IMavenProjectFacade;
-import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
-import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
-import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class PortletProjectConfigurator extends AbstractProjectConfigurator {
 
 	private static final String PORTLET_API_GROUP_ID = "javax.portlet"; //$NON-NLS-1$
Index: plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/MavenPortletActivator.java
===================================================================
--- plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/MavenPortletActivator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/MavenPortletActivator.java	(working copy)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
 package org.jboss.tools.maven.portlet;
 
 import org.eclipse.core.runtime.IStatus;
Index: plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/Messages.java
===================================================================
--- plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/Messages.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/Messages.java	(working copy)
@@ -1,7 +1,22 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
 package org.jboss.tools.maven.portlet;
 
 import org.eclipse.osgi.util.NLS;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.jboss.tools.maven.jsf.messages"; //$NON-NLS-1$
 	public static String PortletProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet;
Index: plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/PortletLifecycleMapping.java
===================================================================
--- plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/PortletLifecycleMapping.java	(revision 0)
+++ plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/PortletLifecycleMapping.java	(revision 0)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.maven.portlet;
+
+import org.eclipse.m2e.core.project.configurator.AbstractCustomizableLifecycleMapping;
+
+/**
+ * @author snjeza
+ */
+public class PortletLifecycleMapping extends AbstractCustomizableLifecycleMapping {
+
+}
Index: plugins/org.jboss.tools.maven.portlet/plugin.xml
===================================================================
--- plugins/org.jboss.tools.maven.portlet/plugin.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.portlet/plugin.xml	(working copy)
@@ -2,10 +2,24 @@
 <?eclipse version="3.4"?>
 <plugin>
 
-	<extension point="org.maven.ide.eclipse.projectConfigurators">
+    <extension
+         point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
+    </extension>
+   
+    <extension
+         point="org.eclipse.m2e.core.lifecycleMappings">
+      <lifecycleMapping
+            class="org.jboss.tools.maven.portlet.PortletLifecycleMapping"
+            id="org.jboss.tools.maven.portlet.PortletLifecycleMapping"
+            name="Portlet Lifecycle mapping">
+      </lifecycleMapping>
+    </extension>
+    
+	<extension point="org.eclipse.m2e.core.projectConfigurators">
       <configurator 
           id="org.jboss.tools.maven.portlet.configurator"
           class="org.jboss.tools.maven.portlet.configurators.PortletProjectConfigurator"
-          name="%Portlet_Project_configurator" priority="155"/>
+          name="%Portlet_Project_configurator"
+          secondaryTo="org.maven.ide.eclipse.configuration.wtp.configurator"/>
     </extension>
 </plugin>
Index: plugins/org.jboss.tools.maven.portlet/lifecycle-mapping-metadata.xml
===================================================================
--- plugins/org.jboss.tools.maven.portlet/lifecycle-mapping-metadata.xml	(revision 0)
+++ plugins/org.jboss.tools.maven.portlet/lifecycle-mapping-metadata.xml	(revision 0)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+  
+      <pluginExecutions>
+        <pluginExecution>
+          <pluginExecutionFilter>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-war-plugin</artifactId>
+            <versionRange>[1.0,)</versionRange>
+            <goals>
+              <goal>war</goal>
+            </goals>
+          </pluginExecutionFilter>
+          <action>
+            <configurator>
+              <id>org.jboss.tools.maven.portlet.configurator</id>
+            </configurator>
+          </action>
+        </pluginExecution>
+      </pluginExecutions>
+
+</lifecycleMappingMetadata>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.portlet/pom.xml
===================================================================
--- plugins/org.jboss.tools.maven.portlet/pom.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.portlet/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.plugins</groupId>
-	<artifactId>org.jboss.tools.maven.portlet</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.portlet</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
-</project>
+</project>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.portlet/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.jboss.tools.maven.portlet/META-INF/MANIFEST.MF	(revision 32612)
+++ plugins/org.jboss.tools.maven.portlet/META-INF/MANIFEST.MF	(working copy)
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.jboss.tools.maven.portlet;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Activator: org.jboss.tools.maven.portlet.MavenPortletActivator
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
@@ -10,7 +10,6 @@
  org.jboss.tools.maven.ui,
  org.jboss.tools.portlet.core,
  org.jboss.tools.common.model,
- org.maven.ide.eclipse.maven_model_edit;bundle-version="0.10.0";visibility:=reexport,
  org.eclipse.jst.j2ee.core,
  org.eclipse.jst.j2ee,
  org.eclipse.wst.common.emfworkbench.integration
Index: plugins/org.jboss.tools.maven.core/pom.xml
===================================================================
--- plugins/org.jboss.tools.maven.core/pom.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.plugins</groupId>
-	<artifactId>org.jboss.tools.maven.core</artifactId> 
-	<version>1.1.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.core</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
-</project>
+</project>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.core;
 
 import java.io.File;
@@ -5,11 +15,10 @@
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.Collections;
+import java.util.HashMap;
 import java.util.LinkedHashMap;
 import java.util.List;
 
@@ -45,24 +54,22 @@
 import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperationConfig;
 import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.internal.IMavenConstants;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.jdt.internal.BuildPathManager;
+import org.eclipse.m2e.model.edit.pom.Dependency;
+import org.eclipse.m2e.model.edit.pom.PomFactory;
+import org.eclipse.m2e.model.edit.pom.PropertyElement;
+import org.eclipse.m2e.model.edit.pom.Repository;
+import org.eclipse.m2e.model.edit.pom.util.PomResourceFactoryImpl;
+import org.eclipse.m2e.model.edit.pom.util.PomResourceImpl;
 import org.eclipse.wst.common.componentcore.ComponentCore;
 import org.eclipse.wst.common.componentcore.resources.IVirtualComponent;
 import org.eclipse.wst.common.componentcore.resources.IVirtualFolder;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.project.facet.core.FacetedProjectFramework;
-import org.maven.ide.components.pom.Dependency;
-import org.maven.ide.components.pom.PomFactory;
-import org.maven.ide.components.pom.PropertyElement;
-import org.maven.ide.components.pom.Repository;
-import org.maven.ide.components.pom.util.PomResourceFactoryImpl;
-import org.maven.ide.components.pom.util.PomResourceImpl;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.core.IMavenConstants;
-import org.maven.ide.eclipse.embedder.IMavenConfiguration;
-import org.maven.ide.eclipse.embedder.MavenModelManager;
-import org.maven.ide.eclipse.jdt.BuildPathManager;
-import org.maven.ide.eclipse.project.IProjectConfigurationManager;
-import org.maven.ide.eclipse.project.ResolverConfiguration;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -70,6 +77,8 @@
  */
 public class MavenCoreActivator extends Plugin {
 
+	private static final String ROOT_DIR = "/"; //$NON-NLS-1$
+
 	public static final String SEPARATOR = "/"; //$NON-NLS-1$
 
 	// The plug-in ID
@@ -281,7 +290,7 @@
 		IClasspathEntry[] cp = javaProject.getRawClasspath();
 		for (int i = 0; i < cp.length; i++) {
 			if (IClasspathEntry.CPE_CONTAINER == cp[i].getEntryKind()
-					&& BuildPathManager.isMaven2ClasspathContainer(cp[i]
+					&& BuildPathManager.CONTAINER_ID.equals(cp[i]
 							.getPath())) {
 				LinkedHashMap<String, IClasspathAttribute> attrs = new LinkedHashMap<String, IClasspathAttribute>();
 				for (IClasspathAttribute attr : cp[i].getExtraAttributes()) {
@@ -312,56 +321,12 @@
 
 	public static void updateMavenProjectConfiguration(IProject project)
 			throws CoreException {
-		ResolverConfiguration resolverConfiguration = new ResolverConfiguration();
-		//resolverConfiguration.setIncludeModules(false);
-		// FIXME
-		resolverConfiguration.setResolveWorkspaceProjects(true);
-		resolverConfiguration.setActiveProfiles(""); //$NON-NLS-1$
 		IProjectConfigurationManager configurationManager = MavenPlugin
 				.getDefault().getProjectConfigurationManager();
-		//IMavenConfiguration mavenConfiguration = MavenPlugin.lookup(IMavenConfiguration.class);
-		//IMavenConfiguration mavenConfiguration = MavenPlugin.getDefault().getMavenConfiguration();
-		IMavenConfiguration mavenConfiguration = getMavenConfiguration();
-		
 		configurationManager.updateProjectConfiguration(project,
-				resolverConfiguration, mavenConfiguration.getGoalOnUpdate(),
 				new NullProgressMonitor());
 	}
 	
-	private static IMavenConfiguration getMavenConfiguration() {
-		Class clazz = MavenPlugin.class;
-		try {
-			Method method = clazz.getMethod ("getMavenConfiguration", new Class[0]); //$NON-NLS-1$
-			Object configuration = method.invoke (MavenPlugin.getDefault(), new Object[0]);
-			return (IMavenConfiguration) configuration;
-		} catch (SecurityException e) {
-			log(e);
-		} catch (NoSuchMethodException e) {
-			try {
-				Method method = clazz.getMethod ("lookup", new Class[] {Class.class}); //$NON-NLS-1$
-				Object configuration = method.invoke (null, new Object[] {IMavenConfiguration.class});
-				return (IMavenConfiguration) configuration;
-			} catch (SecurityException e1) {
-				log(e1);
-			} catch (IllegalArgumentException e1) {
-				log(e1);
-			} catch (NoSuchMethodException e1) {
-				log(e1);
-			} catch (IllegalAccessException e1) {
-				log(e1);
-			} catch (InvocationTargetException e1) {
-				log(e1);
-			}
-		} catch (IllegalArgumentException e) {
-			log(e);
-		} catch (IllegalAccessException e) {
-			log(e);
-		} catch (InvocationTargetException e) {
-			log(e);
-		}
-		return null;
-	}
-	
 	public static void addMavenWarPlugin(Build build, IProject project) throws JavaModelException {
 		org.apache.maven.model.Plugin plugin = new org.apache.maven.model.Plugin();
 		plugin.setGroupId("org.apache.maven.plugins"); //$NON-NLS-1$
@@ -429,18 +394,18 @@
 			Xpp3Dom modules = new Xpp3Dom("modules"); //$NON-NLS-1$
 			configuration.addChild(modules);
 
+			Xpp3Dom seamModule = getEarModule("ejbModule", "org.jboss.seam", //$NON-NLS-1$ //$NON-NLS-2$
+					"jboss-seam", ROOT_DIR, null); //$NON-NLS-1$ //$NON-NLS-2$
+			modules.addChild(seamModule);
+			
 			if (ejbArtifactId != null) {
 				String ejbModuleName = ejbArtifactId + ".jar"; //$NON-NLS-1$
 				Xpp3Dom ejbProject = getEarModule(
 						"ejbModule", //$NON-NLS-1$
 						m2FacetModel.getStringProperty(IJBossMavenConstants.GROUP_ID),
-						ejbArtifactId, "/", ejbModuleName); //$NON-NLS-1$ 
+						ejbArtifactId, ROOT_DIR, ejbModuleName); //$NON-NLS-1$ 
 				modules.addChild(ejbProject);
 			}
-			
-			Xpp3Dom seamModule = getEarModule("ejbModule", "org.jboss.seam", //$NON-NLS-1$ //$NON-NLS-2$
-					"jboss-seam", "/", null); //$NON-NLS-1$ //$NON-NLS-2$
-			modules.addChild(seamModule);
 
 			String webModuleName = m2FacetModel.getStringProperty(IJBossMavenConstants.ARTIFACT_ID) + ".war"; //$NON-NLS-1$
 			
@@ -448,7 +413,7 @@
 					"webModule", //$NON-NLS-1$
 					m2FacetModel.getStringProperty(IJBossMavenConstants.GROUP_ID),
 					m2FacetModel.getStringProperty(IJBossMavenConstants.ARTIFACT_ID),
-					"/", webModuleName); //$NON-NLS-1$
+					ROOT_DIR, webModuleName); //$NON-NLS-1$
 			Xpp3Dom contextRoot = new Xpp3Dom("contextRoot"); //$NON-NLS-1$
 			contextRoot.setValue(m2FacetModel
 					.getStringProperty(IJBossMavenConstants.ARTIFACT_ID));
@@ -484,9 +449,11 @@
 		Xpp3Dom artifactId = new Xpp3Dom("artifactId"); //$NON-NLS-1$
 		artifactId.setValue(artifactIdString);
 		earModule.addChild(artifactId);
-		Xpp3Dom bundleDir = new Xpp3Dom("bundleDir"); //$NON-NLS-1$
-		bundleDir.setValue(bundleDirString);
-		earModule.addChild(bundleDir);
+		if (!ROOT_DIR.equals(bundleDirString)) {
+			Xpp3Dom bundleDir = new Xpp3Dom("bundleDir"); //$NON-NLS-1$
+			bundleDir.setValue(bundleDirString);
+			earModule.addChild(bundleDir);
+		}
 		if (bundleFileNameString != null) {
 			Xpp3Dom bundleFileName = new Xpp3Dom("bundleFileName"); //$NON-NLS-1$
 			bundleFileName.setValue(bundleFileNameString);
@@ -534,7 +501,7 @@
 		return sourceDirectory;
 	}
 	
-	public static void mergeModel(org.maven.ide.components.pom.Model projectModel, org.maven.ide.components.pom.Model libraryModel) {
+	public static void mergeModel(org.eclipse.m2e.model.edit.pom.Model projectModel, org.eclipse.m2e.model.edit.pom.Model libraryModel) {
 		if (projectModel == null || libraryModel == null) {
 			return;
 		}
@@ -544,9 +511,9 @@
 		addDependencies(projectModel,libraryModel);
 	}
 
-	private static void addDependencies(org.maven.ide.components.pom.Model projectModel, org.maven.ide.components.pom.Model libraryModel) {
-		List<org.maven.ide.components.pom.Dependency> projectDependencies = projectModel.getDependencies();
-		List<org.maven.ide.components.pom.Dependency> libraryDependencies = libraryModel.getDependencies();
+	private static void addDependencies(org.eclipse.m2e.model.edit.pom.Model projectModel, org.eclipse.m2e.model.edit.pom.Model libraryModel) {
+		List<org.eclipse.m2e.model.edit.pom.Dependency> projectDependencies = projectModel.getDependencies();
+		List<org.eclipse.m2e.model.edit.pom.Dependency> libraryDependencies = libraryModel.getDependencies();
 		for (Dependency dependency:libraryDependencies) {
 			if (!dependencyExists(dependency,projectDependencies)) {
 				Dependency newDependency = (Dependency) EcoreUtil.copy(dependency);
@@ -579,33 +546,33 @@
 		return false;
 	}
 
-	private static void addPlugins(org.maven.ide.components.pom.Model projectModel, org.maven.ide.components.pom.Model libraryModel) {
-		org.maven.ide.components.pom.Build libraryBuild = libraryModel.getBuild();
+	private static void addPlugins(org.eclipse.m2e.model.edit.pom.Model projectModel, org.eclipse.m2e.model.edit.pom.Model libraryModel) {
+		org.eclipse.m2e.model.edit.pom.Build libraryBuild = libraryModel.getBuild();
 		if (libraryBuild == null) {
 			return;
 		}
-		List<org.maven.ide.components.pom.Plugin> libraryPlugins = projectModel.getBuild().getPlugins();
-		for (org.maven.ide.components.pom.Plugin plugin:libraryPlugins) {
-			org.maven.ide.components.pom.Build projectBuild = projectModel.getBuild();
+		List<org.eclipse.m2e.model.edit.pom.Plugin> libraryPlugins = projectModel.getBuild().getPlugins();
+		for (org.eclipse.m2e.model.edit.pom.Plugin plugin:libraryPlugins) {
+			org.eclipse.m2e.model.edit.pom.Build projectBuild = projectModel.getBuild();
 			if (projectBuild == null) {
 				projectBuild = PomFactory.eINSTANCE.createBuild();
 		        projectModel.setBuild(projectBuild);
 			}
-			List<org.maven.ide.components.pom.Plugin> projectPlugins = projectBuild.getPlugins();
+			List<org.eclipse.m2e.model.edit.pom.Plugin> projectPlugins = projectBuild.getPlugins();
 			if (!pluginExists(plugin,projectPlugins)) {
-				org.maven.ide.components.pom.Plugin newPlugin = (org.maven.ide.components.pom.Plugin) EcoreUtil.copy(plugin);
+				org.eclipse.m2e.model.edit.pom.Plugin newPlugin = (org.eclipse.m2e.model.edit.pom.Plugin) EcoreUtil.copy(plugin);
 				projectPlugins.add(newPlugin);
 			}
 		}
 	}
 
-	private static boolean pluginExists(org.maven.ide.components.pom.Plugin plugin, List<org.maven.ide.components.pom.Plugin> projectPlugins) {
+	private static boolean pluginExists(org.eclipse.m2e.model.edit.pom.Plugin plugin, List<org.eclipse.m2e.model.edit.pom.Plugin> projectPlugins) {
 		String groupId = plugin.getGroupId();
 		String artifactId = plugin.getArtifactId();
 		if (artifactId == null) {
 			return false;
 		}
-		for (org.maven.ide.components.pom.Plugin projectPlugin:projectPlugins) {
+		for (org.eclipse.m2e.model.edit.pom.Plugin projectPlugin:projectPlugins) {
 			String projectGroupId = projectPlugin.getGroupId();
 			String projectArtifactId = projectPlugin.getArtifactId();
 			if (!artifactId.equals(projectArtifactId)) {
@@ -621,7 +588,7 @@
 		return false;
 	}
 
-	private static void addRepositories(org.maven.ide.components.pom.Model projectModel, org.maven.ide.components.pom.Model libraryModel) {
+	private static void addRepositories(org.eclipse.m2e.model.edit.pom.Model projectModel, org.eclipse.m2e.model.edit.pom.Model libraryModel) {
 		List<Repository> projectRepositories = projectModel.getRepositories();
 		List<Repository> libraryRepositories = libraryModel.getRepositories();
 		for (Repository repository:libraryRepositories) {
@@ -646,7 +613,7 @@
 		return false;
 	}
 
-	private static void addProperties(org.maven.ide.components.pom.Model projectModel, org.maven.ide.components.pom.Model libraryModel) {
+	private static void addProperties(org.eclipse.m2e.model.edit.pom.Model projectModel, org.eclipse.m2e.model.edit.pom.Model libraryModel) {
 		List<PropertyElement> projectProperties = projectModel.getProperties();
 		List<PropertyElement> libraryProperties = libraryModel.getProperties();
 		for (PropertyElement libraryProperty:libraryProperties) {
@@ -778,4 +745,21 @@
 		plugin.setConfiguration(configuration);
 		build.getPlugins().add(plugin);
 	}
+	
+	public static PomResourceImpl loadResource(IFile pomFile)
+			throws CoreException {
+		String path = pomFile.getFullPath().toOSString();
+		URI uri = URI.createPlatformResourceURI(path, true);
+		try {
+			org.eclipse.emf.ecore.resource.Resource pomResource = new PomResourceFactoryImpl()
+					.createResource(uri);
+			pomResource.load(new HashMap());
+			return (PomResourceImpl) pomResource;
+		} catch (Exception ex) {
+			String msg = "Can't load model " + pomFile;
+			log(ex);
+			throw new CoreException(new Status(IStatus.ERROR,
+					IMavenConstants.PLUGIN_ID, -1, msg, ex));
+		}
+	}
 }
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/Messages.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/Messages.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/Messages.java	(working copy)
@@ -1,7 +1,21 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.core;
 
 import org.eclipse.osgi.util.NLS;
 
+/**
+ * @author snjeza
+ * 
+ */
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.jboss.tools.maven.core.messages"; //$NON-NLS-1$
 	public static String MavenFacetInstallDelegate_Internal_Error_creating_JBoss_Maven_Facet;
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/xpl/ProjectUpdater.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/xpl/ProjectUpdater.java	(revision 0)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/xpl/ProjectUpdater.java	(revision 0)
@@ -0,0 +1,14 @@
+package org.jboss.tools.maven.core.xpl;
+
+import org.eclipse.m2e.model.edit.pom.Model;
+
+/**
+ * Project updater
+ *
+ * @author Eugene Kuleshov
+ */
+public abstract class ProjectUpdater {
+
+  public abstract void update(Model model);
+
+}
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperationConfig.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperationConfig.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperationConfig.java	(working copy)
@@ -1,8 +1,22 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.core.libprov;
 
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderInstallOperationConfig;
-import org.maven.ide.components.pom.Model;
+import org.eclipse.m2e.model.edit.pom.Model;
 
+/**
+ * @author snjeza
+ * 
+ */
 public class MavenLibraryProviderInstallOperationConfig extends
 		LibraryProviderInstallOperationConfig {
 
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderUninstallOperation.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderUninstallOperation.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderUninstallOperation.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.core.libprov;
 
 import org.eclipse.core.runtime.CoreException;
@@ -5,13 +15,15 @@
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperation;
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperationConfig;
 
+/**
+ * @author snjeza
+ * 
+ */
 public class MavenLibraryProviderUninstallOperation extends LibraryProviderOperation {
 
 	@Override
 	public void execute(LibraryProviderOperationConfig config,
 			IProgressMonitor monitor) throws CoreException {
-		// TODO Auto-generated method stub
-		
 		
 	}
 
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperation.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperation.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperation.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.core.libprov;
 
 import java.io.File;
@@ -12,19 +22,26 @@
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.FileLocator;
 import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
 import org.eclipse.emf.ecore.resource.URIConverter;
 import org.eclipse.emf.ecore.xmi.XMIResource;
 import org.eclipse.jst.common.project.facet.core.libprov.ILibraryProvider;
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperation;
 import org.eclipse.jst.common.project.facet.core.libprov.LibraryProviderOperationConfig;
+import org.eclipse.m2e.core.internal.IMavenConstants;
+import org.eclipse.m2e.model.edit.pom.Model;
+import org.eclipse.m2e.model.edit.pom.util.PomResourceFactoryImpl;
+import org.eclipse.m2e.model.edit.pom.util.PomResourceImpl;
 import org.eclipse.wst.common.project.facet.core.IFacetedProjectBase;
 import org.jboss.tools.maven.core.MavenCoreActivator;
-import org.maven.ide.components.pom.Model;
-import org.maven.ide.components.pom.util.PomResourceImpl;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.core.IMavenConstants;
-import org.maven.ide.eclipse.embedder.MavenModelManager;
 
+/**
+ * @author snjeza
+ * 
+ */
 public class MavenLibraryProviderInstallOperation extends
 		LibraryProviderOperation {
 
@@ -40,8 +57,8 @@
 		}
 		if (pom.exists()) {
 			// JBoss Maven Integration facet has been executed		
-			MavenModelManager modelManager = MavenPlugin.getDefault().getMavenModelManager();
-			PomResourceImpl resource = modelManager.loadResource(pom);
+			//MavenModelManager modelManager = MavenPlugin.getDefault().getMavenModelManager();
+			PomResourceImpl resource = loadResource(pom);
 			Model projectModel = resource.getModel();
 			Model libraryModel = mavenConfig.getModel();
 			MavenCoreActivator.mergeModel(projectModel, libraryModel);
@@ -103,8 +120,23 @@
 		} else {
 			MavenCoreActivator.addLibraryProviderOperationConfig(config);
 		}
-		
 	}
 
-	
+	public static PomResourceImpl loadResource(IFile pomFile)
+			throws CoreException {
+		String path = pomFile.getFullPath().toOSString();
+		URI uri = URI.createPlatformResourceURI(path, true);
+		try {
+			Resource resource = new PomResourceFactoryImpl()
+					.createResource(uri);
+			resource.load(new HashMap());
+			return (PomResourceImpl) resource;
+
+		} catch (Exception ex) {
+			String msg = "Can't load model " + pomFile;
+			MavenCoreActivator.log(ex);
+			throw new CoreException(new Status(IStatus.ERROR,
+					MavenCoreActivator.PLUGIN_ID, -1, msg, ex));
+		}
+	}  
 }
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java	(working copy)
@@ -1,12 +1,25 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.core;
 
-
 import org.apache.maven.model.Plugin;
-import org.maven.ide.components.pom.Build;
-import org.maven.ide.components.pom.Model;
-import org.maven.ide.components.pom.PomFactory;
-import org.maven.ide.eclipse.embedder.ProjectUpdater;
+import org.eclipse.m2e.model.edit.pom.Build;
+import org.eclipse.m2e.model.edit.pom.Model;
+import org.eclipse.m2e.model.edit.pom.PomFactory;
+import org.jboss.tools.maven.core.xpl.ProjectUpdater;
 
+/**
+* @author snjeza
+* 
+*/
 public class PluginUpdater extends ProjectUpdater {
 
 	private static final PomFactory POM_FACTORY = PomFactory.eINSTANCE;
@@ -22,7 +35,7 @@
           build = POM_FACTORY.createBuild();
           model.setBuild(build);
         }
-        org.maven.ide.components.pom.Plugin newPlugin = POM_FACTORY.createPlugin();
+        org.eclipse.m2e.model.edit.pom.Plugin newPlugin = POM_FACTORY.createPlugin();
         newPlugin.setArtifactId(plugin.getArtifactId());
         newPlugin.setGroupId(plugin.getGroupId());
         newPlugin.setVersion(plugin.getVersion());
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/ProjectFacetsFactoryTester.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/ProjectFacetsFactoryTester.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/ProjectFacetsFactoryTester.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.core;
 
 import java.util.ArrayList;
@@ -9,6 +19,10 @@
 import org.eclipse.core.expressions.PropertyTester;
 import org.eclipse.wst.common.project.facet.core.internal.ProjectFacetVersion;
 
+/**
+ * @author snjeza
+ * 
+ */
 public class ProjectFacetsFactoryTester extends PropertyTester {
 
 	public boolean test(Object receiver, String property, Object[] args,
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDelegate.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDelegate.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDelegate.java	(working copy)
@@ -1,13 +1,19 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.core.internal.project.facet;
 
-import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.maven.model.Build;
 import org.apache.maven.model.Model;
-import org.apache.maven.model.Plugin;
-import org.apache.maven.model.Resource;
-import org.codehaus.plexus.util.xml.Xpp3Dom;
 import org.eclipse.core.resources.IFile;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
@@ -21,6 +27,9 @@
 import org.eclipse.jst.j2ee.classpathdep.IClasspathDependencyConstants;
 import org.eclipse.jst.j2ee.project.facet.IJ2EEFacetConstants;
 import org.eclipse.jst.j2ee.web.project.facet.WebFacetUtils;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.internal.IMavenConstants;
 import org.eclipse.wst.common.componentcore.datamodel.properties.IFacetDataModelProperties;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.project.facet.core.IDelegate;
@@ -28,15 +37,15 @@
 import org.eclipse.wst.common.project.facet.core.IProjectFacet;
 import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
 import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
-import org.jboss.tools.maven.core.MavenCoreActivator;
 import org.jboss.tools.maven.core.IJBossMavenConstants;
+import org.jboss.tools.maven.core.MavenCoreActivator;
 import org.jboss.tools.maven.core.Messages;
 import org.jboss.tools.maven.core.libprov.MavenLibraryProviderInstallOperation;
-import org.jboss.tools.maven.core.libprov.MavenLibraryProviderInstallOperationConfig;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.core.IMavenConstants;
-import org.maven.ide.eclipse.embedder.MavenModelManager;
 
+/**
+ * @author snjeza
+ * 
+ */
 public class MavenFacetInstallDelegate implements IDelegate {
 
 	private static final String SEAM_FACET_ID = "jst.seam"; //$NON-NLS-1$
Index: plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/IJBossMavenConstants.java
===================================================================
--- plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/IJBossMavenConstants.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/IJBossMavenConstants.java	(working copy)
@@ -10,13 +10,10 @@
  ************************************************************************************/
 package org.jboss.tools.maven.core;
 
-
-
 /**
  * @author snjeza
  * 
  */
-
 public interface IJBossMavenConstants {
 
 	static final String M2_FACET_ID="jboss.m2"; //$NON-NLS-1$
Index: plugins/org.jboss.tools.maven.core/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.jboss.tools.maven.core/META-INF/MANIFEST.MF	(revision 32612)
+++ plugins/org.jboss.tools.maven.core/META-INF/MANIFEST.MF	(working copy)
@@ -2,7 +2,7 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.jboss.tools.maven.core; singleton:=true
-Bundle-Version: 1.1.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Localization: plugin
 Bundle-Activator: org.jboss.tools.maven.core.MavenCoreActivator
 Require-Bundle: org.eclipse.core.runtime,
@@ -12,21 +12,22 @@
  org.eclipse.wst.common.frameworks;visibility:=reexport,
  org.eclipse.jst.common.frameworks;visibility:=reexport,
  org.eclipse.wst.common.modulecore;visibility:=reexport,
- org.maven.ide.eclipse;bundle-version="0.10.0";visibility:=reexport,
- org.maven.ide.eclipse.maven_embedder;bundle-version="0.10.0";visibility:=reexport,
+ org.eclipse.m2e.core;bundle-version="[1.0,1.1)";visibility:=reexport,
+ org.eclipse.m2e.maven.runtime;bundle-version="[1.0,1.1)";visibility:=reexport,
  org.eclipse.jdt.core;visibility:=reexport,
- org.maven.ide.eclipse.jdt;bundle-version="0.10.0";visibility:=reexport,
+ org.eclipse.m2e.jdt;bundle-version="[1.0,1.1)";visibility:=reexport,
  org.eclipse.jst.j2ee;visibility:=reexport,
  org.eclipse.jst.j2ee.web;visibility:=reexport,
  org.jboss.tools.common;visibility:=reexport,
  org.eclipse.jdt.launching;visibility:=reexport,
  org.eclipse.ui.workbench;visibility:=reexport,
- org.maven.ide.eclipse.maven_model_edit;bundle-version="0.10.0";visibility:=reexport,
+ org.eclipse.m2e.model.edit;bundle-version="[1.0,1.1)";visibility:=reexport,
  org.eclipse.core.expressions,
- org.maven.ide.eclipse.wtp;bundle-version="0.10.0";visibility:=reexport
+ org.maven.ide.eclipse.wtp;bundle-version="[0.13.0,0.15.0)";visibility:=reexport
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: J2SE-1.5
 Bundle-Vendor: %Bundle-Vendor
 Export-Package: org.jboss.tools.maven.core,
  org.jboss.tools.maven.core.internal.project.facet,
- org.jboss.tools.maven.core.libprov
+ org.jboss.tools.maven.core.libprov,
+ org.jboss.tools.maven.core.xpl
Index: plugins/org.jboss.tools.maven.cdi/pom.xml
===================================================================
--- plugins/org.jboss.tools.maven.cdi/pom.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.plugins</groupId>
-	<artifactId>org.jboss.tools.maven.cdi</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.cdi</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
-</project>
+</project>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.cdi/plugin.xml
===================================================================
--- plugins/org.jboss.tools.maven.cdi/plugin.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/plugin.xml	(working copy)
@@ -2,11 +2,33 @@
 <?eclipse version="3.4"?>
 <plugin>
 
-	<extension point="org.maven.ide.eclipse.projectConfigurators">
+	<extension
+         point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
+    </extension>
+   
+    <extension
+         point="org.eclipse.m2e.core.lifecycleMappings">
+      <lifecycleMapping
+            class="org.jboss.tools.maven.cdi.CDILifecycleMapping"
+            id="org.jboss.tools.maven.cdi.CDILifecycleMapping"
+            name="CDI Lifecycle mapping">
+      </lifecycleMapping>
+    </extension>
+    
+	<extension point="org.eclipse.m2e.core.projectConfigurators">
       <configurator 
-          id="org.jboss.tools.maven.cdi.configurator"
+          id="org.jboss.tools.maven.cdi.configurator.wtp"
           class="org.jboss.tools.maven.cdi.configurators.CDIProjectConfigurator"
-          name="%CDI_Project_configurator" priority="250"/>
+          name="%CDI_Project_configurator_WTP" 
+          secondaryTo="org.maven.ide.eclipse.configuration.wtp.configurator"/>
+    </extension>
+    
+    <extension point="org.eclipse.m2e.core.projectConfigurators">
+      <configurator 
+          id="org.jboss.tools.maven.cdi.configurator.jdt"
+          class="org.jboss.tools.maven.cdi.configurators.CDIProjectConfigurator"
+          name="%CDI_Project_configurator_JDT" 
+          secondaryTo="org.eclipse.m2e.jdt.javaConfigurator"/>
     </extension>
     
 </plugin>
Index: plugins/org.jboss.tools.maven.cdi/lifecycle-mapping-metadata.xml
===================================================================
--- plugins/org.jboss.tools.maven.cdi/lifecycle-mapping-metadata.xml	(revision 0)
+++ plugins/org.jboss.tools.maven.cdi/lifecycle-mapping-metadata.xml	(revision 0)
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+
+	<pluginExecutions>
+		<pluginExecution>
+			<pluginExecutionFilter>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<versionRange>[2.0,)</versionRange>
+				<goals>
+					<goal>compile</goal>
+					<goal>testCompile</goal>
+				</goals>
+			</pluginExecutionFilter>
+			<action>
+				<configurator>
+					<id>org.jboss.tools.maven.cdi.configurator.jdt</id>
+				</configurator>
+			</action>
+		</pluginExecution>
+		<pluginExecution>
+			<pluginExecutionFilter>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-war-plugin</artifactId>
+				<versionRange>[1.0,)</versionRange>
+				<goals>
+					<goal>war</goal>
+				</goals>
+			</pluginExecutionFilter>
+			<action>
+				<configurator>
+					<id>org.jboss.tools.maven.cdi.configurator.wtp</id>
+				</configurator>
+			</action>
+		</pluginExecution>
+		<pluginExecution>
+			<pluginExecutionFilter>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-ejb-plugin</artifactId>
+				<versionRange>[1.0,)</versionRange>
+				<goals>
+					<goal>ejb</goal>
+				</goals>
+			</pluginExecutionFilter>
+			<action>
+				<configurator>
+					<id>org.jboss.tools.maven.cdi.configurator.wtp</id>
+				</configurator>
+			</action>
+		</pluginExecution>
+	</pluginExecutions>
+
+</lifecycleMappingMetadata>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.cdi/plugin.properties
===================================================================
--- plugins/org.jboss.tools.maven.cdi/plugin.properties	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/plugin.properties	(working copy)
@@ -1,3 +1,4 @@
 Bundle-Vendor = JBoss by Red Hat
 Bundle-Name = JBoss Maven CDI Configurator
-CDI_Project_configurator = CDI
+CDI_Project_configurator_WTP = CDI (WTP)
+CDI_Project_configurator_JDT = CDI (JDT)
Index: plugins/org.jboss.tools.maven.cdi/build.properties
===================================================================
--- plugins/org.jboss.tools.maven.cdi/build.properties	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/build.properties	(working copy)
@@ -8,4 +8,5 @@
                about.ini,\
                about.mappings,\
                about.properties,\
-               jboss_about.png
+               jboss_about.png,\
+               lifecycle-mapping-metadata.xml
Index: plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/messages.properties
===================================================================
--- plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/messages.properties	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/messages.properties	(working copy)
@@ -1 +1 @@
-CDIProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet=The project doesn't contain the Web Module facet.
+CDIProjectConfigurator_The_project_does_not_contain_required_facets=The {0} project does not contain the Dynamic Web Module facet or the EJB Module facet.
Index: plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/Messages.java
===================================================================
--- plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/Messages.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/Messages.java	(working copy)
@@ -1,10 +1,25 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.cdi;
 
 import org.eclipse.osgi.util.NLS;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class Messages extends NLS {
 	private static final String BUNDLE_NAME = "org.jboss.tools.maven.cdi.messages"; //$NON-NLS-1$
-	public static String CDIProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet;
+	public static String CDIProjectConfigurator_The_project_does_not_contain_required_facets;
 	static {
 		// initialize resource bundle
 		NLS.initializeMessages(BUNDLE_NAME, Messages.class);
Index: plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/CDILifecycleMapping.java
===================================================================
--- plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/CDILifecycleMapping.java	(revision 0)
+++ plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/CDILifecycleMapping.java	(revision 0)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.maven.cdi;
+
+import org.eclipse.m2e.core.project.configurator.AbstractCustomizableLifecycleMapping;
+
+/**
+ * @author snjeza
+ */
+public class CDILifecycleMapping extends AbstractCustomizableLifecycleMapping {
+
+}
Index: plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
===================================================================
--- plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java	(working copy)
@@ -1,47 +1,73 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.cdi.configurators;
 
+import java.util.List;
+
+import org.apache.maven.artifact.Artifact;
+import org.apache.maven.artifact.repository.ArtifactRepository;
 import org.apache.maven.project.MavenProject;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.NullProgressMonitor;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
+import org.eclipse.osgi.util.NLS;
 import org.eclipse.wst.common.componentcore.ModuleCoreNature;
 import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
 import org.eclipse.wst.common.project.facet.core.IFacetedProject;
 import org.eclipse.wst.common.project.facet.core.IProjectFacet;
 import org.eclipse.wst.common.project.facet.core.IProjectFacetVersion;
 import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
+import org.jboss.tools.cdi.core.CDICoreNature;
 import org.jboss.tools.cdi.core.CDIUtil;
 import org.jboss.tools.maven.cdi.MavenCDIActivator;
+import org.jboss.tools.maven.cdi.Messages;
 import org.jboss.tools.maven.core.IJBossMavenConstants;
 import org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
 import org.jboss.tools.maven.ui.Activator;
-import org.jboss.tools.maven.cdi.Messages;
-import org.maven.ide.eclipse.project.IMavenProjectFacade;
-import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
-import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
-import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
 
+/**
+ * 
+ * @author snjeza
+ *
+ */
 public class CDIProjectConfigurator extends AbstractProjectConfigurator {
 
 	private static final String CDI_API_GROUP_ID = "javax.enterprise"; //$NON-NLS-1$
 	private static final String CDI_API_ARTIFACT_ID = "cdi-api"; //$NON-NLS-1$
 	
 	protected static final IProjectFacet dynamicWebFacet;
+	protected static final IProjectFacet ejbFacet;
 	protected static final IProjectFacetVersion dynamicWebVersion;
+	protected static final IProjectFacetVersion ejbVersion;
 	
 	protected static final IProjectFacet cdiFacet;
 	protected static final IProjectFacetVersion cdiVersion;
 	
 	protected static final IProjectFacet m2Facet;
 	protected static final IProjectFacetVersion m2Version;
+	private static final String DEFAULT_CDI_VERSION = "1.0";
 	
 	static {
 		dynamicWebFacet = ProjectFacetsManager.getProjectFacet("jst.web"); //$NON-NLS-1$
 		dynamicWebVersion = dynamicWebFacet.getVersion("2.5");  //$NON-NLS-1$
+		ejbFacet = ProjectFacetsManager.getProjectFacet("jst.ejb"); //$NON-NLS-1$
+		ejbVersion = ejbFacet.getVersion("3.0");  //$NON-NLS-1$
 		cdiFacet = ProjectFacetsManager.getProjectFacet("jst.cdi"); //$NON-NLS-1$
-		cdiVersion = cdiFacet.getVersion("1.0"); //$NON-NLS-1$
+		cdiVersion = cdiFacet.getVersion(DEFAULT_CDI_VERSION); //$NON-NLS-1$
 		m2Facet = ProjectFacetsManager.getProjectFacet("jboss.m2"); //$NON-NLS-1$
 		m2Version = m2Facet.getVersion("1.0"); //$NON-NLS-1$
 	}
@@ -61,13 +87,17 @@
 		if (!configureCDI) {
 			return;
 		}
-		
+    	final IFacetedProject fproj = ProjectFacetsManager.create(project);
+		if (project.hasNature(CDICoreNature.NATURE_ID) 
+				&& (fproj == null || (fproj.hasProjectFacet(cdiFacet) && fproj.hasProjectFacet(m2Facet)))) {
+			//everything already installed. Since there's no support for version update -yet- we stop here
+			return;
+		}
 		String packaging = mavenProject.getPackaging();
 	    String cdiVersion = getCDIVersion(mavenProject);
 	    if (cdiVersion != null) {
-	    	final IFacetedProject fproj = ProjectFacetsManager.create(project);
 	    	if ( (fproj != null) && ("war".equals(packaging) || "ejb".equals(packaging)) ) { //$NON-NLS-1$
-	    		installWarFacets(fproj, cdiVersion, monitor);
+	    		installDefaultFacets(fproj, cdiVersion, monitor);
 	    	}
 	    	CDIUtil.enableCDI(project, false, new NullProgressMonitor());
 	    }
@@ -101,12 +131,21 @@
 	}
 
 	
-	private void installWarFacets(IFacetedProject fproj, String cdiVersion,IProgressMonitor monitor) throws CoreException {
+	@SuppressWarnings("unchecked")
+	private void installDefaultFacets(IFacetedProject fproj, String cdiVersion,IProgressMonitor monitor) throws CoreException {
+		IProjectFacetVersion currentWebVersion = fproj.getProjectFacetVersion(dynamicWebFacet); 
+		IProjectFacetVersion currentEjbVersion = fproj.getProjectFacetVersion(ejbFacet); 
 		
-		if (!fproj.hasProjectFacet(dynamicWebFacet)) {
-			MavenCDIActivator.log(Messages.CDIProjectConfigurator_The_project_does_not_contain_the_Web_Module_facet);
+		if ((currentWebVersion != null && currentWebVersion.compareTo(dynamicWebVersion)> -1)
+				|| (currentEjbVersion != null && currentEjbVersion.compareTo(ejbVersion)> -1)) {
+			installCDIFacet(fproj, cdiVersion, monitor);
+		} else {
+			String name = "";
+			if (fproj.getProject() != null) {
+				name = fproj.getProject().getName();
+			}
+			MavenCDIActivator.log(NLS.bind(Messages.CDIProjectConfigurator_The_project_does_not_contain_required_facets, name));
 		}
-		installCDIFacet(fproj, cdiVersion, monitor);
 		installM2Facet(fproj, monitor);
 		
 	}
@@ -123,10 +162,37 @@
 	}
 	
 	private String getCDIVersion(MavenProject mavenProject) {
-		String version = null;
-		version = Activator.getDefault().getDependencyVersion(mavenProject, CDI_API_GROUP_ID, CDI_API_ARTIFACT_ID);
-		
+		String version = Activator.getDefault().getDependencyVersion(mavenProject, CDI_API_GROUP_ID, CDI_API_ARTIFACT_ID);
+		if (version == null) {
+			version = inferCdiVersionFromDependencies(mavenProject);
+		}
 	    return version;
 	}
 
+	private String inferCdiVersionFromDependencies(MavenProject mavenProject) {
+		boolean hasCandidates = false;
+		String cdiVersion = null;
+		List<ArtifactRepository> repos = mavenProject.getRemoteArtifactRepositories();
+		for (Artifact artifact : mavenProject.getArtifacts()) {
+			if (isKnownCdiExtension(artifact)) {
+				hasCandidates = true;
+				cdiVersion = Activator.getDefault().getDependencyVersion(artifact, repos, CDI_API_GROUP_ID, CDI_API_ARTIFACT_ID);
+				if (cdiVersion != null) {
+					//TODO should probably not break and take the highest version returned from all dependencies
+					break;
+				}
+			}
+		}
+		//Fallback to default CDI version
+		if (hasCandidates && cdiVersion == null) {
+			return DEFAULT_CDI_VERSION;
+		}
+		return cdiVersion;
+	}
+
+	private boolean isKnownCdiExtension(Artifact artifact) {
+		return artifact.getGroupId().startsWith("org.jboss.seam.") 
+			&& artifact.getVersion().startsWith("3.");
+	}
+
 }
Index: plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java
===================================================================
--- plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.cdi;
 
 import org.eclipse.core.runtime.IStatus;
Index: plugins/org.jboss.tools.maven.cdi/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.jboss.tools.maven.cdi/META-INF/MANIFEST.MF	(revision 32612)
+++ plugins/org.jboss.tools.maven.cdi/META-INF/MANIFEST.MF	(working copy)
@@ -2,14 +2,13 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.jboss.tools.maven.cdi;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Activator: org.jboss.tools.maven.cdi.MavenCDIActivator
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.jboss.tools.maven.core,
  org.jboss.tools.maven.ui,
  org.jboss.tools.common.model,
- org.maven.ide.eclipse.maven_model_edit;bundle-version="0.10.0";visibility:=reexport,
  org.eclipse.jst.j2ee.core,
  org.eclipse.jst.j2ee,
  org.eclipse.wst.common.emfworkbench.integration,
Index: plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF	(revision 32612)
+++ plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF	(working copy)
@@ -9,7 +9,9 @@
  org.eclipse.core.runtime,
  org.jboss.tools.maven.core,
  org.jboss.tools.project.examples,
- org.eclipse.ui.ide
+ org.eclipse.ui.ide,
+ org.eclipse.m2e.archetype.common;bundle-version="[1.0,1.1)",
+ org.eclipse.m2e.core.ui;bundle-version="[1.0,1.1)"
 Bundle-ActivationPolicy: lazy
 Bundle-RequiredExecutionEnvironment: JavaSE-1.6
 Bundle-Vendor: %Bundle-Vendor
Index: plugins/org.jboss.tools.maven.project.examples/plugin.xml
===================================================================
--- plugins/org.jboss.tools.maven.project.examples/plugin.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.project.examples/plugin.xml	(working copy)
@@ -9,5 +9,14 @@
             type="maven">
       </importProjectExample>
    </extension>
+   
+   <extension
+         point="org.jboss.tools.project.examples.importProjectExamples">
+      <importProjectExample
+            class="org.jboss.tools.maven.project.examples.ImportMavenArchetypeProjectExample"
+            name="Import Maven Archetype Project Examples"
+            type="mavenArchetype">
+      </importProjectExample>
+   </extension>
 
 </plugin>
Index: plugins/org.jboss.tools.maven.project.examples/pom.xml
===================================================================
--- plugins/org.jboss.tools.maven.project.examples/pom.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.project.examples/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.plugins</groupId>
-	<artifactId>org.jboss.tools.maven.project.examples</artifactId> 
+	<artifactId>org.jboss.tools.maven.project.examples</artifactId>
 	<version>1.0.0-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
-</project>
+</project>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
===================================================================
--- plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java	(working copy)
@@ -11,7 +11,6 @@
 
 package org.jboss.tools.maven.project.examples;
 
-import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileOutputStream;
 import java.io.IOException;
@@ -26,7 +25,6 @@
 
 import org.apache.maven.model.Model;
 import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IProjectDescription;
 import org.eclipse.core.resources.IResource;
 import org.eclipse.core.resources.IWorkspace;
 import org.eclipse.core.resources.IWorkspaceRoot;
@@ -36,29 +34,22 @@
 import org.eclipse.core.runtime.IPath;
 import org.eclipse.core.runtime.IProgressMonitor;
 import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
 import org.eclipse.core.runtime.Status;
 import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.jface.dialogs.Dialog;
-import org.eclipse.jface.dialogs.IDialogConstants;
 import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.embedder.IMaven;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.project.AbstractProjectScanner;
+import org.eclipse.m2e.core.project.LocalProjectScanner;
+import org.eclipse.m2e.core.project.MavenProjectInfo;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.actions.OpenMavenConsoleAction;
 import org.eclipse.swt.widgets.Display;
 import org.eclipse.swt.widgets.Shell;
 import org.eclipse.ui.progress.IProgressConstants;
 import org.jboss.tools.project.examples.model.AbstractImportProjectExample;
 import org.jboss.tools.project.examples.model.Project;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.actions.OpenMavenConsoleAction;
-import org.maven.ide.eclipse.core.IMavenConstants;
-import org.maven.ide.eclipse.core.MavenConsole;
-import org.maven.ide.eclipse.embedder.IMaven;
-import org.maven.ide.eclipse.embedder.MavenModelManager;
-import org.maven.ide.eclipse.project.AbstractProjectScanner;
-import org.maven.ide.eclipse.project.IMavenProjectImportResult;
-import org.maven.ide.eclipse.project.LocalProjectScanner;
-import org.maven.ide.eclipse.project.MavenProjectInfo;
-import org.maven.ide.eclipse.project.ProjectImportConfiguration;
-import org.maven.ide.eclipse.project.ResolverConfiguration;
 
 /**
  * @author snjeza
@@ -149,7 +140,6 @@
 			public IStatus runInWorkspace(IProgressMonitor monitor) {
 				setProperty(IProgressConstants.ACTION_PROPERTY,
 						new OpenMavenConsoleAction());
-				MavenPlugin plugin = MavenPlugin.getDefault();
 				try {
 					AbstractProjectScanner<MavenProjectInfo> projectScanner = getProjectScanner(destination);
 					projectScanner.run(monitor);
@@ -186,15 +176,15 @@
 									// ignore
 								}
 								project.delete(true, true, monitor);
-							}
+							}	
 						} else {
 							return Status.CANCEL_STATUS;
 						}
 					}
-					plugin.getProjectConfigurationManager().importProjects(
+					MavenPlugin.getProjectConfigurationManager().importProjects(
 							infos, importConfiguration, monitor);
 				} catch (CoreException ex) {
-					plugin.getConsole().logError("Projects imported with errors");
+					MavenProjectExamplesActivator.log(ex, "Projects imported with errors");
 					return ex.getStatus();
 				} catch (InterruptedException e) {
 					return Status.CANCEL_STATUS;
@@ -202,8 +192,7 @@
 				return Status.OK_STATUS;
 			}
 		};
-		job.setRule(MavenPlugin.getDefault().getProjectConfigurationManager()
-				.getRule());
+		job.setRule(MavenPlugin.getProjectConfigurationManager().getRule());
 		job.schedule();
 	}
 
@@ -229,11 +218,9 @@
 			File folder) {
 		File root = ResourcesPlugin.getWorkspace().getRoot().getLocation()
 				.toFile();
-		MavenPlugin mavenPlugin = MavenPlugin.getDefault();
-		MavenModelManager modelManager = mavenPlugin.getMavenModelManager();
-		MavenConsole console = mavenPlugin.getConsole();
+		MavenModelManager modelManager = MavenPlugin.getMavenModelManager();
 		return new LocalProjectScanner(root, folder.getAbsolutePath(), false,
-				modelManager, console);
+				modelManager);
 	}
 	
 	private static Shell getActiveShell() {
Index: plugins/pom.xml
===================================================================
--- plugins/pom.xml	(revision 32612)
+++ plugins/pom.xml	(working copy)
@@ -1,10 +1,16 @@
 <project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.jboss.tools</groupId>
+		<artifactId>maven</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+	</parent>
 	<groupId>org.jboss.tools.maven</groupId>
 	<artifactId>plugins</artifactId>
-	<name>maven.plugins</name>
 	<version>0.0.1-SNAPSHOT</version>
+	<name>maven.plugins</name>
 	<packaging>pom</packaging>
 	<modules>
 		<module>org.jboss.tools.maven.core</module>
Index: plugins/org.jboss.tools.maven.hibernate/pom.xml
===================================================================
--- plugins/org.jboss.tools.maven.hibernate/pom.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.hibernate/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.plugins</groupId>
-	<artifactId>org.jboss.tools.maven.hibernate</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.hibernate</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-plugin</packaging>
 </project>
Index: plugins/org.jboss.tools.maven.hibernate/build.properties
===================================================================
--- plugins/org.jboss.tools.maven.hibernate/build.properties	(revision 32612)
+++ plugins/org.jboss.tools.maven.hibernate/build.properties	(working copy)
@@ -8,4 +8,5 @@
                about.ini,\
                about.mappings,\
                about.properties,\
-               jboss_about.png
+               jboss_about.png,\
+               lifecycle-mapping-metadata.xml
Index: plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF
===================================================================
--- plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF	(revision 32612)
+++ plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF	(working copy)
@@ -2,14 +2,13 @@
 Bundle-ManifestVersion: 2
 Bundle-Name: %Bundle-Name
 Bundle-SymbolicName: org.jboss.tools.maven.hibernate;singleton:=true
-Bundle-Version: 1.0.0.qualifier
+Bundle-Version: 1.2.0.qualifier
 Bundle-Activator: org.jboss.tools.maven.hibernate.MavenHibernateActivator
 Require-Bundle: org.eclipse.ui,
  org.eclipse.core.runtime,
  org.jboss.tools.maven.core,
  org.jboss.tools.maven.ui,
  org.jboss.tools.common.model,
- org.maven.ide.eclipse.maven_model_edit;bundle-version="0.10.0";visibility:=reexport,
  org.eclipse.jst.j2ee.core,
  org.eclipse.jst.j2ee,
  org.eclipse.wst.common.emfworkbench.integration,
Index: plugins/org.jboss.tools.maven.hibernate/lifecycle-mapping-metadata.xml
===================================================================
--- plugins/org.jboss.tools.maven.hibernate/lifecycle-mapping-metadata.xml	(revision 0)
+++ plugins/org.jboss.tools.maven.hibernate/lifecycle-mapping-metadata.xml	(revision 0)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+  
+      <pluginExecutions>
+        <pluginExecution>
+          <pluginExecutionFilter>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-compiler-plugin</artifactId>
+            <versionRange>[2.0,)</versionRange>
+            <goals>
+              <goal>compile</goal>
+			  <goal>testCompile</goal> 
+            </goals>
+          </pluginExecutionFilter>
+          <action>
+            <configurator>
+              <id>org.jboss.tools.maven.hibernate.configurator</id>
+            </configurator>
+          </action>
+        </pluginExecution>
+      </pluginExecutions>
+
+</lifecycleMappingMetadata>
\ No newline at end of file
Index: plugins/org.jboss.tools.maven.hibernate/plugin.xml
===================================================================
--- plugins/org.jboss.tools.maven.hibernate/plugin.xml	(revision 32612)
+++ plugins/org.jboss.tools.maven.hibernate/plugin.xml	(working copy)
@@ -2,11 +2,25 @@
 <?eclipse version="3.4"?>
 <plugin>
 
-	<extension point="org.maven.ide.eclipse.projectConfigurators">
+	<extension
+         point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
+   </extension>
+   
+   <extension
+         point="org.eclipse.m2e.core.lifecycleMappings">
+      <lifecycleMapping
+            class="org.jboss.tools.maven.hibernate.HibernateLifecycleMapping"
+            id="org.jboss.tools.maven.hibernate.HibernateLifecycleMapping"
+            name="Hibernate Lifecycle mapping">
+      </lifecycleMapping>
+   </extension>
+   
+	<extension point="org.eclipse.m2e.core.projectConfigurators">
       <configurator 
           id="org.jboss.tools.maven.hibernate.configurator"
           class="org.jboss.tools.maven.hibernate.configurators.HibernateProjectConfigurator"
-          name="%Hibernate_Project_configurator" priority="250"/>
+          name="%Hibernate_Project_configurator" 
+          secondaryTo="org.eclipse.m2e.jdt.javaConfigurator"/>
     </extension>
     
 </plugin>
Index: plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/HibernateLifecycleMapping.java
===================================================================
--- plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/HibernateLifecycleMapping.java	(revision 0)
+++ plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/HibernateLifecycleMapping.java	(revision 0)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2010 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.maven.hibernate;
+
+import org.eclipse.m2e.core.project.configurator.AbstractCustomizableLifecycleMapping;
+
+/**
+ * @author snjeza
+ */
+public class HibernateLifecycleMapping extends AbstractCustomizableLifecycleMapping {
+
+}
Index: plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
===================================================================
--- plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java	(working copy)
@@ -15,7 +15,6 @@
 
 import org.apache.maven.artifact.Artifact;
 import org.apache.maven.artifact.resolver.filter.ArtifactFilter;
-import org.apache.maven.model.Dependency;
 import org.apache.maven.project.MavenProject;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.ProjectScope;
@@ -24,13 +23,13 @@
 import org.eclipse.core.runtime.preferences.IScopeContext;
 import org.eclipse.jdt.core.JavaCore;
 import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
+import org.eclipse.m2e.core.project.configurator.AbstractProjectConfigurator;
+import org.eclipse.m2e.core.project.configurator.ProjectConfigurationRequest;
 import org.hibernate.eclipse.console.properties.HibernatePropertiesConstants;
 import org.hibernate.eclipse.console.utils.ProjectUtils;
 import org.jboss.tools.maven.ui.Activator;
-import org.maven.ide.eclipse.project.IMavenProjectFacade;
-import org.maven.ide.eclipse.project.MavenProjectChangedEvent;
-import org.maven.ide.eclipse.project.configurator.AbstractProjectConfigurator;
-import org.maven.ide.eclipse.project.configurator.ProjectConfigurationRequest;
 import org.osgi.service.prefs.Preferences;
 
 /**
Index: plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/MavenHibernateActivator.java
===================================================================
--- plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/MavenHibernateActivator.java	(revision 32612)
+++ plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/MavenHibernateActivator.java	(working copy)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 Red Hat, Inc. and others.
+ * All rights reserved. This program and the accompanying materials 
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ * 
+ * Contributors:
+ *     JBoss by Red Hat - Initial implementation.
+ ************************************************************************************/
 package org.jboss.tools.maven.hibernate;
 
 import org.eclipse.ui.plugin.AbstractUIPlugin;
Index: pom.xml
===================================================================
--- pom.xml	(revision 32612)
+++ pom.xml	(working copy)
@@ -1,16 +1,32 @@
 <project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.jboss.tools</groupId>
+		<artifactId>org.jboss.tools.parent.pom</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+		<relativePath>../build/parent/pom.xml</relativePath>
+	</parent>
 	<groupId>org.jboss.tools</groupId>
 	<artifactId>maven</artifactId>
-	<name>maven.all</name>
 	<version>0.0.1-SNAPSHOT</version>
+	<name>maven.all</name>	
 	<packaging>pom</packaging>
 	<modules>
 		<module>features</module>
 		<module>plugins</module>
 		<module>tests</module>
-                <module>site</module>
-       </modules>
+		<module>site</module>
+	</modules>
+
+  <!--repositories>
+    <repository>
+      <id>m2e-requirements</id>
+      <layout>p2</layout>
+      <url>http://download.jboss.org/jbosstools/updates/requirements/m2eclipse/20110623-1035/</url>
+    </repository>
+  </repositories -->
+
 </project>
 	
Index: features/pom.xml
===================================================================
--- features/pom.xml	(revision 32612)
+++ features/pom.xml	(working copy)
@@ -1,10 +1,16 @@
 <project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
+	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.jboss.tools</groupId>
+		<artifactId>maven</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
+	</parent>
 	<groupId>org.jboss.tools.maven</groupId>
 	<artifactId>features</artifactId>
-	<name>maven.features</name>
 	<version>0.0.1-SNAPSHOT</version>
+	<name>maven.features</name>
 	<packaging>pom</packaging>
 	<modules>
 		<module>org.jboss.tools.maven.feature</module>
Index: features/org.jboss.tools.maven.feature/feature.xml
===================================================================
--- features/org.jboss.tools.maven.feature/feature.xml	(revision 32612)
+++ features/org.jboss.tools.maven.feature/feature.xml	(working copy)
@@ -2,7 +2,7 @@
 <feature
       id="org.jboss.tools.maven.feature"
       label="%featureName"
-      version="1.1.0.qualifier"
+      version="1.2.0.qualifier"
       provider-name="%providerName"
       plugin="org.jboss.tools.maven.ui">
 
@@ -19,8 +19,8 @@
    </license>
 
    <requires>
-      <import feature="org.maven.ide.eclipse.feature" version="0.10.0" match="greaterOrEqual"/>
-      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.10.0" match="greaterOrEqual"/>
+      <import feature="org.eclipse.m2e.feature" version="1.0" match="greaterOrEqual"/>
+      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
Index: features/org.jboss.tools.maven.feature/pom.xml
===================================================================
--- features/org.jboss.tools.maven.feature/pom.xml	(revision 32612)
+++ features/org.jboss.tools.maven.feature/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>features</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.features</groupId>
-	<artifactId>org.jboss.tools.maven.feature</artifactId> 
-	<version>1.1.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.feature</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-feature</packaging>
-</project>
+</project>
\ No newline at end of file
Index: features/org.jboss.tools.maven.feature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.feature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.feature/feature.properties	(working copy)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2011 Red Hat, Inc. and others.
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 description=JBoss Maven Integration
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: features/org.jboss.tools.maven.feature/sourceTemplateFeature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.feature/sourceTemplateFeature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.feature/sourceTemplateFeature/feature.properties	(working copy)
@@ -13,7 +13,7 @@
 
 # "copyright" property - text of the "Feature Update Copyright"
 
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: features/org.jboss.tools.maven.portlet.feature/feature.xml
===================================================================
--- features/org.jboss.tools.maven.portlet.feature/feature.xml	(revision 32612)
+++ features/org.jboss.tools.maven.portlet.feature/feature.xml	(working copy)
@@ -2,7 +2,7 @@
 <feature
       id="org.jboss.tools.maven.portlet.feature"
       label="%featureName"
-      version="1.0.0.qualifier"
+      version="1.2.0.qualifier"
       provider-name="%providerName"
       plugin="org.jboss.tools.maven.portlet">
 
@@ -19,8 +19,8 @@
    </license>
 
    <requires>
-      <import feature="org.maven.ide.eclipse.feature" version="0.10.0" match="greaterOrEqual"/>
-      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.10.0" match="greaterOrEqual"/>
+      <import feature="org.eclipse.m2e.feature" version="1.0" match="greaterOrEqual"/>
+      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
Index: features/org.jboss.tools.maven.portlet.feature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.portlet.feature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.portlet.feature/feature.properties	(working copy)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2011 Red Hat, Inc. and others.
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 description=JBoss Maven Portlet Integration
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: features/org.jboss.tools.maven.portlet.feature/pom.xml
===================================================================
--- features/org.jboss.tools.maven.portlet.feature/pom.xml	(revision 32612)
+++ features/org.jboss.tools.maven.portlet.feature/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>features</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.features</groupId>
-	<artifactId>org.jboss.tools.maven.portlet.feature</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.portlet.feature</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-feature</packaging>
-</project>
+</project>
\ No newline at end of file
Index: features/org.jboss.tools.maven.hibernate.feature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.hibernate.feature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.hibernate.feature/feature.properties	(working copy)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2011 Red Hat, Inc. and others.
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 description=JBoss Maven Seam Integration
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: features/org.jboss.tools.maven.hibernate.feature/pom.xml
===================================================================
--- features/org.jboss.tools.maven.hibernate.feature/pom.xml	(revision 32612)
+++ features/org.jboss.tools.maven.hibernate.feature/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>features</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.features</groupId>
-	<artifactId>org.jboss.tools.maven.hibernate.feature</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.hibernate.feature</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-feature</packaging>
-</project>
+</project>
\ No newline at end of file
Index: features/org.jboss.tools.maven.hibernate.feature/feature.xml
===================================================================
--- features/org.jboss.tools.maven.hibernate.feature/feature.xml	(revision 32612)
+++ features/org.jboss.tools.maven.hibernate.feature/feature.xml	(working copy)
@@ -2,7 +2,7 @@
 <feature
       id="org.jboss.tools.maven.hibernate.feature"
       label="%featureName"
-      version="1.0.0.qualifier"
+      version="1.2.0.qualifier"
       provider-name="%providerName"
       plugin="org.jboss.tools.maven.hibernate">
 
@@ -19,8 +19,8 @@
    </license>
 
    <requires>
-      <import feature="org.maven.ide.eclipse.feature" version="0.10.0" match="greaterOrEqual"/>
-      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.10.0" match="greaterOrEqual"/>
+      <import feature="org.eclipse.m2e.feature" version="1.0" match="greaterOrEqual"/>
+      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
Index: features/org.jboss.tools.maven.sdk.feature/feature.xml
===================================================================
--- features/org.jboss.tools.maven.sdk.feature/feature.xml	(revision 32612)
+++ features/org.jboss.tools.maven.sdk.feature/feature.xml	(working copy)
@@ -2,7 +2,7 @@
 <feature
       id="org.jboss.tools.maven.sdk.feature"
       label="%featureName"
-      version="1.0.0.qualifier"
+      version="1.2.0.qualifier"
       provider-name="%providerName">
 
    <description>
Index: features/org.jboss.tools.maven.sdk.feature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.sdk.feature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.sdk.feature/feature.properties	(working copy)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2011 Red Hat, Inc. and others.
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 description=JBoss Maven Integration
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\nAll rights reserved. This program and the accompanying materials\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\nAll rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\nwhich accompanies this distribution, and is available at\nhttp\://www.eclipse.org/legal/epl-v10.html\n\nContributors\:\nJBoss by Red Hat - Initial implementation.
  ############### end of copyright property ####################################
 
Index: features/org.jboss.tools.maven.seam.feature/pom.xml
===================================================================
--- features/org.jboss.tools.maven.seam.feature/pom.xml	(revision 32612)
+++ features/org.jboss.tools.maven.seam.feature/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>features</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.features</groupId>
-	<artifactId>org.jboss.tools.maven.seam.feature</artifactId> 
-	<version>1.1.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.seam.feature</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-feature</packaging>
-</project>
+</project>
\ No newline at end of file
Index: features/org.jboss.tools.maven.seam.feature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.seam.feature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.seam.feature/feature.properties	(working copy)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2011 Red Hat, Inc. and others.
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 description=JBoss Maven Seam Integration
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: features/org.jboss.tools.maven.seam.feature/feature.xml
===================================================================
--- features/org.jboss.tools.maven.seam.feature/feature.xml	(revision 32612)
+++ features/org.jboss.tools.maven.seam.feature/feature.xml	(working copy)
@@ -2,7 +2,7 @@
 <feature
       id="org.jboss.tools.maven.seam.feature"
       label="%featureName"
-      version="1.1.0.qualifier"
+      version="1.2.0.qualifier"
       provider-name="%providerName"
       plugin="org.jboss.tools.maven.seam">
 
@@ -19,8 +19,8 @@
    </license>
 
    <requires>
-      <import feature="org.maven.ide.eclipse.feature" version="0.10.0" match="greaterOrEqual"/>
-      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.10.0" match="greaterOrEqual"/>
+      <import feature="org.eclipse.m2e.feature" version="1.0" match="greaterOrEqual"/>
+      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
Index: features/org.jboss.tools.maven.seam.feature/sourceTemplateFeature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.seam.feature/sourceTemplateFeature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.seam.feature/sourceTemplateFeature/feature.properties	(working copy)
@@ -12,7 +12,7 @@
 licenseURL=license.html
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: features/org.jboss.tools.maven.project.examples.feature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.project.examples.feature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.project.examples.feature/feature.properties	(working copy)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2011 Red Hat, Inc. and others.
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 description=JBoss Maven Project Examples
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: features/org.jboss.tools.maven.project.examples.feature/feature.xml
===================================================================
--- features/org.jboss.tools.maven.project.examples.feature/feature.xml	(revision 32612)
+++ features/org.jboss.tools.maven.project.examples.feature/feature.xml	(working copy)
@@ -2,7 +2,7 @@
 <feature
       id="org.jboss.tools.maven.project.examples.feature"
       label="%featureName"
-      version="1.0.0.qualifier"
+      version="1.2.0.qualifier"
       provider-name="%providerName"
       plugin="org.jboss.tools.maven.project.examples">
 
@@ -19,9 +19,9 @@
    </license>
 
    <requires>
-      <import feature="org.maven.ide.eclipse.feature" version="0.10.0" match="greaterOrEqual"/>
-      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.10.0" match="greaterOrEqual"/>
-      <import feature="org.jboss.tools.project.examples.feature" version="1.2.0" match="greaterOrEqual"/>
+      <import feature="org.eclipse.m2e.feature" version="1.0" match="greaterOrEqual"/>
+      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
+   	  <import feature="org.jboss.tools.project.examples.feature" version="1.2.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
Index: features/org.jboss.tools.maven.project.examples.feature/pom.xml
===================================================================
--- features/org.jboss.tools.maven.project.examples.feature/pom.xml	(revision 32612)
+++ features/org.jboss.tools.maven.project.examples.feature/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>features</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.features</groupId>
-	<artifactId>org.jboss.tools.maven.project.examples.feature</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.project.examples.feature</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-feature</packaging>
-</project>
+</project>
\ No newline at end of file
Index: features/org.jboss.tools.maven.cdi.feature/pom.xml
===================================================================
--- features/org.jboss.tools.maven.cdi.feature/pom.xml	(revision 32612)
+++ features/org.jboss.tools.maven.cdi.feature/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>features</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.features</groupId>
-	<artifactId>org.jboss.tools.maven.cdi.feature</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.cdi.feature</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-feature</packaging>
-</project>
+</project>
\ No newline at end of file
Index: features/org.jboss.tools.maven.cdi.feature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.cdi.feature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.cdi.feature/feature.properties	(working copy)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2011 Red Hat, Inc. and others.
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 description=JBoss Maven Seam Integration
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: features/org.jboss.tools.maven.cdi.feature/feature.xml
===================================================================
--- features/org.jboss.tools.maven.cdi.feature/feature.xml	(revision 32612)
+++ features/org.jboss.tools.maven.cdi.feature/feature.xml	(working copy)
@@ -2,7 +2,7 @@
 <feature
       id="org.jboss.tools.maven.cdi.feature"
       label="%featureName"
-      version="1.0.0.qualifier"
+      version="1.2.0.qualifier"
       provider-name="%providerName"
       plugin="org.jboss.tools.maven.cdi">
 
@@ -19,10 +19,10 @@
    </license>
 
    <requires>
-      <import feature="org.maven.ide.eclipse.feature" version="0.10.0" match="greaterOrEqual"/>
-      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.10.0" match="greaterOrEqual"/>
+      <import feature="org.eclipse.m2e.feature" version="1.0" match="greaterOrEqual"/>
+      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
    </requires>
-
+   
    <plugin
          id="org.jboss.tools.maven.cdi"
          download-size="0"
Index: features/org.jboss.tools.maven.jsf.feature/feature.xml
===================================================================
--- features/org.jboss.tools.maven.jsf.feature/feature.xml	(revision 32612)
+++ features/org.jboss.tools.maven.jsf.feature/feature.xml	(working copy)
@@ -2,7 +2,7 @@
 <feature
       id="org.jboss.tools.maven.jsf.feature"
       label="%featureName"
-      version="1.0.0.qualifier"
+      version="1.2.0.qualifier"
       provider-name="%providerName"
       plugin="org.jboss.tools.maven.jsf">
 
@@ -19,8 +19,8 @@
    </license>
 
    <requires>
-      <import feature="org.maven.ide.eclipse.feature" version="0.10.0" match="greaterOrEqual"/>
-      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.10.0" match="greaterOrEqual"/>
+      <import feature="org.eclipse.m2e.feature" version="1.0" match="greaterOrEqual"/>
+      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
    </requires>
 
    <plugin
Index: features/org.jboss.tools.maven.jsf.feature/pom.xml
===================================================================
--- features/org.jboss.tools.maven.jsf.feature/pom.xml	(revision 32612)
+++ features/org.jboss.tools.maven.jsf.feature/pom.xml	(working copy)
@@ -1,13 +1,14 @@
-<project
-xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion> 
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
 	<parent>
-	  <groupId>org.jboss.tools</groupId>
-	  <artifactId>org.jboss.tools.parent.pom</artifactId>
-	  <version>0.0.1-SNAPSHOT</version>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>features</artifactId>
+		<version>0.0.1-SNAPSHOT</version>
 	</parent>
 	<groupId>org.jboss.tools.maven.features</groupId>
-	<artifactId>org.jboss.tools.maven.jsf.feature</artifactId> 
-	<version>1.0.0-SNAPSHOT</version>
+	<artifactId>org.jboss.tools.maven.jsf.feature</artifactId>
+	<version>1.2.0-SNAPSHOT</version>
 	<packaging>eclipse-feature</packaging>
-</project>
+</project>
\ No newline at end of file
Index: features/org.jboss.tools.maven.jsf.feature/feature.properties
===================================================================
--- features/org.jboss.tools.maven.jsf.feature/feature.properties	(revision 32612)
+++ features/org.jboss.tools.maven.jsf.feature/feature.properties	(working copy)
@@ -1,5 +1,5 @@
 ###############################################################################
-# Copyright (c) 2011 Red Hat, Inc. and others.
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
 # All rights reserved. This program and the accompanying materials 
 # are made available under the terms of the Eclipse Public License v1.0
 # which accompanies this distribution, and is available at
@@ -27,7 +27,7 @@
 description=JBoss Maven Seam Integration
 
 # "copyright" property - text of the "Feature Update Copyright"
-copyright=Copyright (c) 2011 Red Hat, Inc. and others.\n\
+copyright=Copyright (c) 2010-2011 Red Hat, Inc. and others.\n\
 All rights reserved. This program and the accompanying materials\n\
 are made available under the terms of the Eclipse Public License v1.0\n\
 which accompanies this distribution, and is available at\n\
Index: docs/maven_reference_guide/pom.xml
===================================================================
--- docs/maven_reference_guide/pom.xml	(revision 32612)
+++ docs/maven_reference_guide/pom.xml	(working copy)
@@ -1,16 +1,15 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
-        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
 
-    <modelVersion>4.0.0</modelVersion>
+	<modelVersion>4.0.0</modelVersion>
 
-    <groupId>org.jboss.tools</groupId>
-    <artifactId>jboss-maven-integration-guide-${translation}</artifactId>
-    <version>1.0-SNAPSHOT</version>
-    <packaging>jdocbook</packaging>
-    <name>JBoss_Maven_Integration_Guide</name>
+	<groupId>org.jboss.tools</groupId>
+	<artifactId>jboss-maven-integration-guide-${translation}</artifactId>
+	<version>1.0-SNAPSHOT</version>
+	<packaging>jdocbook</packaging>
+	<name>JBoss_Maven_Integration_Guide</name>
 
-    <profiles>
+	<profiles>
 		<profile>
 			<id>release</id>
 			<properties>
@@ -20,16 +19,16 @@
 				<xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
 			</properties>
 		</profile>
-        <profile>
-            <id>releaseJBDS</id>
-            <properties>
-                <master>master_output.xml</master>
-                <xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release.xsl</xsl-single>
-                <xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release.xsl</xsl-chunked>
-                <xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
-                <cssdir>../../../documentation/jbosstools-jdocbook-style/src/main/com/css/</cssdir>
-            </properties>
-        </profile>
+		<profile>
+			<id>releaseJBDS</id>
+			<properties>
+				<master>master_output.xml</master>
+				<xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release.xsl</xsl-single>
+				<xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release.xsl</xsl-chunked>
+				<xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+				<cssdir>../../../documentation/jbosstools-jdocbook-style/src/main/com/css/</cssdir>
+			</properties>
+		</profile>
 		<profile>
 			<id>diffmk</id>
 			<properties>
@@ -40,113 +39,115 @@
 			</properties>
 		</profile>
 	</profiles>
-	
-    <build>
-        <plugins>
-            <plugin>
-                <groupId>org.jboss.maven.plugins</groupId>
-                <artifactId>maven-jdocbook-plugin</artifactId>
-	<version>2.1.0-200803311251UTC-MPJDOCBOOK-8</version>                
-                <extensions>true</extensions>
-                
-                <dependencies>
-                    <dependency>
-                        <groupId>com.jboss</groupId>
-                        <artifactId>jbossent-docbook-xslt</artifactId>
-                        <version>1.0.0</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>com.jboss</groupId>
-                        <artifactId>jbossent-jdocbook-style</artifactId>
-                        <version>1.0.0</version>
-                        <type>jdocbook-style</type>
-                    </dependency>
-		<dependency>
-                        <groupId>org.jboss</groupId>
-                        <artifactId>jbossorg-docbook-xslt</artifactId>
-                        <version>1.1.0</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.jboss</groupId>
-                        <artifactId>jbossorg-jdocbook-style</artifactId>
-                        <version>1.1.0</version>
-                        <type>jdocbook-style</type>
-                    </dependency>
-		    <dependency>					
-			<groupId>org.jboss.tools</groupId>
-			<artifactId>jbosstools-docbook-xslt</artifactId>
-			<version>1.0.0-SNAPSHOT</version>
-		    </dependency>
-                    <dependency> 
-                        <groupId>org.apache.xmlgraphics</groupId> 
-                        <artifactId>fop</artifactId> 
-                        <version>0.95</version> 
-                    </dependency> 
-                </dependencies>
-                
-                <configuration>
-                    <sourceDocumentName>${master}</sourceDocumentName>
-                    <sourceDirectory>${pom.basedir}/en-US</sourceDirectory>
-                    <imageResource>
-                        <directory>${pom.basedir}/en-US</directory>
-                        <includes>
-                            <include>images/**/*</include>
-                        </includes>
-                    </imageResource>
-                    <cssResource>
-                        <directory>${pom.basedir}/${cssdir}</directory>
-                    </cssResource>
-                    
-                    <formats>
-                         <format>
-                            <formatName>pdf</formatName>              
-                            <stylesheetResource>${xsl-pdf}</stylesheetResource>
-                            <finalName>${pom.name}.pdf</finalName>
-                        </format>
-                        <format>
-                            <formatName>html</formatName>
-                            <stylesheetResource>${xsl-chunked}</stylesheetResource>
-                            <finalName>index.html</finalName>
-                        </format>
-                        <format>
-                            <formatName>html_single</formatName>
-                            <stylesheetResource>${xsl-single}</stylesheetResource>
-                            <finalName>index.html</finalName>
-                        </format>
-                        <format>
-                            <formatName>eclipse</formatName>
-                            <stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/com/jboss/tools/eclipse.xsl</stylesheetResource>
-                            <finalName>index.html</finalName>
-                        </format>
-                    </formats><profile>
-			<id>release</id>
-			<properties>
-				<master>master_output.xml</master>
-				<xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release.xsl</xsl-single>
-				<xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release.xsl</xsl-chunked>
-				<xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
-			</properties>
-		</profile>
-                    
-                    <options>
-                        <xincludeSupported>true</xincludeSupported>
-                        <xmlTransformerType>saxon</xmlTransformerType>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.jboss.maven.plugins</groupId>
+				<artifactId>maven-jdocbook-plugin</artifactId>
+				<version>2.3.4</version>
+				<extensions>true</extensions>
+
+				<dependencies>
+					<dependency>
+						<groupId>com.jboss</groupId>
+						<artifactId>jbossent-docbook-xslt</artifactId>
+						<version>1.0.0</version>
+					</dependency>
+					<dependency>
+						<groupId>com.jboss</groupId>
+						<artifactId>jbossent-jdocbook-style</artifactId>
+						<version>1.0.0</version>
+						<type>jdocbook-style</type>
+					</dependency>
+					<dependency>
+						<groupId>org.jboss</groupId>
+						<artifactId>jbossorg-docbook-xslt</artifactId>
+						<version>1.1.0</version>
+					</dependency>
+					<dependency>
+						<groupId>org.jboss</groupId>
+						<artifactId>jbossorg-jdocbook-style</artifactId>
+						<version>1.1.0</version>
+						<type>jdocbook-style</type>
+					</dependency>
+					<dependency>
+						<groupId>org.jboss.tools</groupId>
+						<artifactId>jbosstools-docbook-xslt</artifactId>
+						<version>1.0.0-SNAPSHOT</version>
+					</dependency>
+					<dependency>
+						<groupId>org.apache.xmlgraphics</groupId>
+						<artifactId>fop</artifactId>
+						<version>0.95</version>
+					</dependency>
+				</dependencies>
+
+				<configuration>
+					<sourceDocumentName>${master}</sourceDocumentName>
+					<sourceDirectory>${pom.basedir}/en-US</sourceDirectory>
+					<imageResource>
+						<directory>${pom.basedir}/en-US</directory>
+						<includes>
+							<include>images/**/*</include>
+						</includes>
+					</imageResource>
+					<cssResource>
+						<directory>${pom.basedir}/${cssdir}</directory>
+					</cssResource>
+
+					<formats>
+						<format>
+							<formatName>pdf</formatName>
+							<stylesheetResource>${xsl-pdf}</stylesheetResource>
+							<finalName>${pom.name}.pdf</finalName>
+						</format>
+						<format>
+							<formatName>html</formatName>
+							<stylesheetResource>${xsl-chunked}</stylesheetResource>
+							<finalName>index.html</finalName>
+						</format>
+						<format>
+							<formatName>html_single</formatName>
+							<stylesheetResource>${xsl-single}</stylesheetResource>
+							<finalName>index.html</finalName>
+						</format>
+						<format>
+							<formatName>eclipse</formatName>
+							<stylesheetResource>file:${pom.basedir}/${stylesdir}/xslt/com/jboss/tools/eclipse.xsl</stylesheetResource>
+							<finalName>index.html</finalName>
+						</format>
+					</formats>
+					<profile>
+						<id>release</id>
+						<properties>
+							<master>master_output.xml</master>
+							<xsl-single>classpath:/xslt/com/jboss/tools/xhtml-single-release.xsl</xsl-single>
+							<xsl-chunked>classpath:/xslt/com/jboss/tools/xhtml-release.xsl</xsl-chunked>
+							<xsl-pdf>classpath:/xslt/com/jboss/tools/pdf.xsl</xsl-pdf>
+						</properties>
+					</profile>
+
+					<options>
+						<xincludeSupported>true</xincludeSupported>
+						<xmlTransformerType>saxon</xmlTransformerType>
                         <!-- needed for uri-resolvers; can be ommitted if using 'current' uri scheme -->
                         <!--     could also locate the docbook dependency and inspect its version... -->
-                        <docbookVersion>1.72.0</docbookVersion>
-                    </options>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
+						<docbookVersion>1.72.0</docbookVersion>
+						<useRelativeImageUris>true</useRelativeImageUris>
+					</options>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
 
-    <properties>
-        <stylesdir>../../../documentation/jbosstools-docbook-xslt/src/main/resources</stylesdir>
-        <xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single.xsl</xsl-single>
-        <xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml.xsl</xsl-chunked>
-        <xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
-        <cssdir>../../../documentation/jbosstools-jdocbook-style/src/main/org/css/</cssdir>
-	<master>master.xml</master>
-        <translation>en-US</translation>
-    </properties> 
+	<properties>
+		<stylesdir>../../../documentation/jbosstools-docbook-xslt/src/main/resources</stylesdir>
+		<xsl-single>classpath:/xslt/org/jboss/tools/xhtml-single.xsl</xsl-single>
+		<xsl-chunked>classpath:/xslt/org/jboss/tools/xhtml.xsl</xsl-chunked>
+		<xsl-pdf>classpath:/xslt/org/jboss/tools/pdf.xsl</xsl-pdf>
+		<cssdir>../../../documentation/jbosstools-jdocbook-style/src/main/org/css/</cssdir>
+		<master>master.xml</master>
+		<translation>en-US</translation>
+	</properties>
 </project>
