<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>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<modelVersion>4.0.0</modelVersion>
	<groupId>com.jsmartframework</groupId>
	<artifactId>jsmart-web</artifactId>
	<version>2.0.0</version>
	<packaging>jar</packaging>

	<name>JSmart Web Framework</name>
	<description>Java Web Development Framework</description>
	<url>http://jsmartframework.com</url>

	<licenses>
		<license>
			<name>GNU Lesser General Public License version 3.0</name>
			<url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:jefalbino/jsmart-web.git</connection>
		<developerConnection>scm:git:git@github.com:jefalbino/jsmart-web.git</developerConnection>
		<url>git@github.com:jefalbino/jsmart-web.git</url>
	</scm>

	<dependencies>

		<!-- Servlet -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.1.0</version>
		</dependency>

		<!-- JSTL -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
		</dependency>
		
		<!-- JSP -->
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>javax.servlet.jsp-api</artifactId>
			<version>2.3.1</version>
		</dependency>

		<!-- Expression Language -->
		<dependency>
			<groupId>javax.el</groupId>
			<artifactId>javax.el-api</artifactId>
			<version>3.0.0</version>
		</dependency>

		<!-- Java EE Injection -->
		<dependency>
			<groupId>javax.inject</groupId>
			<artifactId>javax.inject</artifactId>
			<version>1</version>
		</dependency>
		
		<!-- EJB -->
		<dependency>
			<groupId>javax.ejb</groupId>
			<artifactId>ejb-api</artifactId>
			<version>3.0</version>
		</dependency>

		<!-- Spring Web -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>4.1.6.RELEASE</version>
		</dependency>

        <!-- Spring Web MVC for RequestPath -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>4.1.6.RELEASE</version>
        </dependency>

        <!-- JAXB -->
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.2.6</version>
			<scope>provided</scope>
		</dependency>

		<!-- GSON -->
		<dependency>
    		<groupId>com.google.code.gson</groupId>
    		<artifactId>gson</artifactId>
    		<version>2.3.1</version>
		</dependency>

		<!-- Reflections powered by google -->
		<dependency>
			<groupId>org.reflections</groupId>
			<artifactId>reflections</artifactId>
			<version>0.9.9-RC1</version>
		</dependency>

		<!-- Commons Lang to Escape Input -->
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.4</version>
		</dependency>

		<!-- JodaTime to support DateTime -->
		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>2.2</version>
		</dependency>

		<!-- Google Html Compressor -->
		<dependency>
			<groupId>com.googlecode.htmlcompressor</groupId>
			<artifactId>htmlcompressor</artifactId>
			<version>1.4</version>
		</dependency>

		<!-- Apache Commons Codec for Encryption -->
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>1.8</version>
		</dependency>

        <!-- Apache Commons IO for Files -->
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-io</artifactId>
            <version>1.3.2</version>
        </dependency>

		<!-- JUnit -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>

	</dependencies>

	<profiles>
		<profile>
			<id>default</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-compiler-plugin</artifactId>
						<version>2.3.2</version>
						<configuration>
							<source>1.7</source>
							<target>1.7</target>
						</configuration>
					</plugin>

					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<version>2.4.3</version>
						<configuration>
							<skip>false</skip>
						</configuration>
					</plugin>

					<!-- BEGIN DEBUG MODE
					<plugin>
    					<groupId>org.apache.maven.plugins</groupId>
   						<artifactId>maven-antrun-plugin</artifactId>
    					<version>1.1</version>
    					<executions>
        					<execution>
        						<phase>prepare-package</phase>
        						<goals>
              						<goal>run</goal>
            					</goals>
            					<configuration>
                					<tasks>
                    					<copy file="${basedir}/src/main/resources/descriptors/debug/jsmart_headers.json" tofile="${basedir}/target/classes/jsmart_headers.json" />
                    					<copy file="${basedir}/src/main/resources/descriptors/debug/jsmart_resources.json" tofile="${basedir}/target/classes/jsmart_resources.json" />
                    					<delete dir="${basedir}/target/classes/descriptors" />
                    				</tasks>
                				</configuration>
            				</execution>
						</executions>
    				</plugin> -->
    				<!-- END DEBUG MODE -->

    				<!-- BEGIN RELEASE MODE -->
					<plugin>
						<groupId>com.samaxes.maven</groupId>
						<artifactId>minify-maven-plugin</artifactId>
						<version>1.7.2</version>
						<executions>
							<execution>
								<id>minify</id>
								<phase>process-resources</phase>
								<goals>
									<goal>minify</goal>
								</goals>
								<configuration>
									<charset>utf-8</charset>
									<webappSourceDir>${basedir}/src/main</webappSourceDir>
									<webappTargetDir>${project.build.directory}</webappTargetDir>
	
			                        <cssSourceDir>resources/jsmart</cssSourceDir>
									<cssSourceFiles>
										<cssSourceFile>bootstrap-3.3.5/css/bootstrap.css</cssSourceFile>
										<cssSourceFile>bootstrap-datetime-4.7.14/css/bootstrap-datetime.css</cssSourceFile>
										<cssSourceFile>css/jsmart.css</cssSourceFile>
									</cssSourceFiles>
									<cssTargetDir>classes/jsmart/css</cssTargetDir>
									<cssFinalFile>jsmart.css</cssFinalFile>
	
									<jsSourceDir>resources/jsmart</jsSourceDir>
									<jsSourceFiles>
										<jsSourceFile>jquery-1.11.2/jquery-1.11.2.js</jsSourceFile>
										<jsSourceFile>jquery-form-3.51.0/jquery.form-3.51.0.js</jsSourceFile>
										<jsSourceFile>momentjs-2.9.0/js/moment-locales.js</jsSourceFile>
										<jsSourceFile>bootstrap-3.3.5/js/bootstrap.js</jsSourceFile>
										<jsSourceFile>bootstrap-3.3.5/js/bootstrap-input-mask.js</jsSourceFile>
										<jsSourceFile>bootstrap-datetime-4.7.14/js/bootstrap-datetime.js</jsSourceFile>
										<jsSourceFile>js/jsmart.js</jsSourceFile>
									</jsSourceFiles>
									<jsTargetDir>classes/jsmart/js</jsTargetDir>
									<jsFinalFile>jsmart.js</jsFinalFile>
	
								</configuration>
							</execution>
						</executions>
					</plugin>

					<plugin>
    					<groupId>org.apache.maven.plugins</groupId>
   						<artifactId>maven-antrun-plugin</artifactId>
    					<version>1.1</version>
    					<executions>
        					<execution>
        						<phase>prepare-package</phase>
        						<goals>
              						<goal>run</goal>
            					</goals>
            					<configuration>
                					<tasks>
                    					<copy file="${basedir}/src/main/resources/descriptors/release/jsmart_headers.json" tofile="${basedir}/target/classes/jsmart_headers.json" />
                    					<copy file="${basedir}/src/main/resources/descriptors/release/jsmart_resources.json" tofile="${basedir}/target/classes/jsmart_resources.json" />

                    					<copy file="${basedir}/src/main/resources/jsmart/bootstrap-3.3.5/css/bootstrap.css.map" tofile="${basedir}/target/classes/jsmart/css/bootstrap.css.map" />
										<copydir src="${basedir}/src/main/resources/jsmart/bootstrap-3.3.5/fonts" dest="${basedir}/target/classes/jsmart/fonts" />

										<delete dir="${basedir}/target/classes/descriptors" />
                    					<delete dir="${basedir}/target/classes/jsmart/bootstrap-3.3.5" />
                    					<delete dir="${basedir}/target/classes/jsmart/bootstrap-datetime-4.7.14" />
                    					<delete dir="${basedir}/target/classes/jsmart/jquery-1.11.2" />
                    					<delete dir="${basedir}/target/classes/jsmart/jquery-form-3.51.0" />
                    					<delete dir="${basedir}/target/classes/jsmart/momentjs-2.9.0" />
                    					<delete>
                    						<fileset dir="${basedir}/target/classes/jsmart/css">
                    							<exclude name="jsmart.min.css" />
                    							<exclude name="bootstrap.css.map" />
                    						</fileset>
                    					</delete>
                    					<delete>
                    						<fileset dir="${basedir}/target/classes/jsmart/js">
                    							<exclude name="jsmart.min.js" />
                    						</fileset>
                    					</delete>
                    				</tasks>
                				</configuration>
            				</execution>
						</executions>
    				</plugin>
					<!-- END RELEASE MODE -->

				</plugins>
			</build>
		</profile>

	</profiles>

</project>