Author: snjeza
Date: 2011-04-01 18:45:02 -0400 (Fri, 01 Apr 2011)
New Revision: 30237
Added:
trunk/maven/plugins/org.jboss.tools.maven.cdi/lifecycle-mapping-metadata.xml
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/CDILifecycleMapping.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/xpl/
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/xpl/ProjectUpdater.java
trunk/maven/plugins/org.jboss.tools.maven.hibernate/lifecycle-mapping-metadata.xml
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/HibernateLifecycleMapping.java
trunk/maven/plugins/org.jboss.tools.maven.jsf/lifecycle-mapping-metadata.xml
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/JSFLifecycleMapping.java
trunk/maven/plugins/org.jboss.tools.maven.portlet/lifecycle-mapping-metadata.xml
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/PortletLifecycleMapping.java
trunk/maven/plugins/org.jboss.tools.maven.seam/lifecycle-mapping-metadata.xml
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/SeamLifecycleMapping.java
Removed:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java
Modified:
trunk/maven/features/org.jboss.tools.maven.project.examples.feature/feature.xml
trunk/maven/features/org.jboss.tools.maven.project.examples.feature/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.cdi/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.cdi/build.properties
trunk/maven/plugins/org.jboss.tools.maven.cdi/plugin.properties
trunk/maven/plugins/org.jboss.tools.maven.cdi/plugin.xml
trunk/maven/plugins/org.jboss.tools.maven.cdi/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/Messages.java
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.core/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.core/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/IJBossMavenConstants.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/Messages.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/ProjectFacetsFactoryTester.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDataModelProvider.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDelegate.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperation.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperationConfig.java
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderUninstallOperation.java
trunk/maven/plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.hibernate/build.properties
trunk/maven/plugins/org.jboss.tools.maven.hibernate/plugin.xml
trunk/maven/plugins/org.jboss.tools.maven.hibernate/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/MavenHibernateActivator.java
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.jsf/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.jsf/build.properties
trunk/maven/plugins/org.jboss.tools.maven.jsf/plugin.xml
trunk/maven/plugins/org.jboss.tools.maven.jsf/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/Messages.java
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.portlet/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.portlet/build.properties
trunk/maven/plugins/org.jboss.tools.maven.portlet/plugin.xml
trunk/maven/plugins/org.jboss.tools.maven.portlet/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/MavenPortletActivator.java
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/Messages.java
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardPage.java
trunk/maven/plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.seam/build.properties
trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.xml
trunk/maven/plugins/org.jboss.tools.maven.seam/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/FixClasspathConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
trunk/maven/plugins/org.jboss.tools.maven.ui/META-INF/MANIFEST.MF
trunk/maven/plugins/org.jboss.tools.maven.ui/pom.xml
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/DependencyEditingSupport.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/ExclusionEditingSupport.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/MavenUserLibraryProviderInstallPanel.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
Log:
JBIDE-8536 Upgrade JBoss Maven Integration feature to use m2eclipse 0.13.x
Modified: trunk/maven/features/org.jboss.tools.maven.project.examples.feature/feature.xml
===================================================================
---
trunk/maven/features/org.jboss.tools.maven.project.examples.feature/feature.xml 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/features/org.jboss.tools.maven.project.examples.feature/feature.xml 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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">
Modified: trunk/maven/features/org.jboss.tools.maven.project.examples.feature/pom.xml
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.project.examples.feature/pom.xml 2011-04-01
22:42:31 UTC (rev 30236)
+++ trunk/maven/features/org.jboss.tools.maven.project.examples.feature/pom.xml 2011-04-01
22:45:02 UTC (rev 30237)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.maven.features</groupId>
<artifactId>org.jboss.tools.maven.project.examples.feature</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-feature</packaging>
</project>
\ No newline at end of file
Modified: trunk/maven/plugins/org.jboss.tools.maven.cdi/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/META-INF/MANIFEST.MF 2011-04-01 22:42:31
UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.cdi/META-INF/MANIFEST.MF 2011-04-01 22:45:02
UTC (rev 30237)
@@ -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,
Modified: trunk/maven/plugins/org.jboss.tools.maven.cdi/build.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/build.properties 2011-04-01 22:42:31 UTC
(rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.cdi/build.properties 2011-04-01 22:45:02 UTC
(rev 30237)
@@ -8,4 +8,5 @@
about.ini,\
about.mappings,\
about.properties,\
- jboss_about.png
+ jboss_about.png,\
+ lifecycle-mapping-metadata.xml
Added: trunk/maven/plugins/org.jboss.tools.maven.cdi/lifecycle-mapping-metadata.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/lifecycle-mapping-metadata.xml
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.cdi/lifecycle-mapping-metadata.xml 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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
Modified: trunk/maven/plugins/org.jboss.tools.maven.cdi/plugin.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/plugin.properties 2011-04-01 22:42:31
UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.cdi/plugin.properties 2011-04-01 22:45:02
UTC (rev 30237)
@@ -1,3 +1,4 @@
Bundle-Vendor = JBoss by Red Hat
Bundle-Name = JBoss Maven CDI Configurator
-CDI_Project_configurator = CDI Project configurator
+CDI_Project_configurator_WTP = CDI Project configurator (WTP)
+CDI_Project_configurator_JDT = CDI Project configurator (JDT)
Modified: trunk/maven/plugins/org.jboss.tools.maven.cdi/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/plugin.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.cdi/plugin.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -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>
Modified: trunk/maven/plugins/org.jboss.tools.maven.cdi/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.cdi/pom.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.cdi/pom.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.cdi</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Added:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/CDILifecycleMapping.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/CDILifecycleMapping.java
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/CDILifecycleMapping.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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 {
+
+}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/MavenCDIActivator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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;
Modified:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/Messages.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/Messages.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/Messages.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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;
@@ -2,2 +12,7 @@
+/**
+ *
+ * @author snjeza
+ *
+ */
public class Messages extends NLS {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.cdi/src/org/jboss/tools/maven/cdi/configurators/CDIProjectConfigurator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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 org.apache.maven.project.MavenProject;
@@ -6,6 +16,10 @@
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.wst.common.componentcore.ModuleCoreNature;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -14,15 +28,16 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
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$
Modified: trunk/maven/plugins/org.jboss.tools.maven.core/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.core/META-INF/MANIFEST.MF 2011-04-01
22:42:31 UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.core/META-INF/MANIFEST.MF 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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,23 @@
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="0.13.0";visibility:=reexport,
+ org.eclipse.m2e.maven.runtime;bundle-version="0.13.0";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="0.13.0";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="0.13.0";visibility:=reexport,
org.eclipse.core.expressions,
- org.maven.ide.eclipse.wtp;bundle-version="0.10.0";visibility:=reexport
+ org.slf4j.api;bundle-version="1.5.11";visibility:=reexport,
+ org.maven.ide.eclipse.wtp;bundle-version="0.13.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
Modified: trunk/maven/plugins/org.jboss.tools.maven.core/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.core/pom.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.core/pom.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.core</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/IJBossMavenConstants.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/IJBossMavenConstants.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/IJBossMavenConstants.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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$
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/MavenCoreActivator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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,8 +15,6 @@
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;
@@ -45,24 +53,24 @@
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.core.IMavenConstants;
+import org.eclipse.m2e.core.embedder.IMavenConfiguration;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.project.IProjectConfigurationManager;
+import org.eclipse.m2e.core.project.ResolverConfiguration;
+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;
/**
@@ -283,7 +291,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()) {
@@ -314,56 +322,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$
@@ -538,7 +502,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;
}
@@ -548,9 +512,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);
@@ -583,33 +547,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)) {
@@ -625,7 +589,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) {
@@ -650,7 +614,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) {
@@ -782,4 +746,21 @@
plugin.setConfiguration(configuration);
build.getPlugins().add(plugin);
}
+
+ public static PomResourceImpl loadResource(IFile pomFile) throws CoreException {
+ String path = pomFile.getFullPath().toOSString();
+ URI uri = URI.createFileURI(path);
+ try {
+ PomResourceFactoryImpl factory = new PomResourceFactoryImpl();
+ PomResourceImpl resource = (PomResourceImpl) factory.createResource(uri);
+ resource.load(Collections.EMPTY_MAP);
+ return resource;
+
+ } 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));
+ }
+ }
}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/Messages.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/Messages.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/Messages.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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;
@@ -2,2 +12,6 @@
+/**
+ * @author snjeza
+ *
+ */
public class Messages extends NLS {
Deleted:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,32 +0,0 @@
-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;
-
-public class PluginUpdater extends ProjectUpdater {
-
- private static final PomFactory POM_FACTORY = PomFactory.eINSTANCE;
- private Plugin plugin;
-
- public PluginUpdater(Plugin plugin) {
- this.plugin = plugin;
- }
-
- public void update(Model model) {
- Build build = model.getBuild();
- if(build==null) {
- build = POM_FACTORY.createBuild();
- model.setBuild(build);
- }
- org.maven.ide.components.pom.Plugin newPlugin = POM_FACTORY.createPlugin();
- newPlugin.setArtifactId(plugin.getArtifactId());
- newPlugin.setGroupId(plugin.getGroupId());
- newPlugin.setVersion(plugin.getVersion());
- newPlugin.setExtensions(plugin.getExtensions());
- // FIXME
- }
- }
Added:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/PluginUpdater.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -0,0 +1,45 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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.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;
+ private Plugin plugin;
+
+ public PluginUpdater(Plugin plugin) {
+ this.plugin = plugin;
+ }
+
+ public void update(Model model) {
+ Build build = model.getBuild();
+ if(build==null) {
+ build = POM_FACTORY.createBuild();
+ model.setBuild(build);
+ }
+ org.eclipse.m2e.model.edit.pom.Plugin newPlugin = POM_FACTORY.createPlugin();
+ newPlugin.setArtifactId(plugin.getArtifactId());
+ newPlugin.setGroupId(plugin.getGroupId());
+ newPlugin.setVersion(plugin.getVersion());
+ newPlugin.setExtensions(plugin.getExtensions());
+ // FIXME
+ }
+ }
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/ProjectFacetsFactoryTester.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/ProjectFacetsFactoryTester.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/ProjectFacetsFactoryTester.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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,
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDataModelProvider.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDataModelProvider.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDataModelProvider.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,5 +1,5 @@
/*************************************************************************************
- * Copyright (c) 2009 JBoss by Red Hat and others.
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDelegate.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDelegate.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/internal/project/facet/MavenFacetInstallDelegate.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,13 +1,19 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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.core.IMavenConstants;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
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.IJBossMavenConstants;
import org.jboss.tools.maven.core.MavenCoreActivator;
-import org.jboss.tools.maven.core.IJBossMavenConstants;
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$
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperation.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperation.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperation.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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,29 @@
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.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+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.osgi.util.NLS;
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 +60,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 +123,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));
+ }
+ }
}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperationConfig.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperationConfig.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderInstallOperationConfig.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,8 +1,22 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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 {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderUninstallOperation.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderUninstallOperation.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/libprov/MavenLibraryProviderUninstallOperation.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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,14 +15,16 @@
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
-
}
}
Added:
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/xpl/ProjectUpdater.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/xpl/ProjectUpdater.java
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.core/src/org/jboss/tools/maven/core/xpl/ProjectUpdater.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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);
+
+}
Modified: trunk/maven/plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF 2011-04-01
22:42:31 UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.hibernate/META-INF/MANIFEST.MF 2011-04-01
22:45:02 UTC (rev 30237)
@@ -9,7 +9,6 @@
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,
Modified: trunk/maven/plugins/org.jboss.tools.maven.hibernate/build.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.hibernate/build.properties 2011-04-01
22:42:31 UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.hibernate/build.properties 2011-04-01
22:45:02 UTC (rev 30237)
@@ -8,4 +8,5 @@
about.ini,\
about.mappings,\
about.properties,\
- jboss_about.png
+ jboss_about.png,\
+ lifecycle-mapping-metadata.xml
Added: trunk/maven/plugins/org.jboss.tools.maven.hibernate/lifecycle-mapping-metadata.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.hibernate/lifecycle-mapping-metadata.xml
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.hibernate/lifecycle-mapping-metadata.xml 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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
Modified: trunk/maven/plugins/org.jboss.tools.maven.hibernate/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.hibernate/plugin.xml 2011-04-01 22:42:31 UTC
(rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.hibernate/plugin.xml 2011-04-01 22:45:02 UTC
(rev 30237)
@@ -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>
Modified: trunk/maven/plugins/org.jboss.tools.maven.hibernate/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.hibernate/pom.xml 2011-04-01 22:42:31 UTC
(rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.hibernate/pom.xml 2011-04-01 22:45:02 UTC
(rev 30237)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.hibernate</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Added:
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/HibernateLifecycleMapping.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/HibernateLifecycleMapping.java
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/HibernateLifecycleMapping.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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 {
+
+}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/MavenHibernateActivator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/MavenHibernateActivator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/MavenHibernateActivator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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;
Modified:
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.hibernate/src/org/jboss/tools/maven/hibernate/configurators/HibernateProjectConfigurator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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.configurators;
import java.util.ArrayList;
@@ -5,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;
@@ -14,15 +23,20 @@
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;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class HibernateProjectConfigurator extends AbstractProjectConfigurator {
private static final String HIBERNATE_GROUP_ID = "org.hibernate";
//$NON-NLS-1$
Modified: trunk/maven/plugins/org.jboss.tools.maven.jsf/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/META-INF/MANIFEST.MF 2011-04-01 22:42:31
UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.jsf/META-INF/MANIFEST.MF 2011-04-01 22:45:02
UTC (rev 30237)
@@ -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,
Modified: trunk/maven/plugins/org.jboss.tools.maven.jsf/build.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/build.properties 2011-04-01 22:42:31 UTC
(rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.jsf/build.properties 2011-04-01 22:45:02 UTC
(rev 30237)
@@ -8,4 +8,5 @@
about.ini,\
about.mappings,\
about.properties,\
- jboss_about.png
+ jboss_about.png,\
+ lifecycle-mapping-metadata.xml
Added: trunk/maven/plugins/org.jboss.tools.maven.jsf/lifecycle-mapping-metadata.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/lifecycle-mapping-metadata.xml
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.jsf/lifecycle-mapping-metadata.xml 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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
Modified: trunk/maven/plugins/org.jboss.tools.maven.jsf/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/plugin.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.jsf/plugin.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -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>
Modified: trunk/maven/plugins/org.jboss.tools.maven.jsf/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.jsf/pom.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.jsf/pom.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.jsf</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Added:
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/JSFLifecycleMapping.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/JSFLifecycleMapping.java
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/JSFLifecycleMapping.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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 {
+
+}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/MavenJSFActivator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/Messages.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/Messages.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/Messages.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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.osgi.util.NLS;
@@ -2,2 +12,7 @@
+/**
+ *
+ * @author snjeza
+ *
+ */
public class Messages extends NLS {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.jsf/src/org/jboss/tools/maven/jsf/configurators/JSFProjectConfigurator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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.configurators;
import org.apache.maven.project.MavenProject;
@@ -5,6 +15,10 @@
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
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.ModuleCoreNature;
import org.eclipse.wst.common.frameworks.datamodel.IDataModel;
import org.eclipse.wst.common.project.facet.core.IFacetedProject;
@@ -14,13 +28,14 @@
import org.jboss.tools.maven.core.IJBossMavenConstants;
import
org.jboss.tools.maven.core.internal.project.facet.MavenFacetInstallDataModelProvider;
import org.jboss.tools.maven.jsf.MavenJSFActivator;
+import org.jboss.tools.maven.jsf.Messages;
import org.jboss.tools.maven.ui.Activator;
-import org.jboss.tools.maven.jsf.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 JSFProjectConfigurator extends AbstractProjectConfigurator {
private static final String JSF_API_GROUP_ID = "javax.faces"; //$NON-NLS-1$
Modified: trunk/maven/plugins/org.jboss.tools.maven.portlet/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.portlet/META-INF/MANIFEST.MF 2011-04-01
22:42:31 UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.portlet/META-INF/MANIFEST.MF 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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
Modified: trunk/maven/plugins/org.jboss.tools.maven.portlet/build.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.portlet/build.properties 2011-04-01 22:42:31
UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.portlet/build.properties 2011-04-01 22:45:02
UTC (rev 30237)
@@ -8,4 +8,5 @@
about.ini,\
about.mappings,\
about.properties,\
- jboss_about.png
+ jboss_about.png,\
+ lifecycle-mapping-metadata.xml
Added: trunk/maven/plugins/org.jboss.tools.maven.portlet/lifecycle-mapping-metadata.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.portlet/lifecycle-mapping-metadata.xml
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.portlet/lifecycle-mapping-metadata.xml 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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
Modified: trunk/maven/plugins/org.jboss.tools.maven.portlet/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.portlet/plugin.xml 2011-04-01 22:42:31 UTC
(rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.portlet/plugin.xml 2011-04-01 22:45:02 UTC
(rev 30237)
@@ -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>
Modified: trunk/maven/plugins/org.jboss.tools.maven.portlet/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.portlet/pom.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.portlet/pom.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.portlet</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified:
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/MavenPortletActivator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/MavenPortletActivator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/MavenPortletActivator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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;
Modified:
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/Messages.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/Messages.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/Messages.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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.osgi.util.NLS;
@@ -2,2 +12,7 @@
+/**
+ *
+ * @author snjeza
+ *
+ */
public class Messages extends NLS {
Added:
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/PortletLifecycleMapping.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/PortletLifecycleMapping.java
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/PortletLifecycleMapping.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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 {
+
+}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.portlet/src/org/jboss/tools/maven/portlet/configurators/PortletProjectConfigurator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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$
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.project.examples/META-INF/MANIFEST.MF 2011-04-01
22:45:02 UTC (rev 30237)
@@ -10,7 +10,8 @@
org.jboss.tools.maven.core,
org.jboss.tools.project.examples,
org.eclipse.ui.ide,
- org.maven.ide.eclipse.archetype_common;bundle-version="[0.10.0,0.13.0)"
+ org.eclipse.m2e.archetype.common;bundle-version="0.13.0",
+ org.eclipse.m2e.core.ui;bundle-version="0.13.0"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-Vendor: %Bundle-Vendor
Modified:
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/ImportMavenProjectExample.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,5 +1,5 @@
/*************************************************************************************
- * Copyright (c) 2008-2010 JBoss by Red Hat and others.
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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
@@ -8,7 +8,6 @@
* Contributors:
* JBoss by Red Hat - Initial implementation.
************************************************************************************/
-
package org.jboss.tools.maven.project.examples;
import java.io.File;
@@ -36,21 +35,21 @@
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
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.m2e.core.ui.internal.console.MavenConsole;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.progress.IProgressConstants;
import org.jboss.tools.project.examples.job.ProjectExamplesJob;
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.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.LocalProjectScanner;
-import org.maven.ide.eclipse.project.MavenProjectInfo;
-import org.maven.ide.eclipse.project.ProjectImportConfiguration;
/**
* @author snjeza
@@ -186,7 +185,7 @@
plugin.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;
@@ -223,9 +222,8 @@
.toFile();
MavenPlugin mavenPlugin = MavenPlugin.getDefault();
MavenModelManager modelManager = mavenPlugin.getMavenModelManager();
- MavenConsole console = mavenPlugin.getConsole();
return new LocalProjectScanner(root, folder.getAbsolutePath(), false,
- modelManager, console);
+ modelManager);
}
private static Shell getActiveShell() {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizard.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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.project.examples.wizard;
import java.io.File;
@@ -12,28 +22,22 @@
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
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.IJobChangeEvent;
-import org.eclipse.core.runtime.jobs.Job;
-import org.eclipse.core.runtime.jobs.JobChangeAdapter;
-import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
-import org.eclipse.swt.widgets.Display;
+import org.eclipse.m2e.core.MavenPlugin;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import org.eclipse.m2e.core.ui.internal.MavenImages;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
-import org.eclipse.ui.progress.IProgressConstants;
-import org.jboss.tools.project.examples.job.ProjectExamplesJob;
import org.jboss.tools.project.examples.model.Project;
-import org.maven.ide.eclipse.MavenImages;
-import org.maven.ide.eclipse.MavenPlugin;
-import org.maven.ide.eclipse.actions.OpenMavenConsoleAction;
-import org.maven.ide.eclipse.core.Messages;
-import org.maven.ide.eclipse.project.ProjectImportConfiguration;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class ArchetypeExamplesWizard extends Wizard implements INewWizard {
private Project projectDescription;
Modified:
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardPage.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardPage.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardPage.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,12 +1,27 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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.project.examples.wizard;
import org.apache.maven.archetype.catalog.Archetype;
+import org.eclipse.m2e.core.project.ProjectImportConfiguration;
+import
org.eclipse.m2e.core.ui.internal.wizards.MavenProjectWizardArchetypeParametersPage;
import org.eclipse.swt.widgets.Composite;
import org.jboss.tools.project.examples.model.ArchetypeModel;
import org.jboss.tools.project.examples.model.Project;
-import org.maven.ide.eclipse.project.ProjectImportConfiguration;
-import org.maven.ide.eclipse.wizards.MavenProjectWizardArchetypeParametersPage;
+/**
+ *
+ * @author snjeza
+ *
+ */
public class ArchetypeExamplesWizardPage extends
MavenProjectWizardArchetypeParametersPage {
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF 2011-04-01
22:42:31 UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/META-INF/MANIFEST.MF 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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,
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/build.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/build.properties 2011-04-01 22:42:31
UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/build.properties 2011-04-01 22:45:02
UTC (rev 30237)
@@ -9,4 +9,5 @@
about.properties,\
jboss_about.png,\
poms/,\
- plugin.properties
+ plugin.properties,\
+ lifecycle-mapping-metadata.xml
Added: trunk/maven/plugins/org.jboss.tools.maven.seam/lifecycle-mapping-metadata.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/lifecycle-mapping-metadata.xml
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/lifecycle-mapping-metadata.xml 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/plugin.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -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="%Seam_Project_configurator" priority="300"/>
+ name="%Seam_Project_configurator"
+ secondaryTo="org.eclipse.m2e.jdt.javaConfigurator"/>
</extension>
Modified: trunk/maven/plugins/org.jboss.tools.maven.seam/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.seam/pom.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.seam/pom.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.seam</artifactId>
- <version>1.1.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/MavenSeamActivator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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,22 @@
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.core.IMavenConstants;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
+import org.eclipse.m2e.core.project.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 +65,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;
/**
@@ -285,9 +293,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 +329,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);
@@ -567,12 +561,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 +595,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 +624,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 +634,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 +642,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 +712,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 +738,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 +758,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) {
@@ -982,6 +997,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 +1017,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 +1084,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 +1170,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);
+ }
+ }
+
}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/ParentAdder.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,10 +1,25 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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;
Added:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/SeamLifecycleMapping.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/SeamLifecycleMapping.java
(rev 0)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/SeamLifecycleMapping.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -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 {
+
+}
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/FixClasspathConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/FixClasspathConfigurator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/FixClasspathConfigurator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,5 +1,5 @@
/*************************************************************************************
- * Copyright (c) 2008-2010 JBoss by Red Hat and others.
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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
@@ -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 {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.seam/src/org/jboss/tools/maven/seam/configurators/SeamProjectConfigurator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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.MavenPlugin;
+import org.eclipse.m2e.core.core.IMavenConstants;
+import org.eclipse.m2e.core.project.IMavenProjectFacade;
+import org.eclipse.m2e.core.project.MavenProjectChangedEvent;
+import org.eclipse.m2e.core.project.MavenProjectManager;
+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$
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/META-INF/MANIFEST.MF 2011-04-01 22:42:31
UTC (rev 30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/META-INF/MANIFEST.MF 2011-04-01 22:45:02
UTC (rev 30237)
@@ -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,
Modified: trunk/maven/plugins/org.jboss.tools.maven.ui/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.ui/pom.xml 2011-04-01 22:42:31 UTC (rev
30236)
+++ trunk/maven/plugins/org.jboss.tools.maven.ui/pom.xml 2011-04-01 22:45:02 UTC (rev
30237)
@@ -8,6 +8,6 @@
</parent>
<groupId>org.jboss.tools.maven.plugins</groupId>
<artifactId>org.jboss.tools.maven.ui</artifactId>
- <version>1.0.0-SNAPSHOT</version>
+ <version>1.2.0-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
\ No newline at end of file
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Activator.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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.util.ArrayList;
@@ -5,17 +15,10 @@
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.runtime.IStatus;
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.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;
/**
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/Messages.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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;
@@ -2,2 +12,7 @@
+/**
+ *
+ * @author snjeza
+ *
+ */
public class Messages extends NLS {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/DependencyEditingSupport.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/DependencyEditingSupport.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/DependencyEditingSupport.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,14 +1,28 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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$
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/ExclusionEditingSupport.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/ExclusionEditingSupport.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/ExclusionEditingSupport.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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;
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/MavenUserLibraryProviderInstallPanel.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/MavenUserLibraryProviderInstallPanel.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/libprov/MavenUserLibraryProviderInstallPanel.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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 {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/internal/project/facet/MavenFacetInstallPage.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,10 +1,15 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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.core.IMavenConstants;
+import org.eclipse.m2e.core.embedder.MavenModelManager;
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 {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencePage.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,3 +1,13 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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 {
Modified:
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java
===================================================================
---
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/plugins/org.jboss.tools.maven.ui/src/org/jboss/tools/maven/ui/preferences/ConfiguratorPreferencesInitializer.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,11 +1,25 @@
+/*************************************************************************************
+ * Copyright (c) 2009-2011 JBoss by Red Hat 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 {
Modified: trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2011-04-01
22:42:31 UTC (rev 30236)
+++ trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/META-INF/MANIFEST.MF 2011-04-01
22:45:02 UTC (rev 30237)
@@ -27,21 +27,11 @@
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,
Modified:
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java
===================================================================
---
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2011-04-01
22:42:31 UTC (rev 30236)
+++
trunk/maven/tests/org.jboss.tools.maven.ui.bot.test/src/org/jboss/tools/maven/ui/bot/test/CreateMavenizedSeamProjectTest.java 2011-04-01
22:45:02 UTC (rev 30237)
@@ -1,5 +1,5 @@
/*************************************************************************************
- * Copyright (c) 2008-2009 JBoss by Red Hat and others.
+ * Copyright (c) 2008-2011 JBoss by Red Hat 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
@@ -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;
@@ -45,12 +44,12 @@
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.core.IMavenConstants;
import org.eclipse.swt.widgets.Display;
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;
@@ -93,12 +92,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