<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>
	<parent>
		<groupId>org.mobicents.servlet.sip</groupId>
		<artifactId>sip-servlets-bootstrap</artifactId>
		<version>1.6.0.FINAL</version>
		<relativePath>../pom.xml</relativePath>
	</parent>
	<artifactId>sip-servlets-impl</artifactId>
	<packaging>jar</packaging>
	<name>Sip Servlets Implementation</name>
	<url>http://www.mobicents.org/products_sip_servlets.html</url>
	
	<properties>
		<mobicents.name>Mobicents</mobicents.name>
		<maven.build.timestamp.format>yyyyMMddHHmm</maven.build.timestamp.format>
		<release.timestamp>${maven.build.timestamp}</release.timestamp>
	</properties>
	
	<dependencies>
		<!-- sip servlet spec dependency -->
		<dependency>
			<groupId>org.mobicents.servlet.sip</groupId>
			<artifactId>sip-servlets-spec</artifactId>
			<version>1.6.0.FINAL</version>			
		</dependency>		

		<dependency>
			<groupId>org.mobicents.servlet.sip</groupId>
			<artifactId>sip-servlets-annotations</artifactId>
			<version>1.6.0.FINAL</version>			
		</dependency>

		<dependency>
			<groupId>org.mobicents.servlet.sip</groupId>
			<artifactId>sip-servlets-client</artifactId>
			<version>1.6.0.FINAL</version>			
		</dependency>
		
		<dependency>
			<groupId>org.mobicents.servlet.sip</groupId>
			<artifactId>sip-servlets-jruby</artifactId>
			<version>1.6.0.FINAL</version>			
		</dependency>
		
		<!-- logging dependency -->
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>${log4j.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>${commons-logging.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.sip</groupId>
			<artifactId>jain-sip-api</artifactId>
			<version>${jain-sip-api.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.sip</groupId>
			<artifactId>jain-sip-ri</artifactId>
			<version>${jain-sip-ri.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>dnsjava</groupId>
			<artifactId>dnsjava</artifactId>
			<version>2.1.0</version>
			<scope>provided</scope>
		</dependency>
		
		<dependency>
			<groupId>net.java.stun4j</groupId>
			<artifactId>stun4j</artifactId>
			<version>1.0.MOBICENTS</version>
			<scope>provided</scope>
		</dependency>

		<!-- Tomcat dependencies -->
		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>catalina</artifactId>
			<version>${tomcat.version}</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>org.apache.tomcat</groupId>
			<artifactId>coyote</artifactId>
			<version>${tomcat.version}</version>
			<scope>provided</scope>
		</dependency>									
		
		<!-- javax.mail deps for multipart support -->
		<dependency>
			<groupId>javax.activation</groupId>
			<artifactId>activation</artifactId>
			<version>1.1.1</version>
			<scope>provided</scope>
		</dependency>

		<dependency>
			<groupId>javax.mail</groupId>
			<artifactId>mail</artifactId>
			<version>1.4</version>
			<scope>provided</scope>
		</dependency>
		
		<!-- mobicents sip stack extensions deps -->
		<dependency>			
			<groupId>org.mobicents.ha.javax.sip</groupId>
			<artifactId>mobicents-jain-sip-ha-core</artifactId>
			<version>${mobicents.jain.sip.ha.version}</version>	
			<scope>provided</scope>
		</dependency>
		
		<dependency>			
			<groupId>org.mobicents.javax.sip</groupId>
			<artifactId>mobicents-jain-sip-ext</artifactId>
			<version>${mobicents.jain.sip.ext.version}</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
	
	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
				<filtering>true</filtering>
			</resource>
		</resources>		
		<plugins>	
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>buildnumber-maven-plugin</artifactId>
				<version>1.0-beta-4</version>
				<executions>
					<execution>
						<phase>validate</phase>
						<goals>
							<goal>create</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<buildNumberPropertiesFileLocation>${basedir}/src/main/resources/org/mobicents/servlet/sip/core</buildNumberPropertiesFileLocation>					
					<revisionOnScmFailure>no-revision</revisionOnScmFailure>
				</configuration>
			</plugin>	
			<plugin>
				<artifactId>maven-eclipse-plugin</artifactId>
   				<groupId>org.mobicents.tools</groupId>
    			<version>${mobicents.tools.mavenplugin.eclipse.version}</version>
				<inherited>false</inherited>
				<executions />
				<configuration>
					<generateProjectsForModules>true</generateProjectsForModules>
					<resolveTransitiveDependencies>true</resolveTransitiveDependencies>
					<eclipseProjectName>sip-servlets-impl</eclipseProjectName>
				</configuration>
			</plugin>
		</plugins>		
	</build>	
	<profiles>
			<profile>			
			<id>tomcat-distro</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>			
			<build>			
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<phase>package</phase>
								<configuration>
									<tasks>
										<copy verbose="true" file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${CATALINA_HOME}/lib" />
										<copy verbose="true" file="docs/logging.properties" todir="${CATALINA_HOME}/conf" />
										<copy verbose="true" file="docs/log4j.xml" todir="${CATALINA_HOME}/lib" />
										<copy verbose="true" file="docs/mss-sip-stack.properties" todir="${CATALINA_HOME}/conf" />
                                        <copy todir="${CATALINA_HOME}">
                                            <fileset dir="LICENSES" casesensitive="yes">
                                            	<include name="**/*" />
  												<exclude name="GPL-LICENSE.TXT" />
                                            </fileset>
                                        </copy>
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
		 	        	<groupId>org.apache.maven.plugins</groupId>
		 	        	<artifactId>maven-dependency-plugin</artifactId>
		 	        	<executions>
		 	          		<execution>
		 	            			<id>copy-to-tomcat-lib</id>
		 	            			<phase>package</phase>
		 	            			<goals>
										<goal> copy-dependencies </goal>
		 	            			</goals>
		 	            			<configuration>
									<includeArtifactIds>jain-sip-api,jain-sip-ri,log4j,commons-logging,dnsjava,stun4j,activation,mail,mobicents-jain-sip-ha-core,mobicents-jain-sip-ext</includeArtifactIds>
					    			<outputDirectory>${CATALINA_HOME}/lib</outputDirectory>
		 	            			</configuration>
		 	          		</execution>
		 	        	</executions>
		 	      	</plugin>
				</plugins>
			</build>
		</profile>
		<profile>			
			<id>tomcat</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>			
			<build>			
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<phase>package</phase>
								<configuration>
									<tasks>
										<copy verbose="true" file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${env.CATALINA_HOME}/lib" />
										<copy verbose="true" file="docs/logging.properties" todir="${env.CATALINA_HOME}/conf" />
										<copy verbose="true" file="docs/log4j.xml" todir="${env.CATALINA_HOME}/lib" />
										<copy verbose="true" file="docs/mss-sip-stack.properties" todir="${CATALINA_HOME}/conf" />
                                        <copy todir="${env.CATALINA_HOME}">
                                            <fileset dir="LICENSES" casesensitive="yes">
                                            	<include name="**/*" />
  												<exclude name="GPL-LICENSE.TXT" />
                                            </fileset>
                                        </copy>
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
		 	        	<groupId>org.apache.maven.plugins</groupId>
		 	        	<artifactId>maven-dependency-plugin</artifactId>
		 	        	<executions>
		 	          		<execution>
		 	            			<id>copy-to-tomcat-lib</id>
		 	            			<phase>package</phase>
		 	            			<goals>
										<goal> copy-dependencies </goal>
		 	            			</goals>
		 	            			<configuration>
									<includeArtifactIds>jain-sip-api,jain-sip-ri,concurrent,log4j,commons-logging,dnsjava,stun4j,activation,mail,mobicents-jain-sip-ha-core,mobicents-jain-sip-ext</includeArtifactIds>
					    			<outputDirectory>${env.CATALINA_HOME}/lib</outputDirectory>
		 	            			</configuration>
		 	          		</execution>
		 	        	</executions>
		 	      	</plugin>
				</plugins>
			</build>
		</profile>		
		<profile>		
			<id>jboss</id>						
			<build>			
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<phase>package</phase>
								<configuration>
									<tasks>
										<copy verbose="true" file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${env.JBOSS_HOME}/server/${node}/deploy/jboss-web.deployer" />
										<copy verbose="true" file="docs/jboss-log4j.xml" todir="${env.JBOSS_HOME}/server/${node}/conf" />
										<copy verbose="true" file="docs/mss-sip-stack.properties" todir="${env.JBOSS_HOME}/server/${node}/conf" />
                                        <copy todir="${env.JBOSS_HOME}/docs/licenses">
                                            <fileset file="LICENSES/*" />
                                        </copy>
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
		 	        	<groupId>org.apache.maven.plugins</groupId>
		 	        	<artifactId>maven-dependency-plugin</artifactId>
		 	        	<executions>		 	          		
		 	          		<execution>
		 	            			<id>copy-to-jboss-lib</id>
		 	            			<phase>package</phase>
		 	            			<goals>
										<goal>copy-dependencies</goal>
		 	            			</goals>
		 	            			<configuration>
									<includeArtifactIds>jain-sip-api,jain-sip-ri,dnsjava,stun4j,mobicents-jain-sip-ha-core,mobicents-jain-sip-ext</includeArtifactIds>
					    			<outputDirectory>${env.JBOSS_HOME}/server/${node}/deploy/jboss-web.deployer</outputDirectory>
		 	            			</configuration>
		 	          		</execution>
		 	        	</executions>
		 	      	</plugin>
				</plugins>
			</build>
		</profile>		
		<profile>		
			<id>jboss-distro</id>			
			<build>			
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<phase>package</phase>
								<configuration>
									<tasks>
										<copy verbose="true" file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${JBOSS_HOME}/server/${node}/deploy/jboss-web.deployer" />
										<copy verbose="true" file="docs/mss-sip-stack.properties" todir="${env.JBOSS_HOME}/server/${node}/conf" />
                                        <copy todir="${JBOSS_HOME}/docs/licenses">
                                            <fileset file="LICENSES/*" />
                                        </copy>
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
		 	        	<groupId>org.apache.maven.plugins</groupId>
		 	        	<artifactId>maven-dependency-plugin</artifactId>
		 	        	<executions>		 	          		
		 	          		<execution>
		 	            			<id>copy-to-jboss-lib</id>
		 	            			<phase>package</phase>
		 	            			<goals>
										<goal> copy-dependencies </goal>
		 	            			</goals>
		 	            			<configuration>
									<includeArtifactIds>jain-sip-api,jain-sip-ri,dnsjava,stun4j,mobicents-jain-sip-ha-core,mobicents-jain-sip-ext</includeArtifactIds>
					    			<outputDirectory>${JBOSS_HOME}/server/${node}/deploy/jboss-web.deployer/</outputDirectory>
		 	            			</configuration>
		 	          		</execution>
		 	        	</executions>
		 	      	</plugin>
				</plugins>
			</build>
		</profile>
		<profile>		
			<id>jboss-5</id>			
			<build>			
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<phase>package</phase>
								<configuration>
									<tasks>
										<copy verbose="true" file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${env.JBOSS_HOME}/server/${node}/deploy/jbossweb.sar" />										
										<copy verbose="true" file="docs/jboss5/jboss-log4j.xml" todir="${env.JBOSS_HOME}/server/${node}/conf" />
										<copy verbose="true" file="docs/mss-sip-stack.properties" todir="${env.JBOSS_HOME}/server/${node}/conf" />
                                        <copy todir="${env.JBOSS_HOME}/docs/licenses">
                                            <fileset file="LICENSES/*" />
                                        </copy>
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
		 	        	<groupId>org.apache.maven.plugins</groupId>
		 	        	<artifactId>maven-dependency-plugin</artifactId>
		 	        	<executions>		 	          		
		 	          		<execution>
		 	            			<id>copy-to-jboss-lib</id>
		 	            			<phase>package</phase>
		 	            			<goals>
										<goal>copy-dependencies</goal>
		 	            			</goals>
		 	            			<configuration>
									<includeArtifactIds>jain-sip-api,jain-sip-ri,dnsjava,stun4j,mobicents-jain-sip-ha-core,mobicents-jain-sip-ext</includeArtifactIds>
					    			<outputDirectory>${env.JBOSS_HOME}/server/${node}/deploy/jbossweb.sar</outputDirectory>
		 	            			</configuration>
		 	          		</execution>
		 	        	</executions>
		 	      	</plugin>
				</plugins>
			</build>
		</profile>
		<profile>		
			<id>jboss-5-distro</id>			
			<build>			
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.1</version>
						<executions>
							<execution>
								<phase>package</phase>
								<configuration>
									<tasks>
										<copy verbose="true" file="${project.build.directory}/${project.build.finalName}.${project.packaging}" todir="${JBOSS_HOME}/server/${node}/deploy/jbossweb.sar" />										
										<copy verbose="true" file="docs/mss-sip-stack.properties" todir="${JBOSS_HOME}/server/${node}/conf" />
                                        <copy todir="${JBOSS_HOME}/docs/licenses">
                                            <fileset file="LICENSES/*" />
                                        </copy>
									</tasks>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<plugin>
		 	        	<groupId>org.apache.maven.plugins</groupId>
		 	        	<artifactId>maven-dependency-plugin</artifactId>
		 	        	<executions>		 	          		
		 	          		<execution>
		 	            			<id>copy-to-jboss-lib</id>
		 	            			<phase>package</phase>
		 	            			<goals>
										<goal>copy-dependencies</goal>
		 	            			</goals>
		 	            			<configuration>
									<includeArtifactIds>jain-sip-api,jain-sip-ri,dnsjava,stun4j,mobicents-jain-sip-ha-core,mobicents-jain-sip-ext</includeArtifactIds>
					    			<outputDirectory>${JBOSS_HOME}/server/${node}/deploy/jbossweb.sar</outputDirectory>
		 	            			</configuration>
		 	          		</execution>
		 	        	</executions>
		 	      	</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>	
</project>
