Skip to content

Instantly share code, notes, and snippets.

@OlegYch
Created March 10, 2012 12:45
Show Gist options
  • Save OlegYch/2011334 to your computer and use it in GitHub Desktop.
Save OlegYch/2011334 to your computer and use it in GitHub Desktop.
vaadin maven sample
<?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>
<properties>
<jetty-maven-plugin.version>8.1.1.v20120215</jetty-maven-plugin.version>
</properties>
<parent>
<groupId>com.project</groupId>
<artifactId>project-proxy</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<groupId>${project.parent.groupId}</groupId>
<artifactId>proxy-web</artifactId>
<version>${project.parent.version}</version>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>backend-service</artifactId>
</dependency>
<dependency>
<groupId>${project.parent.groupId}</groupId>
<artifactId>proxy</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin</groupId>
<artifactId>vaadin</artifactId>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>scaladin</artifactId>
</dependency>
<dependency>
<groupId>org.vaadin</groupId>
<artifactId>dontpush-addon-ozonelayer</artifactId>
</dependency>
<dependency>
<groupId>org.dellroad</groupId>
<artifactId>dellroad-stuff-vaadin</artifactId>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>toolkit-productivity-tools</artifactId>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
</dependency>
<dependency>
<groupId>com.vaadin.addon</groupId>
<artifactId>beanvalidation-addon</artifactId>
</dependency>
<dependency>
<groupId>org.vaadin.addons</groupId>
<artifactId>navigator7</artifactId>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.3.0</version>
<configuration>
<webappDirectory>
${project.build.directory}/${project.build.finalName}/VAADIN/widgetsets
</webappDirectory>
<!-- On Mac running Snow Leopard, add "-d32" -->
<!-- This causes error messages (but build works) in phase "package": two processes would use the same debug
port -->
<!--extraJvmArgs>-Xmx512M -Xss1024k -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8998</extraJvmArgs -->
<extraJvmArgs>-Xmx512M -Xss1024k</extraJvmArgs>
<runTarget>project-proxy</runTarget>
<hostedWebapp>${project.build.directory}/${project.build.finalName}</hostedWebapp>
<noServer>true</noServer>
<port>8080</port>
<soyc>false</soyc>
<module>${project.web.widgetset}</module>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.vaadin</groupId>
<artifactId>vaadin-maven-plugin</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<configuration>
<module>${project.web.widgetset}</module>
</configuration>
<goals>
<goal>update-widgetset</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
<version>${jetty-maven-plugin.version}</version>
<configuration>
<connectors>
<connector implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
<port>8080</port>
</connector>
<connector implementation="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
<port>8443</port>
<keystore>${project.basedir}/jetty-ssl.keystore</keystore>
<password>12345678</password>
<keyPassword>12345678</keyPassword>
</connector>
</connectors>
<stopPort>9966</stopPort>
<stopKey>project-proxy</stopKey>
<reload>manual</reload>
<webAppConfig>
<contextPath>/</contextPath>
<resourceBases>
<resourceBase>
src/main/webapp
</resourceBase>
<resourceBase>
${project.build.directory}/${project.build.finalName}
</resourceBase>
</resourceBases>
<descriptor>${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml</descriptor>
</webAppConfig>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<filteringDeploymentDescriptors>true</filteringDeploymentDescriptors>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>dev</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<configuration>
<draftCompile>true</draftCompile>
<optimizationLevel>0</optimizationLevel>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<project.web.production.mode>false</project.web.production.mode>
<project.web.widgetset>com.project.project.proxy.gwt.dev</project.web.widgetset>
</properties>
</profile>
<profile>
<id>prod</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<project.web.production.mode>true</project.web.production.mode>
<project.web.widgetset>com.project.project.proxy.gwt.prod</project.web.widgetset>
</properties>
</profile>
</profiles>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment