Vojtech Szocs has uploaded a new change for review. Change subject: webadmin,userportal: gwt-maven-plugin POM cleanup ......................................................................
webadmin,userportal: gwt-maven-plugin POM cleanup This patch eliminates some duplicities in WebAdmin and UserPortal POM files and adds new feature with regard to 'gwtdev' profile. 1. Common properties used with GWT compilation moved to parent POM's <properties> 2. Common gwt-maven-plugin plugin configuration moved to parent POM's <pluginManagement> 3. 'all-langs' profile definition moved to parent POM's <profiles> 4. Activating 'gwtdev' profile when compiling GWT application (not debugging) will produce 'DETAILED' JavaScript output and enable draft compile (should be faster) Item 4. makes it a bit easy to analyze/profile GWT application during development. Change-Id: I1d064980ac3269373b1c17040bcc1b5cd704445f Signed-off-by: Vojtech Szocs <vsz...@redhat.com> --- M frontend/webadmin/modules/pom.xml M frontend/webadmin/modules/userportal-gwtp/pom.xml M frontend/webadmin/modules/webadmin/pom.xml 3 files changed, 81 insertions(+), 133 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/71/12071/1 diff --git a/frontend/webadmin/modules/pom.xml b/frontend/webadmin/modules/pom.xml index ae9cac4..5276a0d 100644 --- a/frontend/webadmin/modules/pom.xml +++ b/frontend/webadmin/modules/pom.xml @@ -37,6 +37,18 @@ <!-- Using older maven-processor-plugin version for Maven 2 compatibility --> <maven-processor-plugin.version>1.3.7</maven-processor-plugin.version> <maven-checkstyle-plugin.version>2.8</maven-checkstyle-plugin.version> + <!-- Activate load time weaving of aspects via AspectJ JVM agent --> + <aspectj.agent>-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar</aspectj.agent> + <!-- Regular expression that matches types that GWT compiler shouldn't prune (avoid dead code optimization) --> + <gwt.dontPrune>-Dgwt.dontPrune=org\.ovirt\.engine\.core\.(common|compat)\..*</gwt.dontPrune> + <!-- This can be overridden by setting this property in your personal settings.xml --> + <gwt-plugin.extraJvmArgs>${aspectj.agent} -Xms1024M -Xmx2048M -XX:PermSize=256M -XX:MaxPermSize=256M ${gwt.dontPrune}</gwt-plugin.extraJvmArgs> + <!-- Control target browsers for GWT compilation, maps to 'user.agent' deferred binding property in *.gwt.xml --> + <!-- By default, all browsers are supported, see [gwt-user.jar:com/google/gwt/user/UserAgent.gwt.xml] for a complete list --> + <gwt.userAgent>ie6,ie8,ie9,gecko1_8,safari,opera</gwt.userAgent> + <!-- Control target locales for GWT compilation, maps to 'locale' deferred binding property in *.gwt.xml --> + <!-- By default, only default (English) locale is supported, see 'all-langs' profile for a complete list --> + <gwt.locale>default</gwt.locale> </properties> <dependencyManagement> <dependencies> @@ -104,7 +116,60 @@ </filesets> </configuration> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>gwt-maven-plugin</artifactId> + <dependencies> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-user</artifactId> + <version>${gwt.version}</version> + </dependency> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-dev</artifactId> + <version>${gwt.version}</version> + </dependency> + <dependency> + <groupId>com.google.gwt</groupId> + <artifactId>gwt-servlet</artifactId> + <version>${gwt.version}</version> + </dependency> + <!-- Add gwt-extension aspects to GWT compiler classpath --> + <dependency> + <groupId>${engine.groupId}</groupId> + <artifactId>gwt-extension</artifactId> + <version>${engine.version}</version> + </dependency> + </dependencies> + <configuration> + <logLevel>INFO</logLevel> + <style>OBF</style> + <port>8700</port> + <noServer>true</noServer> + <bindAddress>0.0.0.0</bindAddress> + <gen>${gwtGenDirectory}</gen> + <extraJvmArgs>${gwt-plugin.extraJvmArgs}</extraJvmArgs> + <copyWebapp>true</copyWebapp> + <compileSourcesArtifacts> + <compileSourcesArtifact>${engine.groupId}:gwt-extension</compileSourcesArtifact> + <compileSourcesArtifact>${engine.groupId}:uicommonweb</compileSourcesArtifact> + </compileSourcesArtifacts> + <!--Why asm is excluded? --> + <runClasspathExcludes> + <runClasspathExclude>asm-3.3.jar</runClasspathExclude> + </runClasspathExcludes> + </configuration> + </plugin> </plugins> </pluginManagement> </build> + <profiles> + <profile> + <id>all-langs</id> + <properties> + <gwt.locale>default,es,fr,ja,pt_BR,zh_CN</gwt.locale> + </properties> + </profile> + </profiles> </project> diff --git a/frontend/webadmin/modules/userportal-gwtp/pom.xml b/frontend/webadmin/modules/userportal-gwtp/pom.xml index 17bb73a..31a2687 100644 --- a/frontend/webadmin/modules/userportal-gwtp/pom.xml +++ b/frontend/webadmin/modules/userportal-gwtp/pom.xml @@ -10,19 +10,6 @@ <packaging>war</packaging> <name>UserPortal</name> <description>oVirt Engine User Portal GUI</description> - <properties> - <!-- Activate load time weaving of the aspects --> - <aspectj.agent>-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar</aspectj.agent> - <!-- Regular expression that matches the types that the GWT compiler shouldn't prune --> - <gwt.dontPrune>-Dgwt.dontPrune=org\.ovirt\.engine\.core\.(common|compat)\..*</gwt.dontPrune> - <!-- This can be overidded by setting this property in your personal settings.xml --> - <gwt-plugin.extraJvmArgs>${aspectj.agent} -Xms1024M -Xmx2048M -XX:PermSize=256M -XX:MaxPermSize=256M ${gwt.dontPrune}</gwt-plugin.extraJvmArgs> - <!-- Set gwt.userAgent property via the resource plugin during the resource phase, - By default, all browsers are supported, see [gwt-user.jar:com/google/gwt/user/UserAgent.gwt.xml] for a complete list --> - <gwt.userAgent>ie6,ie8,ie9,gecko1_8,safari,opera</gwt.userAgent> - <gwt.locale>default</gwt.locale> - </properties> - <!-- TODO: Define SCM --> <dependencies> <!-- Google Web Toolkit dependencies --> <dependency> @@ -126,7 +113,6 @@ <build> <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes </outputDirectory> - <!-- Currently maven resource sttructure contains all static content. --> <resources> <resource> <targetPath>${project.build.directory}/generated-sources/gwt</targetPath> @@ -196,22 +182,6 @@ </execution> </executions> </plugin> - <!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> - <executions> <execution> <goals> <goal>compile</goal> <goal>test</goal> </goals> - </execution> </executions> <configuration> <runTarget>webadmin/Application.html</runTarget> - <extraJvmArgs>${gwt-plugin.extraJvmArgs}</extraJvmArgs> <debugSuspend>false</debugSuspend> - </configuration> </plugin> --> - <!-- ====================================================================== --> - <!-- It's possible to use the target/web.xml file mergewebxml produces, - by --> - <!-- making the war plugin to use it. It's possible to exclude what --> - <!-- neccessary from the final artifact here. --> - <!-- ====================================================================== --> - <!-- <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> - <webXml>target/web.xml</webXml> <warSourceExcludes>.gwt-tmp/**</warSourceExcludes> - </configuration> </plugin> <plugin> <artifactId>maven-compiler-plugin</artifactId> - <configuration> <source>${maven.compiler.source}</source> <target>${maven.compiler.target}</target> - </configuration> </plugin> --> <plugin> <artifactId>maven-checkstyle-plugin</artifactId> <configuration> @@ -228,47 +198,8 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> - <dependencies> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${gwt.version}</version> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-dev</artifactId> - <version>${gwt.version}</version> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-servlet</artifactId> - <version>${gwt.version}</version> - </dependency> - <!-- Add gwt-extension aspjects to the GWT compiler classpath --> - <dependency> - <groupId>${engine.groupId}</groupId> - <artifactId>gwt-extension</artifactId> - <version>${engine.version}</version> - </dependency> - </dependencies> <configuration> - <logLevel>INFO</logLevel> - <style>OBF</style> <runTarget>/UserPortal/org.ovirt.engine.ui.userportal.UserPortal/UserPortal.html</runTarget> - <port>8700</port> - <noServer>true</noServer> - <bindAddress>0.0.0.0</bindAddress> - <gen>${gwtGenDirectory}</gen> - <extraJvmArgs>${gwt-plugin.extraJvmArgs}</extraJvmArgs> - <copyWebapp>true</copyWebapp> - <compileSourcesArtifacts> - <compileSourcesArtifact>${engine.groupId}:gwt-extension</compileSourcesArtifact> - <compileSourcesArtifact>${engine.groupId}:uicommonweb</compileSourcesArtifact> - </compileSourcesArtifacts> - <!--Why asm is excluded? --> - <runClasspathExcludes> - <runClasspathExclude>asm-3.3.jar</runClasspathExclude> - </runClasspathExcludes> </configuration> <executions> <execution> @@ -287,6 +218,14 @@ <id>gwtdev</id> <build> <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>gwt-maven-plugin</artifactId> + <configuration> + <style>DETAILED</style> + <draftCompile>true</draftCompile> + </configuration> + </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> @@ -330,12 +269,6 @@ </plugin> </plugins> </build> - </profile> - <profile> - <id>all-langs</id> - <properties> - <gwt.locale>default,es,fr,ja,pt_BR,zh_CN</gwt.locale> - </properties> </profile> </profiles> </project> diff --git a/frontend/webadmin/modules/webadmin/pom.xml b/frontend/webadmin/modules/webadmin/pom.xml index 4eb0906..e5ee3ef 100644 --- a/frontend/webadmin/modules/webadmin/pom.xml +++ b/frontend/webadmin/modules/webadmin/pom.xml @@ -10,18 +10,6 @@ <packaging>war</packaging> <name>WebAdmin</name> <description>oVirt Web based Administration GUI</description> - <properties> - <!-- Activate load time weaving of the aspects --> - <aspectj.agent>-javaagent:${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar</aspectj.agent> - <!-- Regular expression that matches the types that the GWT compiler shouldn't prune --> - <gwt.dontPrune>-Dgwt.dontPrune=org\.ovirt\.engine\.core\.(common|compat)\..*</gwt.dontPrune> - <!-- This can be overidded by setting this property in your personal settings.xml --> - <gwt-plugin.extraJvmArgs>${aspectj.agent} -Xms1024M -Xmx2048M -XX:PermSize=256M -XX:MaxPermSize=256M ${gwt.dontPrune}</gwt-plugin.extraJvmArgs> - <!-- Set gwt.userAgent property via the resource plugin during the resource phase, - By default, all browsers are supported, see [gwt-user.jar:com/google/gwt/user/UserAgent.gwt.xml] for a complete list --> - <gwt.userAgent>ie6,ie8,ie9,gecko1_8,safari,opera</gwt.userAgent> - <gwt.locale>default</gwt.locale> - </properties> <dependencies> <!-- Google Web Toolkit dependencies --> <dependency> @@ -125,7 +113,6 @@ <build> <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes </outputDirectory> - <!-- Currently maven resource sttructure contains all static content. --> <resources> <resource> <targetPath>${project.build.directory}/generated-sources/gwt</targetPath> @@ -211,47 +198,8 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>gwt-maven-plugin</artifactId> - <dependencies> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-user</artifactId> - <version>${gwt.version}</version> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-dev</artifactId> - <version>${gwt.version}</version> - </dependency> - <dependency> - <groupId>com.google.gwt</groupId> - <artifactId>gwt-servlet</artifactId> - <version>${gwt.version}</version> - </dependency> - <!-- Add gwt-extension aspjects to the GWT compiler classpath --> - <dependency> - <groupId>${engine.groupId}</groupId> - <artifactId>gwt-extension</artifactId> - <version>${engine.version}</version> - </dependency> - </dependencies> <configuration> - <logLevel>INFO</logLevel> - <style>OBF</style> <runTarget>/webadmin/webadmin/WebAdmin.html</runTarget> - <port>8700</port> - <noServer>true</noServer> - <bindAddress>0.0.0.0</bindAddress> - <gen>${gwtGenDirectory}</gen> - <extraJvmArgs>${gwt-plugin.extraJvmArgs}</extraJvmArgs> - <copyWebapp>true</copyWebapp> - <compileSourcesArtifacts> - <compileSourcesArtifact>${engine.groupId}:gwt-extension</compileSourcesArtifact> - <compileSourcesArtifact>${engine.groupId}:uicommonweb</compileSourcesArtifact> - </compileSourcesArtifacts> - <!--Why asm is excluded? --> - <runClasspathExcludes> - <runClasspathExclude>asm-3.3.jar</runClasspathExclude> - </runClasspathExcludes> </configuration> <executions> <execution> @@ -270,6 +218,14 @@ <id>gwtdev</id> <build> <plugins> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>gwt-maven-plugin</artifactId> + <configuration> + <style>DETAILED</style> + <draftCompile>true</draftCompile> + </configuration> + </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> @@ -313,12 +269,6 @@ </plugin> </plugins> </build> - </profile> - <profile> - <id>all-langs</id> - <properties> - <gwt.locale>default,es,fr,ja,pt_BR,zh_CN</gwt.locale> - </properties> </profile> </profiles> </project> -- To view, visit http://gerrit.ovirt.org/12071 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d064980ac3269373b1c17040bcc1b5cd704445f Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Vojtech Szocs <vsz...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches