Skip to content
Browse files

inlined the bom, replaced @PostConstruct with @AfterInitialization

  • Loading branch information...
1 parent f577511 commit e0f18906b84e5c214134baf3d6515cd3001a49a3 @csadilek csadilek committed with Mar 9, 2012
View
1,046 kitchensink-errai/pom.xml
@@ -1,153 +1,55 @@
<?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>org.jboss.as.quickstarts</groupId>
- <artifactId>jboss-as-kitchensink-errai</artifactId>
- <version>7.0.2-SNAPSHOT</version>
- <packaging>war</packaging>
- <name>JBoss AS Quickstarts: Errai kitchensink</name>
- <description>A starter Java EE 6 webapp project for use on JBoss AS 7 / EAP 6, generated from the jboss-javaee6-webapp archetype</description>
-
- <properties>
- <!-- Explicitly declaring the source encoding eliminates the following
- message: -->
- <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
- resources, i.e. build is platform dependent! -->
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
- <javaee6.web.spec.version>2.0.0.Final</javaee6.web.spec.version>
- <!-- Alternatively, comment out the above line, and un-comment the line below to
- use version 3.0.0.Beta1-redhat-1 which is a release certified
- to work with JBoss EAP 6. It requires you have access to the JBoss EAP 6 maven repository. -->
- <!--
- <javaee6.web.spec.version>3.0.0.Beta1-redhat-1</javaee6.web.spec.version>
- -->
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.jboss.bom</groupId>
- <artifactId>jboss-javaee-6.0-with-errai</artifactId>
- <version>1.0.0-SNAPSHOT</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
-
- <!-- Test dependencies -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.10</version>
- <type>jar</type>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
-
- <!-- First declare the APIs we depend on and need for compilation.
- All of them are provided by JBoss AS 7 -->
-
- <!-- Import the CDI API, we use provided scope as the API is included
- in JBoss AS 7 -->
- <dependency>
- <groupId>javax.enterprise</groupId>
- <artifactId>cdi-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Import the JPA API, we use provided scope as the API is included
- in JBoss AS 7 -->
- <dependency>
- <groupId>org.jboss.spec.javax.transaction</groupId>
- <artifactId>jboss-transaction-api_1.1_spec</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Import the Common Annotations API (JSR-250), we use provided scope
- as the API is included in JBoss AS 7 -->
- <dependency>
- <groupId>org.jboss.spec.javax.annotation</groupId>
- <artifactId>jboss-annotations-api_1.1_spec</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Import the JAX-RS API, we use provided scope as the API is included
- in JBoss AS 7 -->
- <dependency>
- <groupId>org.jboss.spec.javax.ws.rs</groupId>
- <artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Import the JPA API, we use provided scope as the API is included
- in JBoss AS 7 -->
- <dependency>
- <groupId>org.hibernate.javax.persistence</groupId>
- <artifactId>hibernate-jpa-2.0-api</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Import the EJB API, we use provided scope as the API is included
- in JBoss AS 7 -->
- <dependency>
- <groupId>org.jboss.spec.javax.ejb</groupId>
- <artifactId>jboss-ejb-api_3.1_spec</artifactId>
- <scope>provided</scope>
- </dependency>
-
- <!-- Import the Bean Validation API, which is used both on the server and the client. -->
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- </dependency>
-
- <!-- JSR-303 (Bean Validation) Implementation -->
- <!-- Provides portable constraints such as @Email -->
- <!-- Hibernate Validator is shipped in JBoss AS 7 -->
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>4.2.0.Final</version>
- <scope>provided</scope>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <!-- GWT validation uses Hibernate Validator, and requires the sources at compile time. -->
+<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>org.jboss.as.quickstarts</groupId>
+ <artifactId>jboss-as-kitchensink-errai</artifactId>
+ <version>7.0.2-SNAPSHOT</version>
+ <packaging>war</packaging>
+ <name>JBoss AS Quickstarts: Errai kitchensink</name>
+ <description>A starter Java EE 6 webapp project for use on JBoss AS 7 / EAP 6, generated from the jboss-javaee6-webapp archetype</description>
+
+ <properties>
+ <!-- Explicitly declaring the source encoding eliminates the following
+ message: -->
+ <!-- [WARNING] Using platform encoding (UTF-8 actually) to copy filtered
+ resources, i.e. build is platform dependent! -->
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+ <version.org.jboss.spec.jboss.javaee.6.0>2.0.0.Final</version.org.jboss.spec.jboss.javaee.6.0>
+ <!-- Alternatively, comment out the above line, and un-comment the line
+ below to use version 3.0.0.Beta1-redhat-1 which is a release certified to
+ work with JBoss EAP 6. It requires you have access to the JBoss EAP 6 maven
+ repository. -->
+ <!-- <version.org.jboss.spec.jboss.javaee.6.0>3.0.0.Beta1-redhat-1</version.org.jboss.spec.jboss.javaee.6.0> -->
+ <version.org.jboss.errai>2.0-SNAPSHOT</version.org.jboss.errai>
+ <version.com.google.gwt>2.4.0</version.com.google.gwt>
+ <version.org.codehaus.mojo.gwt.maven.plugin>${version.com.google.gwt}</version.org.codehaus.mojo.gwt.maven.plugin>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <!-- JBoss distributes a complete set of Java EE 6 APIs including a
+ Bill of Materials (BOM). A BOM specifies the versions of a "stack" (or a
+ collection) of artifacts. We use this here so that we always get the correct
+ versions of artifacts. Here we use the jboss-javaee-6.0 stack (you can read
+ this as the JBoss stack of the Java EE 6 APIs). You can actually use this
+ stack with any version of JBoss AS that implements Java EE 6, not just JBoss
+ AS 7! -->
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>4.2.0.Final</version>
- <scope>provided</scope>
- <classifier>sources</classifier>
- <exclusions>
- <exclusion>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-api</artifactId>
- </exclusion>
- </exclusions>
+ <groupId>org.jboss.spec</groupId>
+ <artifactId>jboss-javaee-6.0</artifactId>
+ <version>${version.org.jboss.spec.jboss.javaee.6.0}</version>
+ <type>pom</type>
+ <scope>import</scope>
</dependency>
- <!-- GWT validation also requires the validation API sources at compile time -->
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.0.0.GA</version>
- <classifier>sources</classifier>
- </dependency>
-
- <!-- The next set of dependencies are for Errai -->
+ <!-- Errai Core and ErraiBus -->
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-bus</artifactId>
+ <version>${version.org.jboss.errai}</version>
<exclusions>
<exclusion>
<groupId>javax.inject</groupId>
@@ -162,6 +64,7 @@
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-ioc</artifactId>
+ <version>${version.org.jboss.errai}</version>
<exclusions>
<exclusion>
<groupId>javax.inject</groupId>
@@ -176,368 +79,569 @@
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>errai-tools</artifactId>
+ <version>${version.org.jboss.errai}</version>
</dependency>
- <!-- Errai CDI Integration Modules -->
+ <!-- Errai JAX-RS -->
<dependency>
<groupId>org.jboss.errai</groupId>
- <artifactId>errai-cdi-client</artifactId>
+ <artifactId>errai-jaxrs-client</artifactId>
+ <version>${version.org.jboss.errai}</version>
</dependency>
-
+
<dependency>
<groupId>org.jboss.errai</groupId>
- <artifactId>errai-javax-enterprise</artifactId>
- <scope>provided</scope>
+ <artifactId>errai-jaxrs-provider</artifactId>
+ <version>${version.org.jboss.errai}</version>
</dependency>
-
+
+ <!-- Errai CDI Integration Modules -->
<dependency>
<groupId>org.jboss.errai</groupId>
- <artifactId>errai-weld-integration</artifactId>
-
- <exclusions>
- <!-- errai-cdi-jetty is only required for integration testing -->
- <exclusion>
- <groupId>org.jboss.errai</groupId>
- <artifactId>errai-cdi-jetty</artifactId>
- </exclusion>
-
- <exclusion>
- <groupId>org.jboss.weld.servlet</groupId>
- <artifactId>weld-servlet</artifactId>
- </exclusion>
- </exclusions>
+ <artifactId>errai-cdi-client</artifactId>
+ <version>${version.org.jboss.errai}</version>
</dependency>
-
- <!-- gwt-user is required at runtime because we use some of the client/server shared
- APIs such as RegExp, so scope is 'compile' rather than 'provided'. -->
+
<dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- <scope>compile</scope>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-javax-enterprise</artifactId>
+ <version>${version.org.jboss.errai}</version>
</dependency>
-
+
<dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-dev</artifactId>
- <scope>provided</scope>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-weld-integration</artifactId>
+ <version>${version.org.jboss.errai}</version>
</dependency>
+
<dependency>
<groupId>org.jboss.errai</groupId>
<artifactId>jboss7-support</artifactId>
+ <version>${version.org.jboss.errai}</version>
</dependency>
- <!-- End of Errai dependencies -->
-
- <!-- Now we declare any tools needed -->
-
- <!-- Annotation processor to generate the JPA 2.0 metamodel classes
- for typesafe criteria queries -->
<dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-jpamodelgen</artifactId>
- <version>1.1.1.Final</version>
- <scope>provided</scope>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>${version.com.google.gwt}</version>
</dependency>
- <!-- Needed for running tests (you may also use TestNG) -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-dev</artifactId>
+ <version>${version.com.google.gwt}</version>
</dependency>
- </dependencies>
-
- <build>
- <!-- Maven will append the version to the finalName (which is the name
- given to the generated war, and hence the context root) -->
- <finalName>${project.artifactId}</finalName>
+ <!-- Test dependencies -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.10</version>
+ <type>jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+
+ <!-- First declare the APIs we depend on and need for compilation. All
+ of them are provided by JBoss AS 7 -->
+
+ <!-- Import the CDI API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>javax.enterprise</groupId>
+ <artifactId>cdi-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the JPA API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.jboss.spec.javax.transaction</groupId>
+ <artifactId>jboss-transaction-api_1.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the Common Annotations API (JSR-250), we use provided scope
+ as the API is included in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.jboss.spec.javax.annotation</groupId>
+ <artifactId>jboss-annotations-api_1.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the JAX-RS API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.jboss.spec.javax.ws.rs</groupId>
+ <artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the JPA API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.hibernate.javax.persistence</groupId>
+ <artifactId>hibernate-jpa-2.0-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the EJB API, we use provided scope as the API is included
+ in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.jboss.spec.javax.ejb</groupId>
+ <artifactId>jboss-ejb-api_3.1_spec</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Import the Bean Validation API, which is used both on the server
+ and the client. -->
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ </dependency>
+
+ <!-- JSR-303 (Bean Validation) Implementation -->
+ <!-- Provides portable constraints such as @Email -->
+ <!-- Hibernate Validator is shipped in JBoss AS 7 -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.2.0.Final</version>
+ <scope>provided</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- GWT validation uses Hibernate Validator, and requires the sources
+ at compile time. -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>4.2.0.Final</version>
+ <scope>provided</scope>
+ <classifier>sources</classifier>
+ <exclusions>
+ <exclusion>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- GWT validation also requires the validation API sources at compile
+ time -->
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.0.0.GA</version>
+ <classifier>sources</classifier>
+ </dependency>
+
+ <!-- The next set of dependencies are for Errai -->
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-bus</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-ioc</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.annotation</groupId>
+ <artifactId>jsr250-api</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-tools</artifactId>
+ </dependency>
+
+ <!-- Errai CDI Integration Modules -->
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-cdi-client</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-javax-enterprise</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-weld-integration</artifactId>
+
+ <exclusions>
+ <!-- errai-cdi-jetty is only required for integration testing -->
+ <exclusion>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>errai-cdi-jetty</artifactId>
+ </exclusion>
+
+ <exclusion>
+ <groupId>org.jboss.weld.servlet</groupId>
+ <artifactId>weld-servlet</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- gwt-user is required at runtime because we use some of the client/server
+ shared APIs such as RegExp, so scope is 'compile' rather than 'provided'. -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-dev</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.errai</groupId>
+ <artifactId>jboss7-support</artifactId>
+ </dependency>
+ <!-- End of Errai dependencies -->
+
+
+ <!-- Now we declare any tools needed -->
+
+ <!-- Annotation processor to generate the JPA 2.0 metamodel classes for
+ typesafe criteria queries -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-jpamodelgen</artifactId>
+ <version>1.1.1.Final</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Needed for running tests (you may also use TestNG) -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <!-- Maven will append the version to the finalName (which is the name
+ given to the generated war, and hence the context root) -->
+ <finalName>${project.artifactId}</finalName>
+ <plugins>
+ <!-- Compiler plugin enforces Java 1.6 compatibility and activates
+ annotation processors -->
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>2.3.1</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <failOnMissingWebXml>false</failOnMissingWebXml>
+ <!-- We must exclude GWT client local classes from the deployment,
+ or classpath scanners such as Hibernate and Weld get confused when the webapp
+ is bootstrapping. -->
+ <packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class</packagingExcludes>
+
+ <archive>
+ <manifestEntries>
+ <Dependencies>org.jboss.as.naming,org.jboss.as.server,org.jboss.msc</Dependencies>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+
+ <!-- GWT plugin to compile client-side java code to javascript and
+ to run GWT development mode -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <version>2.4.0</version>
+ <configuration>
+ <inplace>true</inplace>
+ <logLevel>INFO</logLevel>
+ <extraJvmArgs>-Xmx512m</extraJvmArgs>
+
+ <!-- Configure GWT's development mode (formerly known as hosted
+ mode) to not start the default server (embedded jetty), but to download the
+ HTML host page from the configured runTarget. -->
+ <noServer>true</noServer>
+ <runTarget>http://localhost:8080/jboss-as-kitchensink-errai/KitchenSink.html</runTarget>
+
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>resources</goal>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>gwt-clean</id>
+ <phase>clean</phase>
+ <goals>
+ <goal>clean</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- The JBoss AS plugin deploys your war to a local JBoss AS container -->
+ <!-- To use, run: mvn package jboss-as:deploy -->
+ <plugin>
+ <groupId>org.jboss.as.plugins</groupId>
+ <artifactId>jboss-as-maven-plugin</artifactId>
+ <version>7.1.0.Final</version>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>2.4.1</version>
+
+ <configuration>
+ <filesets>
+ <fileset>
+ <directory>.errai</directory>
+ </fileset>
+ <fileset>
+ <directory>.gwt</directory>
+ </fileset>
+ <fileset>
+ <directory>src/main/gwt-unitCache</directory>
+ </fileset>
+ <fileset>
+ <directory>src/main/webapp/KitchenSink</directory>
+ </fileset>
+ </filesets>
+ </configuration>
+ </plugin>
+ </plugins>
+
+ <pluginManagement>
<plugins>
- <!-- Compiler plugin enforces Java 1.6 compatibility and activates
- annotation processors -->
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>2.3.1</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1.1</version>
- <configuration>
- <failOnMissingWebXml>false</failOnMissingWebXml>
- <!-- We must exclude GWT client local classes from the deployment, or classpath scanners
- such as Hibernate and Weld get confused when the webapp is bootstrapping. -->
- <packagingExcludes>**/javax/**/*.*,**/client/local/**/*.class</packagingExcludes>
-
- <archive>
- <manifestEntries>
- <Dependencies>org.jboss.as.naming,org.jboss.as.server,org.jboss.msc</Dependencies>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
-
- <!-- GWT plugin to compile client-side java code to javascript and
- to run GWT development mode -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>gwt-maven-plugin</artifactId>
- <version>2.4.0</version>
- <configuration>
- <inplace>true</inplace>
- <logLevel>INFO</logLevel>
- <extraJvmArgs>-Xmx512m</extraJvmArgs>
-
- <!-- Configure GWT's development mode (formerly known as hosted
- mode) to not start the default server (embedded jetty), but to download the
- HTML host page from the configured runTarget. -->
- <noServer>true</noServer>
- <runTarget>http://localhost:8080/jboss-as-kitchensink-errai/KitchenSink.html</runTarget>
-
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>resources</goal>
- <goal>compile</goal>
- </goals>
- </execution>
- <execution>
- <id>gwt-clean</id>
- <phase>clean</phase>
- <goals>
- <goal>clean</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <!-- The JBoss AS plugin deploys your war to a local JBoss AS container -->
- <!-- To use, run: mvn package jboss-as:deploy -->
- <plugin>
- <groupId>org.jboss.as.plugins</groupId>
- <artifactId>jboss-as-maven-plugin</artifactId>
- <version>7.1.0.Final</version>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-clean-plugin</artifactId>
- <version>2.4.1</version>
-
- <configuration>
- <filesets>
- <fileset>
- <directory>.errai</directory>
- </fileset>
- <fileset>
- <directory>.gwt</directory>
- </fileset>
- <fileset>
- <directory>src/main/gwt-unitCache</directory>
- </fileset>
- <fileset>
- <directory>src/main/webapp/KitchenSink</directory>
- </fileset>
- </filesets>
- </configuration>
- </plugin>
+
+ <!-- m2e (Maven integration for Eclipse) requires the following configuration -->
+ <plugin>
+ <groupId>org.eclipse.m2e</groupId>
+ <artifactId>lifecycle-mapping</artifactId>
+ <version>1.0.0</version>
+ <configuration>
+ <lifecycleMappingMetadata>
+ <pluginExecutions>
+ <pluginExecution>
+ <pluginExecutionFilter>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <versionRange>[2.3.0,)</versionRange>
+ <goals>
+ <goal>resources</goal>
+ </goals>
+ </pluginExecutionFilter>
+ <action>
+ <execute />
+ </action>
+ </pluginExecution>
+ </pluginExecutions>
+ </lifecycleMappingMetadata>
+ </configuration>
+ </plugin>
</plugins>
-
- <pluginManagement>
+ </pluginManagement>
+
+ </build>
+
+ <profiles>
+ <profile>
+ <!-- The default profile skips all tests, though you can tune it to
+ run just unit tests based on a custom pattern -->
+ <!-- Seperate profiles are provided for running all tests, including
+ Arquillian tests that execute in the specified container -->
+ <id>default</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
<plugins>
-
- <!-- m2e (Maven integration for Eclipse) requires the following configuration -->
<plugin>
- <groupId>org.eclipse.m2e</groupId>
- <artifactId>lifecycle-mapping</artifactId>
- <version>1.0.0</version>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.4.3</version>
<configuration>
- <lifecycleMappingMetadata>
- <pluginExecutions>
- <pluginExecution>
- <pluginExecutionFilter>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>gwt-maven-plugin</artifactId>
- <versionRange>[2.3.0,)</versionRange>
- <goals>
- <goal>resources</goal>
- </goals>
- </pluginExecutionFilter>
- <action>
- <execute />
- </action>
- </pluginExecution>
- </pluginExecutions>
- </lifecycleMappingMetadata>
+ <skip>true</skip>
</configuration>
</plugin>
</plugins>
- </pluginManagement>
-
- </build>
-
- <profiles>
- <profile>
- <!-- The default profile skips all tests, though you can tune it
- to run just unit tests based on a custom pattern -->
- <!-- Seperate profiles are provided for running all tests, including
- Arquillian tests that execute in the specified container -->
- <id>default</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.4.3</version>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- <profile>
- <!-- We add the JBoss repository as we need the JBoss AS connectors
- for Arquillian -->
- <repositories>
- <!-- The JBoss Community public repository is a composite repository
- of several major repositories -->
- <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
- <repository>
- <id>jboss-public-repository</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/nexus/content/groups/public</url>
- <!-- These optional flags are designed to speed up your builds
- by reducing remote server calls -->
- <releases>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>jboss-public-repository</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/nexus/content/groups/public</url>
- <releases>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
-
- <!-- An optional Arquillian testing profile that executes tests
- in your JBoss AS instance -->
- <!-- This profile will start a new JBoss AS instance, and execute
- the test, shutting it down when done -->
- <!-- Run with: mvn clean test -Parq-jbossas-managed -->
- <id>arq-jbossas-managed</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-arquillian-container-managed</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
-
- <profile>
- <!-- We add the JBoss repository as we need the JBoss AS connectors
- for Arquillian -->
- <repositories>
- <!-- The JBoss Community public repository is a composite repository
- of several major repositories -->
- <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
- <repository>
- <id>jboss-public-repository</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/nexus/content/groups/public</url>
- <!-- These optional flags are designed to speed up your builds
- by reducing remote server calls -->
- <releases>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>jboss-public-repository</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/nexus/content/groups/public</url>
- <releases>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
-
- <!-- An optional Arquillian testing profile that executes tests
- in a remote JBoss AS instance -->
- <!-- Run with: mvn clean test -Parq-jbossas-remote -->
- <id>arq-jbossas-remote</id>
- <dependencies>
- <dependency>
- <groupId>org.jboss.as</groupId>
- <artifactId>jboss-as-arquillian-container-remote</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
- </profile>
-
- <profile>
- <!-- When built in OpenShift the 'openshift' profile will be used when invoking mvn. -->
- <!-- Use this profile for any OpenShift specific customization your app will need. -->
- <!-- By default that is to put the resulting archive into the 'deployments' folder. -->
- <!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
- <id>openshift</id>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.1.1</version>
- <configuration>
- <outputDirectory>deployments</outputDirectory>
- <warName>ROOT</warName>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
-
- </profiles>
-
- <!-- We only need this repository for Errai components. When Errai is
- published to Maven Central, we won't require this anymore. -->
- <repositories>
- <!-- The JBoss Community public repository is a composite repository
- of several major repositories -->
- <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
- <repository>
- <id>jboss-public-repository</id>
- <name>JBoss Repository</name>
- <url>http://repository.jboss.org/nexus/content/groups/public</url>
- <!-- These optional flags are designed to speed up your builds
+ </build>
+ </profile>
+
+ <profile>
+ <!-- We add the JBoss repository as we need the JBoss AS connectors
+ for Arquillian -->
+ <repositories>
+ <!-- The JBoss Community public repository is a composite repository
+ of several major repositories -->
+ <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
+ <repository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <!-- These optional flags are designed to speed up your builds
+ by reducing remote server calls -->
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <!-- An optional Arquillian testing profile that executes tests in
+ your JBoss AS instance -->
+ <!-- This profile will start a new JBoss AS instance, and execute the
+ test, shutting it down when done -->
+ <!-- Run with: mvn clean test -Parq-jbossas-managed -->
+ <id>arq-jbossas-managed</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-managed</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <!-- We add the JBoss repository as we need the JBoss AS connectors
+ for Arquillian -->
+ <repositories>
+ <!-- The JBoss Community public repository is a composite repository
+ of several major repositories -->
+ <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
+ <repository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <!-- These optional flags are designed to speed up your builds
by reducing remote server calls -->
- <releases>
- </releases>
- <snapshots>
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
+ <pluginRepositories>
+ <pluginRepository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <releases>
+ </releases>
+ <snapshots>
<enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+
+ <!-- An optional Arquillian testing profile that executes tests in
+ a remote JBoss AS instance -->
+ <!-- Run with: mvn clean test -Parq-jbossas-remote -->
+ <id>arq-jbossas-remote</id>
+ <dependencies>
+ <dependency>
+ <groupId>org.jboss.as</groupId>
+ <artifactId>jboss-as-arquillian-container-remote</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+
+ <profile>
+ <!-- When built in OpenShift the 'openshift' profile will be used when
+ invoking mvn. -->
+ <!-- Use this profile for any OpenShift specific customization your
+ app will need. -->
+ <!-- By default that is to put the resulting archive into the 'deployments'
+ folder. -->
+ <!-- http://maven.apache.org/guides/mini/guide-building-for-different-environments.html -->
+ <id>openshift</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1.1</version>
+ <configuration>
+ <outputDirectory>deployments</outputDirectory>
+ <warName>ROOT</warName>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ </profiles>
+
+ <!-- We only need this repository for Errai components. When Errai is published
+ to Maven Central, we won't require this anymore. -->
+ <repositories>
+ <!-- The JBoss Community public repository is a composite repository
+ of several major repositories -->
+ <!-- see http://community.jboss.org/wiki/MavenGettingStarted-Users -->
+ <repository>
+ <id>jboss-public-repository</id>
+ <name>JBoss Repository</name>
+ <url>http://repository.jboss.org/nexus/content/groups/public</url>
+ <!-- These optional flags are designed to speed up your builds by reducing
+ remote server calls -->
+ <releases>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+
</project>
View
26 ...errai/src/main/java/org/jboss/as/quickstarts/kitchensink/client/local/KitchenSinkApp.java
@@ -2,7 +2,6 @@
import java.util.List;
-import javax.annotation.PostConstruct;
import javax.enterprise.event.Observes;
import javax.inject.Inject;
@@ -12,7 +11,7 @@
import org.jboss.errai.bus.client.api.ErrorCallback;
import org.jboss.errai.bus.client.api.Message;
import org.jboss.errai.bus.client.api.RemoteCallback;
-import org.jboss.errai.enterprise.client.cdi.api.CDI;
+import org.jboss.errai.ioc.client.api.AfterInitialization;
import org.jboss.errai.ioc.client.api.Caller;
import org.jboss.errai.ioc.client.api.EntryPoint;
@@ -44,21 +43,24 @@
private KitchenSinkClient kitchenSinkUi;
- @PostConstruct
+ /**
+ * Builds the UI and populates the member list by making an RPC call to the server.
+ * <p>
+ * Note that because this method performs an RPC call to the server, it is annotated
+ * with AfterInitialization rather than PostConstruct: the contract of PostConstruct
+ * only guarantees that all of <em>this</em> bean's dependencies have been injected,
+ * but it does not guarantee that the entire runtime environment has completed its
+ * bootstrapping routine. Methods annotated with the Errai-specific AfterInitialization
+ * are only called once everything is up and running, including the communication
+ * channel to the server.
+ */
+ @AfterInitialization
public void createUI() {
kitchenSinkUi = new KitchenSinkClient(memberService);
kitchenSinkUi.setTableStatusMessage("Fetching member list...");
RootPanel.get("kitchensink").add(kitchenSinkUi);
-
- // Can't call RPC methods yet, because CDI may not have found all the remote services yet.
- // The CDI post init tasks run after the server-side services have been dicovered.
- CDI.addPostInitTask(new Runnable() {
- @Override
- public void run() {
- fetchMemberList();
- }
- });
+ fetchMemberList();
}
/**

0 comments on commit e0f1890

Please sign in to comment.
Something went wrong with that request. Please try again.