]> source.dussan.org Git - sonarqube.git/commitdiff
optimizing GWT compilation to speed up build in dev environments
authorsimonbrandhof <simon.brandhof@gmail.com>
Thu, 13 Jan 2011 18:13:16 +0000 (19:13 +0100)
committersimonbrandhof <simon.brandhof@gmail.com>
Thu, 13 Jan 2011 18:15:06 +0000 (19:15 +0100)
15 files changed:
plugins/sonar-core-gwt/pom.xml
plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/clouds/GwtCloudsDev.gwt.xml [new file with mode: 0644]
plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/coverageviewer/CoverageViewerDev.gwt.xml [new file with mode: 0644]
plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/defaultsourceviewer/GwtDefaultSourceViewerDev.gwt.xml [new file with mode: 0644]
plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/duplicationsviewer/DuplicationsViewerDev.gwt.xml [new file with mode: 0644]
plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/GwtHotspotsDev.gwt.xml [new file with mode: 0644]
plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/testdetailsviewer/TestsViewerDev.gwt.xml [new file with mode: 0644]
plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/ui/pageselector/PageSelectorDev.gwt.xml [new file with mode: 0644]
plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/violationsviewer/ViolationsViewerDev.gwt.xml [new file with mode: 0644]
plugins/sonar-design-plugin/pom.xml
plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/dependencies/DependenciesTabDev.gwt.xml [new file with mode: 0644]
plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/lcom4/Lcom4TabDev.gwt.xml [new file with mode: 0644]
plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/libraries/LibrariesPageDev.gwt.xml [new file with mode: 0644]
plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/page/DesignPageDev.gwt.xml [new file with mode: 0644]
pom.xml

index ea1b2ca3c3892dcd5e606d9966920d6a6087b0fd..adae8808addb6669bebb663f1a3e37b5f465a948 100644 (file)
     </testResources>
 
     <plugins>
-      <plugin>
-        <groupId>com.atlassian.maven.plugins</groupId>
-        <artifactId>maven-clover2-plugin</artifactId>
-        <configuration>
-          <excludes>
-            <!-- GWT classes -->
-            <exclude>**/client/**/*.java</exclude>
-          </excludes>
-        </configuration>
-      </plugin>
       <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>gwt-maven-plugin</artifactId>
           <execution>
             <configuration>
               <modules>
-                <module>org.sonar.plugins.core.ui.pageselector.PageSelector</module>
-                <module>org.sonar.plugins.core.clouds.GwtClouds</module>
-                <module>org.sonar.plugins.core.violationsviewer.ViolationsViewer</module>
-                <module>org.sonar.plugins.core.coverageviewer.CoverageViewer</module>
-                <module>org.sonar.plugins.core.defaultsourceviewer.GwtDefaultSourceViewer</module>
-                <module>org.sonar.plugins.core.duplicationsviewer.DuplicationsViewer</module>
-                <module>org.sonar.plugins.core.testdetailsviewer.TestsViewer</module>
-                <module>org.sonar.plugins.core.hotspots.GwtHotspots</module>
+                <module>org.sonar.plugins.core.ui.pageselector.PageSelector${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.core.clouds.GwtClouds${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.core.violationsviewer.ViolationsViewer${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.core.coverageviewer.CoverageViewer${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.core.defaultsourceviewer.GwtDefaultSourceViewer${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.core.duplicationsviewer.DuplicationsViewer${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.core.testdetailsviewer.TestsViewer${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.core.hotspots.GwtHotspots${gwt.permutationSuffix}</module>
               </modules>
               <skip>${skipGwt}</skip>
               <webappDirectory>${project.build.directory}/classes</webappDirectory>
-
-              <!-- do not break on two lines -->
-              <extraJvmArgs>-Xmx512m -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs>
+              <extraJvmArgs>${gwt.extraJvmArgs}</extraJvmArgs>
             </configuration>
             <goals>
               <goal>compile</goal>
       </plugin>
     </plugins>
   </build>
+
+  <profiles>
+    <profile>
+      <id>dev</id>
+      <activation>
+        <property>
+          <name>dev</name>
+        </property>
+      </activation>
+      <properties>
+        <gwt.permutationSuffix>Dev</gwt.permutationSuffix>
+        <gwt.extraJvmArgs>-Xmx512m -Xss1024k -Dgwt.draftCompile=true</gwt.extraJvmArgs>
+      </properties>
+    </profile>
+  </profiles>
 </project>
\ No newline at end of file
diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/clouds/GwtCloudsDev.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/clouds/GwtCloudsDev.gwt.xml
new file mode 100644 (file)
index 0000000..a9c3747
--- /dev/null
@@ -0,0 +1,13 @@
+<module rename-to="org.sonar.plugins.core.clouds.GwtClouds">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.api.web.gwt.Sonar"/>
+
+  <stylesheet src="clouds.css"/>
+
+  <entry-point class="org.sonar.plugins.core.clouds.client.GwtClouds"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/coverageviewer/CoverageViewerDev.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/coverageviewer/CoverageViewerDev.gwt.xml
new file mode 100644 (file)
index 0000000..0ab28e2
--- /dev/null
@@ -0,0 +1,12 @@
+<module rename-to="org.sonar.plugins.core.coverageviewer.CoverageViewer">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <inherits name="com.google.gwt.gen2.table.Table"/>
+
+  <entry-point class="org.sonar.plugins.core.coverageviewer.client.CoverageViewer"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/defaultsourceviewer/GwtDefaultSourceViewerDev.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/defaultsourceviewer/GwtDefaultSourceViewerDev.gwt.xml
new file mode 100644 (file)
index 0000000..eb23d0f
--- /dev/null
@@ -0,0 +1,12 @@
+<module rename-to="org.sonar.plugins.core.defaultsourceviewer.GwtDefaultSourceViewer">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <inherits name="com.google.gwt.gen2.table.Table"/>
+
+  <entry-point class="org.sonar.plugins.core.defaultsourceviewer.client.GwtDefaultSourceViewer"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/duplicationsviewer/DuplicationsViewerDev.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/duplicationsviewer/DuplicationsViewerDev.gwt.xml
new file mode 100644 (file)
index 0000000..a4d082a
--- /dev/null
@@ -0,0 +1,15 @@
+<module rename-to="org.sonar.plugins.core.duplicationsviewer.DuplicationsViewer">
+  <inherits name="com.google.gwt.xml.XML"/>
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <inherits name="com.google.gwt.gen2.table.Table"/>
+
+  <stylesheet src="DuplicationsViewer.css"/>
+
+  <entry-point class="org.sonar.plugins.core.duplicationsviewer.client.DuplicationsViewer"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/GwtHotspotsDev.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/hotspots/GwtHotspotsDev.gwt.xml
new file mode 100644 (file)
index 0000000..de57eb5
--- /dev/null
@@ -0,0 +1,12 @@
+<module rename-to="org.sonar.plugins.core.hotspots.GwtHotspots">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <inherits name="com.google.gwt.i18n.I18N"/>
+  <stylesheet src="hotspots.css"/>
+  <entry-point class="org.sonar.plugins.core.hotspots.client.GwtHotspots"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
\ No newline at end of file
diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/testdetailsviewer/TestsViewerDev.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/testdetailsviewer/TestsViewerDev.gwt.xml
new file mode 100644 (file)
index 0000000..c44229c
--- /dev/null
@@ -0,0 +1,15 @@
+<module rename-to="org.sonar.plugins.core.testdetailsviewer.TestsViewer">
+  <inherits name="com.google.gwt.xml.XML"/>
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <inherits name="com.google.gwt.gen2.table.Table"/>
+
+  <stylesheet src="TestsViewer.css"/>
+
+  <entry-point class="org.sonar.plugins.core.testdetailsviewer.client.TestsViewer"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
\ No newline at end of file
diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/ui/pageselector/PageSelectorDev.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/ui/pageselector/PageSelectorDev.gwt.xml
new file mode 100644 (file)
index 0000000..b1c8bc2
--- /dev/null
@@ -0,0 +1,14 @@
+<module rename-to="org.sonar.plugins.core.ui.pageselector.PageSelector">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="com.google.gwt.i18n.I18N"/> 
+  <inherits name="org.sonar.api.web.gwt.Sonar"/>
+  <inherits name="org.sonar.Sonar"/>
+  <stylesheet src="pageselector.css" />
+  
+  <entry-point class="org.sonar.plugins.core.ui.pageselector.client.PageSelector"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
\ No newline at end of file
diff --git a/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/violationsviewer/ViolationsViewerDev.gwt.xml b/plugins/sonar-core-gwt/src/main/resources/org/sonar/plugins/core/violationsviewer/ViolationsViewerDev.gwt.xml
new file mode 100644 (file)
index 0000000..e628eae
--- /dev/null
@@ -0,0 +1,13 @@
+<module rename-to="org.sonar.plugins.core.violationsviewer.ViolationsViewer">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <inherits name="com.google.gwt.gen2.table.Table"/>
+  <inherits name="com.google.gwt.i18n.I18N"/>
+
+  <entry-point class="org.sonar.plugins.core.violationsviewer.client.ViolationsViewer"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
index 8931965033ef98bb34bb8d5139de6c3b41bfd7c2..d17bf9fc1ef050df6f32ad57189e01b309c14ab0 100644 (file)
         </configuration>
       </plugin>
 
-      <plugin>
+            <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>gwt-maven-plugin</artifactId>
         <executions>
           <execution>
             <configuration>
               <modules>
-                <module>org.sonar.plugins.design.ui.lcom4.Lcom4Tab</module>
-                <module>org.sonar.plugins.design.ui.page.DesignPage</module>
-                <module>org.sonar.plugins.design.ui.dependencies.DependenciesTab</module>
-                <module>org.sonar.plugins.design.ui.libraries.LibrariesPage</module>
+                <module>org.sonar.plugins.design.ui.lcom4.Lcom4Tab${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.design.ui.page.DesignPage${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.design.ui.dependencies.DependenciesTab${gwt.permutationSuffix}</module>
+                <module>org.sonar.plugins.design.ui.libraries.LibrariesPage${gwt.permutationSuffix}</module>
               </modules>
               <skip>${skipGwt}</skip>
               <webappDirectory>${project.build.directory}/classes</webappDirectory>
 
               <!-- do not break on two lines -->
-              <extraJvmArgs>-Xmx512m -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs>
+              <extraJvmArgs>${extraJvmArgs}</extraJvmArgs>
             </configuration>
             <goals>
               <goal>compile</goal>
       </plugin>
     </plugins>
   </build>
+  
+  <profiles>
+    <profile>
+      <id>dev</id>
+      <activation>
+        <property>
+          <name>dev</name>
+        </property>
+      </activation>
+      <properties>
+        <gwt.permutationSuffix>Dev</gwt.permutationSuffix>
+        <gwt.extraJvmArgs>-Xmx512m -Xss1024k -Dgwt.draftCompile=true</gwt.extraJvmArgs>
+      </properties>
+    </profile>
+  </profiles>
 </project>
\ No newline at end of file
diff --git a/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/dependencies/DependenciesTabDev.gwt.xml b/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/dependencies/DependenciesTabDev.gwt.xml
new file mode 100644 (file)
index 0000000..2d99592
--- /dev/null
@@ -0,0 +1,12 @@
+<module rename-to="org.sonar.plugins.design.ui.dependencies.DependenciesTab">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+
+  <stylesheet src='dependencies-tab.css'/>
+  <entry-point class="org.sonar.plugins.design.ui.dependencies.client.DependenciesTab"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
diff --git a/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/lcom4/Lcom4TabDev.gwt.xml b/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/lcom4/Lcom4TabDev.gwt.xml
new file mode 100644 (file)
index 0000000..f89e89f
--- /dev/null
@@ -0,0 +1,11 @@
+<module rename-to="org.sonar.plugins.design.ui.lcom4.Lcom4Tab">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <stylesheet src="lcom4.css"/>
+  <entry-point class="org.sonar.plugins.design.ui.lcom4.client.Lcom4Tab"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
diff --git a/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/libraries/LibrariesPageDev.gwt.xml b/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/libraries/LibrariesPageDev.gwt.xml
new file mode 100644 (file)
index 0000000..5628099
--- /dev/null
@@ -0,0 +1,11 @@
+<module rename-to="org.sonar.plugins.design.ui.libraries.LibrariesPage">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <stylesheet src="libraries.css"/>
+  <entry-point class="org.sonar.plugins.design.ui.libraries.client.LibrariesPage"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
diff --git a/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/page/DesignPageDev.gwt.xml b/plugins/sonar-design-plugin/src/main/resources/org/sonar/plugins/design/ui/page/DesignPageDev.gwt.xml
new file mode 100644 (file)
index 0000000..0e137c3
--- /dev/null
@@ -0,0 +1,11 @@
+<module rename-to="org.sonar.plugins.design.ui.page.DesignPage">
+  <inherits name="com.google.gwt.user.User"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.http.HTTP"/>
+  <inherits name="org.sonar.Sonar"/>
+  <stylesheet src="design.css"/>
+  <entry-point class="org.sonar.plugins.design.ui.page.client.DesignPage"/>
+
+  <!-- optimization of dev environments -->
+  <set-property name="user.agent" value="gecko1_8" />
+</module>
diff --git a/pom.xml b/pom.xml
index 74255853187cdd65e12d57fe86b05e44335d975e..9f0b504a84d6917fa1fa5ea05b68fd6ee241aa2f 100644 (file)
--- a/pom.xml
+++ b/pom.xml
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
     <maven.min.version>2.0</maven.min.version>
     <jdk.min.version>1.5</jdk.min.version>
+
+    <!-- default GWT configuration. It's overridden by the profile 'dev' to speed up compilation in dev environments-->
+    <gwt.permutationSuffix></gwt.permutationSuffix>
+    <gwt.extraJvmArgs>-Xmx512m -Xss1024k</gwt.extraJvmArgs>
   </properties>
 
   <build>