<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/xsd/maven-4.0.0.xsd">

	<parent>
    	<groupId>com.mindink</groupId>
    	<artifactId>mindink-parent</artifactId>
    	<version>1.0.0.CI-SNAPSHOT</version>
    </parent>

  <modelVersion>4.0.0</modelVersion>
  <artifactId>mindink-web</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  
	
	<dependencies>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-email</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-fileupload</groupId>
			<artifactId>commons-fileupload</artifactId>
		</dependency>
		
		<!-- Spring -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aspects</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-tx</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-webmvc</artifactId>
		</dependency>
		<dependency>
		    <groupId>org.springframework</groupId>
		    <artifactId>spring-jdbc</artifactId>
	    </dependency>	
		<dependency>
		    <groupId>org.springframework.social</groupId>
		    <artifactId>spring-social-core</artifactId>
	    </dependency>
		<dependency>
		    <groupId>org.springframework.social</groupId>
		    <artifactId>spring-social-web</artifactId>
	    </dependency>
		<dependency>
		    <groupId>org.springframework.social</groupId>
		    <artifactId>spring-social-facebook</artifactId>
	    </dependency>
		<dependency>
		    <groupId>org.springframework.social</groupId>
		    <artifactId>spring-social-twitter</artifactId>
	    </dependency>
		<dependency>
			<groupId>org.springframework.security</groupId>
			<artifactId>spring-security-crypto</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Web stuff -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-core-asl</artifactId>
		 </dependency>
		 <dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-mapper-asl</artifactId>
		 </dependency>
		 <dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-jaxrs</artifactId>
		 </dependency>
		 <dependency>
			<groupId>org.codehaus.jackson</groupId>
			<artifactId>jackson-xc</artifactId>
		 </dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-server</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-json</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey.contribs</groupId>
			<artifactId>jersey-spring</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey.contribs</groupId>
			<artifactId>jersey-apache-client</artifactId>
		</dependency>
		<dependency>
			<groupId>com.sun.jersey</groupId>
			<artifactId>jersey-client</artifactId>
		</dependency>
		<dependency>
			<groupId>org.codehaus.jettison</groupId>
			<artifactId>jettison</artifactId>
		</dependency>	
	
		<!-- Logging with SLF4J & LogBack -->
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
		</dependency>
		<dependency>
			<groupId>ch.qos.logback</groupId>
			<artifactId>logback-classic</artifactId>
			<scope>runtime</scope>
		</dependency>

		<!-- Testing -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<scope>test</scope>
		</dependency>

		<!-- Data -->
		<dependency>
			<groupId>org.postgresql</groupId>
			<artifactId>postgresql</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-entitymanager</artifactId>
		</dependency>
		
        <dependency>
            <groupId>com.amazonaws</groupId>
            <artifactId>aws-java-sdk</artifactId>
            <exclusions>
				<exclusion>
		            <groupId>com.fasterxml.jackson.core</groupId>
		            <artifactId>jackson-core</artifactId>
		        </exclusion>
		        <exclusion>
		            <groupId>com.fasterxml.jackson.core</groupId>
		            <artifactId>jackson-databind</artifactId>
		        </exclusion>
		        <exclusion>
		            <groupId>com.fasterxml.jackson.core</groupId>
		            <artifactId>jackson-annotations</artifactId>
				</exclusion>
				<exclusion>
					<groupId>commons-logging</groupId>
	            	<artifactId>commons-logging</artifactId>
				</exclusion>
			</exclusions>
        </dependency>
		
	</dependencies>	



	
	<profiles>

		<profile>
	      <id>dev</id>      
	      <activation>
	      	<activeByDefault>true</activeByDefault>
	      </activation> 
		  <build>
		    <plugins>       
		      <plugin>
		        <artifactId>maven-antrun-plugin</artifactId>
		        <executions>
		          <execution>
		            <id>dev.process.resources</id>
		            <phase>process-resources</phase>
		           <goals>
		              <goal>run</goal>
		            </goals>
		            <configuration>
		              <tasks>
		                <echo>BUILDING ***DEV*** ENVIRONMENT</echo>
		                
						<delete  dir="${project.build.directory}/classes/environment"/>
		                <delete file="${project.build.directory}/${project.build.finalName}/js/config-prod.js"/>
		                <delete file="${project.build.directory}/${project.build.finalName}/js/config-uat.js"/>
		                 
		              </tasks>
		            </configuration>
		          </execution>
		        </executions>
		      </plugin>
		    </plugins>      
		  </build>
	    </profile>
		
	
		<profile>
	      <id>prod</id>       
		  <build>
		    <plugins>       
		      <plugin>
		        <artifactId>maven-antrun-plugin</artifactId>
		        <executions>
		          <execution>
		            <id>prod.process.resources</id>
		            <phase>process-resources</phase>
		           <goals>
		              <goal>run</goal>
		            </goals>
		            <configuration>
		              <tasks>
		                 <echo>BUILDING ***PROD*** ENVIRONMENT</echo>
		                 
		                 <copy file="${basedir}/src/main/resources/environment/app-prod.properties" tofile="${project.build.directory}/classes/app.properties" overwrite="true"/>
						 <delete  dir="${project.build.directory}/classes/environment"/>
		                 
		                 <!-- <copy file="${basedir}/src/main/webapp/js/config-prod.js" tofile="${project.build.directory}/${project.build.finalName}/js/config.js" overwrite="true"/>
		                 <delete file="${project.build.directory}/${project.build.finalName}/js/config-prod.js"/>
		                 <delete file="${project.build.directory}/${project.build.finalName}/js/config-uat.js"/> -->
		              </tasks>
		            </configuration>
		          </execution>
		        </executions>
		      </plugin>
		    </plugins>      
		  </build>
	    </profile>
	    
	    <profile>
	      <id>uat</id>       
		  <build>
		    <plugins>       
		      <plugin>
		        <artifactId>maven-antrun-plugin</artifactId>
		        <executions>
		          <execution>
		            <id>uat.process.resources</id>
		            <phase>process-resources</phase>
		           <goals>
		              <goal>run</goal>
		            </goals>
		            <configuration>
		              <tasks>
		                 <echo>BUILDING ***UAT*** ENVIRONMENT</echo>
		                 
		                 <copy file="${basedir}/src/main/resources/environment/app-uat.properties" tofile="${project.build.directory}/classes/app.properties" overwrite="true"/>
						 <delete  dir="${project.build.directory}/classes/environment"/>
		                 
		                 <!-- <copy file="${basedir}/src/main/webapp/js/config-uat.js" tofile="${project.build.directory}/${project.build.finalName}/js/config2.js" overwrite="true"/>
		                 <delete file="${project.build.directory}/${project.build.finalName}/js/config-prod.js"/>
		                 <delete file="${project.build.directory}/${project.build.finalName}/js/config-uat.js"/> -->
		              </tasks>
		            </configuration>
		            
		          </execution>
		        </executions>
		      </plugin>
		    </plugins>      
		  </build>
	    </profile>
	    
	</profiles>
	
	
</project>
