Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
<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">

	<parent>
		<artifactId>trap-parent</artifactId>
		<groupId>com.ericsson.research.trap</groupId>
		<version>1.4.1</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	<artifactId>trap-js</artifactId>
	<name>TrAP JavaScript</name>

	<modelVersion>4.0.0</modelVersion>

	<repositories>
		<repository>
			<id>trap-snapshots</id>
			<url>https://oss.sonatype.org/content/repositories/snapshots</url>
			<releases>
				<enabled>false</enabled>
			</releases>
			<snapshots>
				<enabled>true</enabled>
			</snapshots>
		</repository>
	</repositories>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<skipExec>true</skipExec>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.googlecode.jstd-maven-plugin</groupId>
			<artifactId>jstd-maven-plugin</artifactId>
			<version>1.3.5.1</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.ericsson.research.trap</groupId>
			<artifactId>trap-transport-socket</artifactId>
			<version>1.4.1</version>
			<type>pom</type>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.ericsson.research.trap</groupId>
			<artifactId>trap-transport-loopback</artifactId>
			<version>1.4.1</version>
			<type>pom</type>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-jdk14</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jstestrunner</groupId>
			<artifactId>jstestrunner-junit</artifactId>
			<version>1.0.2</version>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>com.ericsson.research.trap.transports</groupId>
			<artifactId>wshttp-server-nano</artifactId>
			<version>1.4.1</version>
		</dependency>
	</dependencies>

	<pluginRepositories>
		<pluginRepository>
			<id>jstd-maven-plugin google code repo</id>
			<url>http://jstd-maven-plugin.googlecode.com/svn/maven2</url>
		</pluginRepository>
	</pluginRepositories>

	<profiles>
		<profile>
			<id>safari</id>
			<properties>
				<browserName>/Applications/Safari.app/Contents/MacOS/Safari</browserName>
			</properties>
		</profile>
		<profile>
			<id>firefox-mac</id>
			<properties>
				<browserName>/Applications/Firefox.app/Contents/MacOS/Firefox</browserName>
			</properties>
		</profile>
		<profile>
			<id>chrome-mac</id>
			<properties>
				<browserName>/Applications/Google Chrome.app/Contents/MacOS/Google
					Chrome</browserName>
			</properties>
		</profile>
		<profile>
			<id>firefox-linux</id>
			<properties>
				<browserName>/usr/bin/firefox</browserName>
			</properties>
		</profile>
		<profile>
			<id>firefox-win</id>
			<properties>
				<browserName>C:\Program Files\Mozilla Firefox\firefox.exe</browserName>
			</properties>
		</profile>
		<profile>
			<id>default</id>
			<properties>
				<browserName>default</browserName>
			</properties>
		</profile>
		<profile>
			<id>phantomjs</id>
			<properties>
				<skipExec>false</skipExec>
			</properties>
		</profile>
	</profiles>
	<build>

		<pluginManagement>
			<plugins>
				<!-- Needed fix for m2e plugin lifecycle mapping issues if you run eclipse 
					with m2e plugin -->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>net.alchim31.maven</groupId>
										<artifactId>yuicompressor-maven-plugin</artifactId>
										<versionRange>[1.0.0,)</versionRange>
										<goals>
											<goal>compress</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute>
											<runOnIncremental>false</runOnIncremental>
										</execute>
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>

		<plugins>
			<plugin>
				<groupId>com.googlecode.jstd-maven-plugin</groupId>
				<artifactId>jstd-maven-plugin</artifactId>
				<version>1.3.2.5</version>
				<configuration>
					<verbose>true</verbose>
					<!-- You might need to adjust this depending on your OS. On Mac, this 
						will launch your default browser -->
					<browser>${browserName}</browser>
					<port>9876</port>
				</configuration>
				<executions>
					<execution>
						<phase>potato-integration-test</phase>
						<id>run-tests</id>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.9</version>
				<configuration>
					<systemPropertyVariables>
						<org.codehaus.jstestrunner.commandPattern>${jstestrunner.commandPattern}</org.codehaus.jstestrunner.commandPattern>
					</systemPropertyVariables>
					<skip>${skipExec}</skip>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>test</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<plugin>
				<groupId>net.alchim31.maven</groupId>
				<artifactId>yuicompressor-maven-plugin</artifactId>
				<version>1.3.2</version>
				<executions>
					<execution>
						<phase>generate-resources</phase>
						<goals>
							<goal>compress</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<nosuffix>true</nosuffix>
					<sourceDirectory>src/main/javascript</sourceDirectory>
					<excludes>
						<exclude>**/wrapper/*.js</exclude>
					</excludes>
					<aggregations>
						<aggregation>
							<insertNewLine>true</insertNewLine>
							<output>${project.build.directory}/classes/trap-full.js</output>
							<includes>
								<include>${basedir}/src/main/javascript/wrapper/browser-prefix.js</include>
								<include>${basedir}/src/main/javascript/trap.js</include>
								<include>${basedir}/src/main/javascript/util/bytearrayoutputstream.js</include>
								<include>${basedir}/src/main/javascript/util/compat.js</include>
								<include>${basedir}/src/main/javascript/util/eventobject.js</include>
								<include>${basedir}/src/main/javascript/util/list.js</include>
								<include>${basedir}/src/main/javascript/util/log.js</include>
								<include>${basedir}/src/main/javascript/util/map.js</include>
								<include>${basedir}/src/main/javascript/util/md5.js</include>
								<include>${basedir}/src/main/javascript/util/set.js</include>
								<include>${basedir}/src/main/javascript/util/settimeoutcompat.js</include>
								<include>${basedir}/src/main/javascript/util/string.js</include>
								<include>${basedir}/src/main/javascript/util/stringbuffer.js</include>
								<include>${basedir}/src/main/javascript/util/zlib.js</include>
								<include>${basedir}/src/main/javascript/impl/auth.js</include>
								<include>${basedir}/src/main/javascript/impl/channel.js</include>
								<include>${basedir}/src/main/javascript/impl/channelmessagequeue.js</include>
								<include>${basedir}/src/main/javascript/impl/configuration.js</include>
								<include>${basedir}/src/main/javascript/impl/customconfig.js</include>
								<include>${basedir}/src/main/javascript/impl/keepalive.js</include>
								<include>${basedir}/src/main/javascript/impl/messagebuffer.js</include>
								<include>${basedir}/src/main/javascript/impl/endpoint.js</include>
								<include>${basedir}/src/main/javascript/impl/message.js</include>
								<include>${basedir}/src/main/javascript/impl/client-endpoint.js</include>
								<include>${basedir}/src/main/javascript/spi/transport.js</include>
								<include>${basedir}/src/main/javascript/transports/abstract-transport.js</include>
								<include>${basedir}/src/main/javascript/transports/websocket.js</include>
								<include>${basedir}/src/main/javascript/transports/http.js</include>
								<include>${basedir}/src/main/javascript/wrapper/browser-suffix.js</include>
							</includes>
						</aggregation>
						<aggregation>
							<insertNewLine>true</insertNewLine>
							<output>${project.build.directory}/classes/trap-node.js</output>
							<includes>
								<include>${basedir}/src/main/javascript/wrapper/node-prefix.js</include>
								<include>${basedir}/src/main/javascript/trap.js</include>
								<include>${basedir}/src/main/javascript/wrapper/node-definitions.js</include>
								<include>${basedir}/src/main/javascript/util/bytearrayoutputstream.js</include>
								<include>${basedir}/src/main/javascript/util/compat.js</include>
								<include>${basedir}/src/main/javascript/util/eventobject.js</include>
								<include>${basedir}/src/main/javascript/util/list.js</include>
								<include>${basedir}/src/main/javascript/util/log.js</include>
								<include>${basedir}/src/main/javascript/util/map.js</include>
								<include>${basedir}/src/main/javascript/util/md5.js</include>
								<include>${basedir}/src/main/javascript/util/set.js</include>
								<include>${basedir}/src/main/javascript/util/string.js</include>
								<include>${basedir}/src/main/javascript/util/stringbuffer.js</include>
								<include>${basedir}/src/main/javascript/util/zlib.js</include>
								<include>${basedir}/src/main/javascript/impl/auth.js</include>
								<include>${basedir}/src/main/javascript/impl/channel.js</include>
								<include>${basedir}/src/main/javascript/impl/channelmessagequeue.js</include>
								<include>${basedir}/src/main/javascript/impl/configuration.js</include>
								<include>${basedir}/src/main/javascript/impl/customconfig.js</include>
								<include>${basedir}/src/main/javascript/impl/keepalive.js</include>
								<include>${basedir}/src/main/javascript/impl/messagebuffer.js</include>
								<include>${basedir}/src/main/javascript/impl/endpoint.js</include>
								<include>${basedir}/src/main/javascript/impl/message.js</include>
								<include>${basedir}/src/main/javascript/impl/client-endpoint.js</include>
								<include>${basedir}/src/main/javascript/impl/listener-endpoint.js</include>
								<include>${basedir}/src/main/javascript/spi/transport.js</include>
								<include>${basedir}/src/main/javascript/transports/abstract-transport.js</include>
								<include>${basedir}/src/main/javascript/transports/websocket.js</include>
								<include>${basedir}/src/main/javascript/transports/http.js</include>
								<include>${basedir}/src/main/javascript/node/abstract-listener.js</include>
								<include>${basedir}/src/main/javascript/node/http-listener.js</include>
								<include>${basedir}/src/main/javascript/node/http-server.js</include>
								<include>${basedir}/src/main/javascript/node/websocket-listener.js</include>
								<include>${basedir}/src/main/javascript/wrapper/node-suffix.js</include>
							</includes>
						</aggregation>
						<aggregation>
							<insertNewLine>true</insertNewLine>
							<output>${project.build.directory}/classes/trap-min.js</output>
							<includes>
								<include>${basedir}/src/main/javascript/wrapper/browser-prefix.js</include>
								<include>${project.build.directory}/classes/trap.js</include>
								<include>${project.build.directory}/classes/util/*</include>
								<include>${project.build.directory}/classes/impl/auth.js</include>
								<include>${project.build.directory}/classes/impl/channel.js</include>
								<include>${project.build.directory}/classes/impl/channelmessagequeue.js</include>
								<include>${project.build.directory}/classes/impl/configuration.js</include>
								<include>${project.build.directory}/classes/impl/customconfig.js</include>
								<include>${project.build.directory}/classes/impl/keepalive.js</include>
								<include>${project.build.directory}/classes/impl/messagebuffer.js</include>
								<include>${project.build.directory}/classes/impl/endpoint.js</include>
								<include>${project.build.directory}/classes/impl/message.js</include>
								<include>${project.build.directory}/classes/impl/client-endpoint.js</include>
								<include>${project.build.directory}/classes/spi/transport.js</include>
								<include>${project.build.directory}/classes/transports/*</include>
								<include>${basedir}/src/main/javascript/wrapper/browser-suffix.js</include>
							</includes>
						</aggregation>
					</aggregations>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-jar-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<forceCreation>true</forceCreation>
					<includes>
						<include>trap-full**</include>
						<include>com/**</include>
					</includes>
				</configuration>
				<executions>
					<execution>
						<id>create-individual</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<forceCreation>true</forceCreation>
							<classifier>individual</classifier>
							<includes>
								<include>**</include>
							</includes>
						</configuration>
					</execution>
					<execution>
						<id>create-min</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<forceCreation>true</forceCreation>
							<classifier>min</classifier>
							<includes>
								<include>trap-min**</include>
								<include>com/**</include>
							</includes>
						</configuration>
					</execution>
					<execution>
						<id>create-jar</id>
						<phase>package</phase>
						<goals>
							<goal>jar</goal>
						</goals>
						<configuration>
							<forceCreation>true</forceCreation>
							<classifier>inc</classifier>
							<includes>
								<include>trap-min**</include>
								<include>trap-full**</include>
								<include>com/**</include>
							</includes>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<id>attach-js-artifacts</id>
						<phase>package</phase>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>${project.build.directory}/classes/trap-full.js</file>
									<type>js</type>
								</artifact>
								<artifact>
									<file>${project.build.directory}/classes/trap-min.js</file>
									<type>js</type>
									<classifier>min</classifier>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>com.phasebash.jsdoc</groupId>
				<artifactId>jsdoc3-maven-plugin</artifactId>
				<version>1.1.0</version>
				<configuration>
					<recursive>true</recursive>
					<directoryRoots>
						<directoryRoot>${basedir}/src/main/javascript</directoryRoot>
					</directoryRoots>
					<configFile>${basedir}/src/doc/javascript/conf.json</configFile>
				</configuration>
			</plugin>
		</plugins>
	</reporting>

	<description>JavaScript implementation of Trap. Contains both browser and node.js code.</description>
</project>
New to GrepCode? Check out our FAQ X