[jbosstools-commits] JBoss Tools SVN: r39950 - in trunk/maven: features/org.jboss.tools.maven.gwt.feature and 9 other directories.

jbosstools-commits at lists.jboss.org jbosstools-commits at lists.jboss.org
Fri Mar 30 21:41:50 EDT 2012


Author: dgolovin
Date: 2012-03-30 21:41:48 -0400 (Fri, 30 Mar 2012)
New Revision: 39950

Added:
   trunk/maven/features/org.jboss.tools.maven.gwt.feature/
   trunk/maven/features/org.jboss.tools.maven.gwt.feature/.project
   trunk/maven/features/org.jboss.tools.maven.gwt.feature/build.properties
   trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.properties
   trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.xml
   trunk/maven/features/org.jboss.tools.maven.gwt.feature/license.html
   trunk/maven/features/org.jboss.tools.maven.gwt.feature/pom.xml
   trunk/maven/plugins/org.jboss.tools.maven.gwt/
   trunk/maven/plugins/org.jboss.tools.maven.gwt/.classpath
   trunk/maven/plugins/org.jboss.tools.maven.gwt/.project
   trunk/maven/plugins/org.jboss.tools.maven.gwt/META-INF/
   trunk/maven/plugins/org.jboss.tools.maven.gwt/META-INF/MANIFEST.MF
   trunk/maven/plugins/org.jboss.tools.maven.gwt/about.html
   trunk/maven/plugins/org.jboss.tools.maven.gwt/about.mappings
   trunk/maven/plugins/org.jboss.tools.maven.gwt/about.properties
   trunk/maven/plugins/org.jboss.tools.maven.gwt/build.properties
   trunk/maven/plugins/org.jboss.tools.maven.gwt/lifecycle-mapping-metadata.xml
   trunk/maven/plugins/org.jboss.tools.maven.gwt/plugin.properties
   trunk/maven/plugins/org.jboss.tools.maven.gwt/plugin.xml
   trunk/maven/plugins/org.jboss.tools.maven.gwt/pom.xml
   trunk/maven/plugins/org.jboss.tools.maven.gwt/src/
   trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/
   trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/
   trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/
   trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/
   trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/
   trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/GWTProjectConfigurator.java
   trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/MavenGWTPlugin.java
Log:
https://issues.jboss.org/browse/JBIDE-11244 Auto-discover all the modules and add them to the configuration on GWT project import
added feature and plugin for GWT configurator


Added: trunk/maven/features/org.jboss.tools.maven.gwt.feature/.project
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.gwt.feature/.project	                        (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.gwt.feature/.project	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.jboss.tools.maven.gwt.feature</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.pde.FeatureBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.FeatureNature</nature>
+	</natures>
+</projectDescription>

Added: trunk/maven/features/org.jboss.tools.maven.gwt.feature/build.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.gwt.feature/build.properties	                        (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.gwt.feature/build.properties	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,3 @@
+bin.includes = feature.xml,\
+               feature.properties,\
+               license.html

Added: trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.properties
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.properties	                        (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.properties	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,54 @@
+###############################################################################
+# Copyright (c) 2010-2011 Red Hat, Inc. and others.
+# All rights reserved. This program and the accompanying materials 
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     JBoss by Red Hat - Initial implementation.
+##############################################################################
+# feature.properties
+# contains externalized strings for feature.xml
+# "%foo" in feature.xml corresponds to the key "foo" in this file
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file should be translated.
+
+# "featureName" property - name of the feature
+featureName=JBoss Maven GWT Configurator
+
+# "providerName" property - name of the company that provides the feature
+providerName=JBoss by Red Hat
+
+# "updateSiteName" property - label for the update site
+updateSiteName=JBossTools Update Site
+
+# "description" property - description of the feature
+description=JBoss Maven GWT Configurator
+
+# "copyright" property - text of the "Feature Update Copyright"
+copyright=Copyright (c) 2010-2012 Red Hat, Inc. and others.\n\
+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\n\
+Contributors\:\n\
+JBoss by Red Hat - Initial implementation.
+ ############### end of copyright property ####################################
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# START NON-TRANSLATABLE
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=Red Hat, Inc. licenses these features and plugins to you under \
+certain open source licenses (or aggregations of such licenses), which \
+in a particular case may include the Eclipse Public License, the GNU \
+Lesser General Public License, and/or certain other open source \
+licenses. For precise licensing details, consult the corresponding \
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive, \
+Raleigh NC 27606 USA.
+# END NON-TRANSLATABLE
+########### end of license property ##########################################

Added: trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.xml
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.xml	                        (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.gwt.feature/feature.xml	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+      id="org.jboss.tools.maven.gwt.feature"
+      label="%featureName"
+      version="1.3.0.qualifier"
+      provider-name="%providerName"
+      plugin="org.jboss.tools.maven.gwt">
+
+   <description>
+      %description
+   </description>
+
+   <copyright>
+      %copyright
+   </copyright>
+
+   <license url="%licenseURL">
+      %license
+   </license>
+
+   <requires>
+      <import feature="org.eclipse.m2e.feature" version="0.13.0" match="greaterOrEqual"/>
+      <import feature="org.maven.ide.eclipse.wtp.feature" version="0.13.0" match="greaterOrEqual"/>
+   </requires>
+
+   <plugin
+         id="org.jboss.tools.maven.gwt"
+         download-size="0"
+         install-size="0"
+         version="0.0.0"
+         unpack="false"/>
+
+</feature>

Added: trunk/maven/features/org.jboss.tools.maven.gwt.feature/license.html
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.gwt.feature/license.html	                        (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.gwt.feature/license.html	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,14 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html>
+
+<body>
+<p>Red Hat, Inc. licenses these features and plugins to you under
+certain open source licenses (or aggregations of such licenses), which
+in a particular case may include the Eclipse Public License, the GNU
+Lesser General Public License, and/or certain other open source
+licenses. For precise licensing details, consult the corresponding
+source code, or contact Red Hat Legal Affairs, 1801 Varsity Drive,
+Raleigh NC 27606 USA.
+</p>
+</body>
+</html>
\ No newline at end of file

Added: trunk/maven/features/org.jboss.tools.maven.gwt.feature/pom.xml
===================================================================
--- trunk/maven/features/org.jboss.tools.maven.gwt.feature/pom.xml	                        (rev 0)
+++ trunk/maven/features/org.jboss.tools.maven.gwt.feature/pom.xml	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>features</artifactId>
+		<version>1.3.0-SNAPSHOT</version>
+	</parent>
+	<groupId>org.jboss.tools.maven.features</groupId>
+	<artifactId>org.jboss.tools.maven.gwt.feature</artifactId>
+	
+	<packaging>eclipse-feature</packaging>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.eclipse.tycho.extras</groupId>
+				<artifactId>tycho-source-feature-plugin</artifactId>
+				<version>${tychoExtrasVersion}</version>
+				<executions>
+					<execution>
+						<id>source-feature</id>
+						<phase>package</phase>
+						<goals>
+							<goal>source-feature</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+			<plugin>
+				<groupId>org.eclipse.tycho</groupId>
+				<artifactId>tycho-p2-plugin</artifactId>
+				<version>${tychoVersion}</version>
+				<executions>
+					<execution>
+						<id>attached-p2-metadata</id>
+						<phase>package</phase>
+						<goals>
+							<goal>p2-metadata</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
+		</plugins>
+	</build>
+</project>

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/.classpath
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/.classpath	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/.classpath	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+	<classpathentry kind="src" path="src"/>
+	<classpathentry kind="output" path="bin"/>
+</classpath>

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/.project
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/.project	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/.project	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>org.jboss.tools.maven.gwt</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.ManifestBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.pde.SchemaBuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.pde.PluginNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+	</natures>
+</projectDescription>

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/META-INF/MANIFEST.MF
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/META-INF/MANIFEST.MF	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/META-INF/MANIFEST.MF	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,22 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.jboss.tools.maven.gwt;singleton:=true
+Bundle-Version: 1.3.0.qualifier
+Bundle-Activator: org.jboss.tools.maven.gwt.MavenGWTPlugin
+Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
+ org.eclipse.m2e.core;bundle-version="1.0.200",
+ org.eclipse.core.resources;bundle-version="3.7.100",
+ com.google.gwt.eclipse.core;bundle-version="2.5.0",
+ org.eclipse.jdt.core;bundle-version="3.7.0",
+ com.google.gdt.eclipse.maven.e37;bundle-version="2.5.2",
+ org.slf4j.api;bundle-version="1.6.0",
+ org.eclipse.m2e.maven.runtime;bundle-version="[1.0.0,1.1.0)",
+ org.eclipse.jface;bundle-version="3.7.0",
+ org.jboss.tools.maven.ui;bundle-version="1.3.0",
+ org.eclipse.ui;bundle-version="3.7.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Export-Package: org.jboss.tools.maven.gwt
+Bundle-Vendor: %Bundle-Vendor
+Bundle-Localization: plugin

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/about.html
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/about.html	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/about.html	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>JBoss Maven GWT Configurator</title>
+<style type="text/css" media="screen">
+<!--
+  body {
+    font-family: Sans-serif, Arial, Helvetica;
+  }
+
+-->
+</style>
+</head>
+<body>
+<h1>JBoss Maven GWT Configurator</h1>
+
+<p>
+This plugin is part of the JBoss Tools developed by the <a href="http://www.jboss.com">JBoss Inc.</a>
+</p>
+
+<p>Information about this plugin is available at <a href="http://www.jboss.org/tools">JBoss Tools project page</a></p>
+
+<p>
+This software is distributed under the terms of the Eclipse Public License - v 1.0
+(see <a href="www.eclipse.org/legal/epl-v10.html">Eclipse Public License - Version 1.0</a>).
+</p>
+</body>
+</html>
\ No newline at end of file

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/about.mappings
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/about.mappings	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/about.mappings	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,5 @@
+# about.mappings
+# contains fill-ins for about.properties
+# java.io.Properties file (ISO 8859-1 with "\" escapes)
+# This file does not need to be translated.
+

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/about.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/about.properties	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/about.properties	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,2 @@
+blurb=JBoss Maven CDI Configurator\n\nVersion\: {featureVersion}\n\n(c) Copyright (c) Red Hat, Inc., contributors and others 2004 - 2012.  All rights reserved.\nVisit http\://jboss.org/tools
+

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/build.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/build.properties	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/build.properties	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,6 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+               .,\
+               plugin.xml,\
+               lifecycle-mapping-metadata.xml

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/lifecycle-mapping-metadata.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/lifecycle-mapping-metadata.xml	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/lifecycle-mapping-metadata.xml	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<lifecycleMappingMetadata>
+	<pluginExecutions>
+		<pluginExecution>
+			<pluginExecutionFilter>
+				<groupId>org.apache.maven.plugins</groupId>
+				<artifactId>maven-install-plugin</artifactId>
+				<versionRange>[2.3.0,)</versionRange>
+				<goals>
+					<goal>install</goal>
+				</goals>
+			</pluginExecutionFilter>
+			<action>
+				<configurator>
+					<id>org.jboss.tools.maven.gwt.configurator.entry.point.modules</id>
+				</configurator>
+			</action>
+		</pluginExecution>
+	</pluginExecutions>
+</lifecycleMappingMetadata>
\ No newline at end of file

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/plugin.properties
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/plugin.properties	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/plugin.properties	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,3 @@
+Bundle-Vendor = JBoss by Red Hat
+Bundle-Name = JBoss Maven GWT Configurator
+GWT-Configurator-Name = GWT Configurator
\ No newline at end of file

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/plugin.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/plugin.xml	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/plugin.xml	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+   <extension
+         point="org.eclipse.m2e.core.lifecycleMappingMetadataSource">
+   </extension>
+   <extension
+         point="org.eclipse.m2e.core.projectConfigurators">
+      <configurator
+            class="org.jboss.tools.maven.gwt.GWTProjectConfigurator"
+            id="org.jboss.tools.maven.gwt.configurator.entry.point.modules"
+            name="%GWT-Configurator-Name">
+      </configurator>
+   </extension>
+</plugin>

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/pom.xml
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/pom.xml	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/pom.xml	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+	<parent>
+		<groupId>org.jboss.tools.maven</groupId>
+		<artifactId>plugins</artifactId>
+		<version>1.3.0-SNAPSHOT</version>
+	</parent>
+	<groupId>org.jboss.tools.maven.plugins</groupId>
+	<artifactId>org.jboss.tools.maven.gwt</artifactId>
+	
+	<packaging>eclipse-plugin</packaging>
+</project>
\ No newline at end of file

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/GWTProjectConfigurator.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/GWTProjectConfigurator.java	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/GWTProjectConfigurator.java	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,58 @@
+package org.jboss.tools.maven.gwt;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.apache.maven.model.Plugin;
+import org.apache.maven.plugin.MojoExecution;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jdt.core.JavaCore;
+import org.eclipse.jface.preference.IPreferenceStore;
+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.ui.Activator;
+import org.osgi.service.prefs.BackingStoreException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.google.gwt.eclipse.core.modules.IModule;
+import com.google.gwt.eclipse.core.modules.ModuleUtils;
+import com.google.gwt.eclipse.core.properties.GWTProjectProperties;
+
+public class GWTProjectConfigurator extends AbstractProjectConfigurator {
+	
+	private static final Logger log = LoggerFactory.getLogger(AbstractProjectConfigurator.class);
+
+	public static final String CODEHAUS_GROUP_ID = "org.codehaus.mojo";
+	public static final String GWT_MAVEN_PLUGIN_ARTIFACT_ID = "gwt-maven-plugin";
+	
+	@Override
+	public void configure(ProjectConfigurationRequest arg0, IProgressMonitor arg1) throws CoreException {
+		
+		IPreferenceStore store = Activator.getDefault().getPreferenceStore();
+		boolean configureGWT = store.getBoolean(Activator.CONFIGURE_GWT);
+		log.debug("GWT Entry Point Modules configuration is {}",configureGWT ? "enabled" : "disabled");
+		if(configureGWT) {
+			List<Plugin> plugins = arg0.getMavenProjectFacade().getMavenProject().getBuildPlugins();
+			for (Plugin plugin : plugins) {
+				if(CODEHAUS_GROUP_ID.equals(plugin.getGroupId()) && GWT_MAVEN_PLUGIN_ARTIFACT_ID.equals(plugin.getArtifactId())) {
+					log.debug("Configure Entry Point Modules for GWT Project {}", arg0.getProject().getName());
+					IModule[] modules = ModuleUtils.findAllModules(JavaCore.create(arg0.getProject()),false);
+					List<String> modNames = new ArrayList<String>();
+					for (IModule iModule : modules) {
+						modNames.add(iModule.getQualifiedName());
+						log.debug("\t {}",iModule.getQualifiedName());
+					}
+					try {
+						GWTProjectProperties.setEntryPointModules(arg0.getProject(), modNames);
+					} catch (BackingStoreException e) {
+						log.error("Ecseption in Maven GWT Configurator", e);
+					}
+					break;
+				}
+			}
+		}
+	}
+}

Added: trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/MavenGWTPlugin.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/MavenGWTPlugin.java	                        (rev 0)
+++ trunk/maven/plugins/org.jboss.tools.maven.gwt/src/org/jboss/tools/maven/gwt/MavenGWTPlugin.java	2012-03-31 01:41:48 UTC (rev 39950)
@@ -0,0 +1,30 @@
+package org.jboss.tools.maven.gwt;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+public class MavenGWTPlugin implements BundleActivator {
+
+	private static BundleContext context;
+
+	static BundleContext getContext() {
+		return context;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext bundleContext) throws Exception {
+		MavenGWTPlugin.context = bundleContext;
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext bundleContext) throws Exception {
+		MavenGWTPlugin.context = null;
+	}
+
+}



More information about the jbosstools-commits mailing list