Commits

Micha Kops  committed e10c50a

Working embedded-glassfish-configuration for GlassFish 4 added.

  • Participants
  • Parent commits e7756cc

Comments (0)

Files changed (2)

 					</execution>
 				</executions>
 			</plugin>
+			<!-- <plugin> <groupId>org.glassfish.embedded</groupId> <artifactId>maven-embedded-glassfish-plugin</artifactId> 
+				<version>3.1.2.2</version> <configuration> <app>target/${project.artifactId}-${project.version}</app> 
+				<port>8080</port> <contextRoot>hascode</contextRoot> </configuration> <dependencies> 
+				<dependency> <groupId>org.glassfish.main</groupId> <artifactId>simple-glassfish-api</artifactId> 
+				<version>4.0-b79</version> </dependency> <dependency> <groupId>org.glassfish.main.extras</groupId> 
+				<artifactId>glassfish-embedded-all</artifactId> <version>4.0-b83</version> 
+				</dependency> </dependencies> </plugin> -->
 			<plugin>
 				<groupId>org.glassfish.embedded</groupId>
 				<artifactId>maven-embedded-glassfish-plugin</artifactId>
-				<version>3.1.2.2</version>
+				<version>4.0</version>
 				<configuration>
-					<app>target/${project.artifactId}-${project.version}</app>
+					<goalPrefix>embedded-glassfish</goalPrefix>
+					<app>${basedir}/target/${project.artifactId}-${project.version}.war</app>
+					<autoDelete>true</autoDelete>
 					<port>8080</port>
+					<name>${project.artifactId}</name>
 					<contextRoot>hascode</contextRoot>
 				</configuration>
-				<dependencies>
-					<dependency>
-						<groupId>org.glassfish.main</groupId>
-						<artifactId>simple-glassfish-api</artifactId>
-						<version>4.0-b79</version>
-					</dependency>
-					<dependency>
-						<groupId>org.glassfish.main.extras</groupId>
-						<artifactId>glassfish-embedded-all</artifactId>
-						<version>4.0-b83</version>
-					</dependency>
-				</dependencies>
+				<executions>
+					<execution>
+						<goals>
+							<goal>deploy</goal>
+						</goals>
+					</execution>
+				</executions>
 			</plugin>
 		</plugins>
 	</build>

File src/main/webapp/index.html

 	var room = '';
 
 	function onMessageReceived(evt) {
-		//var msg = eval('(' + evt.data + ')');
 		var msg = JSON.parse(evt.data); // native API
 		var $messageLine = $('<tr><td class="received">' + msg.received
 				+ '</td><td class="user label label-info">' + msg.sender