Maven with errai and jboss compiling and packaging
rjdamore Jan 21, 2015 10:00 PMHello.
I'm trying to compile/package an errai/gwt project and deploy it to the jboss7 server. I am having difficulty getting the profile correct for the jboss server. At least I think that is my problem. When I package up the project and deploy it to Jboss I get a window.alert that tells me that superdevmode isn't running on the server and I have to make sure it is running.
I don't understand what I am doing to make this happen and I'm wondering if anyone can clue me in on what I'm doing wrong by looking at my pom.xml, particularly the jboss profile section.
My order of operations is: mvn clean, mvn compile, mvn gwt:compile, mvn package, then copy .war to deployments directory on JBoss.
I think that is correct, anyway here is the pom, thanks for any insight!
<?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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>gov.lanl.queue</groupId>
<artifactId>Queue</artifactId>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
<name>GWT Maven Archetype</name>
<properties>
<!-- Convenience property to set the GWT version -->
<gwtVersion>2.7.0</gwtVersion>
<!-- GWT needs at least java 1.6 -->
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt</artifactId>
<version>${gwtVersion}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-user</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-dev</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.gwtbootstrap</groupId>
<artifactId>gwt-bootstrap</artifactId>
<version>2.3.2.0</version>
</dependency>
<!-- Errai Dependencies -->
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-bus</artifactId>
<version>3.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-config</artifactId>
<version>3.1.1.Final</version>
</dependency>
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc</artifactId>
<version>3.1.1.Final</version>
</dependency>
</dependencies>
<build>
<!-- Output classes directly into the webapp, so that IDEs and "mvn process-classes" update them in DevMode -->
<outputDirectory>src/main/webapp/WEB-INF/classes</outputDirectory>
<plugins>
<!-- GWT Maven Plugin -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>2.7.0</version>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>test</goal>
<!-- <goal>generateAsync</goal>-->
</goals>
</execution>
</executions>
<!-- Plugin configuration. There are many available options, see
gwt-maven-plugin documentation at codehaus.org -->
<configuration>
<logLevel>INFO</logLevel>
<runTarget>Queue.html</runTarget>
<modules>
<module>gov.lanl.queue.Queue</module>
<module>gov.lanl.queue.client.mvp.MVP</module>
</modules>
<hostedWebapp>src/main/webapp</hostedWebapp>
</configuration>
</plugin>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.6.1</version>
<configuration>
<filesets>
<fileset>
<directory>${basedir}</directory>
<includes>
<include>src/main/webapp/Queue</include>
<include>src/main/webapp/gov.lanl.queue.client.mvp.MVP</include>
<include>**/gwt-unitCache/**</include>
<include>.errai/</include>
</includes>
</fileset>
</filesets>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>jboss7</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<build>
<plugins>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.2</version>
<configuration>
<packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class</packagingExcludes>
<outputFileNameMapping>@{artifactId}@-@{baseVersion}@@{dashClassifier?}@.@{extension}@</outputFileNameMapping>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-jboss-as-support</artifactId>
<version>3.1.1.Final</version>
</dependency>
</dependencies>
</profile>
</profiles>
</project>