<?xml version="1.0" encoding="UTF-8"?>
<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.sonatype.oss</groupId>
	    <artifactId>oss-parent</artifactId>
	    <version>5</version>
	</parent>

	<groupId>net.sf.itcb.common</groupId>
	<artifactId>main-itcb</artifactId>
	<packaging>pom</packaging>
	<name>main-itcb</name>
	<version>1.0.0</version>
	
	<url>http://itcb.sourceforge.net</url>
	<issueManagement>
        <system>sourceforge</system>
        <url>https://sourceforge.net/tracker/?group_id=370397</url>
    </issueManagement>
    <inceptionYear>2010</inceptionYear>
    
    <mailingLists>
        
    </mailingLists>
    <developers>
        <developer>
            <id>pilerou</id>
            <name>Pierre Le Roux</name>
            <email>pilerou at users.sourceforge.net</email>
            <url />
            <organization>MediaCourtage</organization>
            <organizationUrl />
            <roles>
                <role>Project manager</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>
    <contributors>
        
    </contributors>
    <licenses>
        <license>
            <name>LGPL License</name>
            <url>LICENSE.txt</url>
        </license>
    </licenses>
    <scm>
        <connection>scm:svn:http://itcb.svn.sourceforge.net/svnroot/itcb/main-itcb/tags/main-itcb-1.0.0</connection>
        <developerConnection>scm:svn:https://itcb.svn.sourceforge.net/svnroot/itcb/main-itcb/tags/main-itcb-1.0.0</developerConnection>
        <url>http://itcb.svn.sourceforge.net/viewvc/itcb/main-itcb/tags/main-itcb-1.0.0</url>
    </scm>
    <organization>
        <name>SourceForge ITCB</name>
        <url>http://itcb.sourceforge.net</url>
    </organization>
    
    <repositories>
		<!-- For testing against latest Spring snapshots -->
		<repository>
			<id>org.springframework.maven.snapshot</id>
			<name>Spring Maven Snapshot Repository</name>
			<url>http://maven.springframework.org/snapshot</url>
			<releases><enabled>false</enabled></releases>
			<snapshots><enabled>true</enabled></snapshots>
		</repository>
		<!-- For developing against latest Spring milestones -->
		<repository>
			<id>org.springframework.maven.milestone</id>
			<name>Spring Maven Milestone Repository</name>
			<url>http://maven.springframework.org/milestone</url>
			<snapshots><enabled>false</enabled></snapshots>
		</repository>
		<!-- Repository for Liferay, XMLSchema -->
		<repository>
            <id>Sonatype repository</id>
            <name>Sonatype's Maven repository</name>
            <url>http://oss.sonatype.org/content/groups/public</url>
        </repository>
	</repositories>
    
	
	<properties>
		<java-version>1.6</java-version>
		<org.springframework-version>3.0.5.RELEASE</org.springframework-version>
		<org.springframework.roo-version>1.0.2.RELEASE</org.springframework.roo-version>
		<org.springframework.ws-version>2.0.0-RC1</org.springframework.ws-version>
		<org.aspectj-version>1.6.9</org.aspectj-version>
		<org.slf4j-version>1.5.10</org.slf4j-version>
		<servlet-version>2.5</servlet-version>
		<javax.portlet-version>2.0</javax.portlet-version>
		<com.vaadin-version>6.4.7</com.vaadin-version>
		<junit-version>4.7</junit-version>
		<jaxb-api-version>2.0</jaxb-api-version>
		<jaxb-impl-version>2.0.3</jaxb-impl-version>
		<org.apache.ws.commons.schema-version>1.4.7</org.apache.ws.commons.schema-version>
		
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		
	</properties>		

	
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>${java-version}</source>
					<target>${java-version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>install</id>
						<phase>install</phase>
						<goals>
							<goal>sources</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>aspectj-maven-plugin</artifactId>
				<!-- Have to use version 1.2 since version 1.3 does not appear to work with ITDs -->
				<version>1.2</version>
				<dependencies>
					<!-- You must use Maven 2.0.9 or above or these are ignored (see MNG-2972) -->
					<dependency>
						<groupId>org.aspectj</groupId>
						<artifactId>aspectjrt</artifactId>
						<version>${org.aspectj-version}</version>
					</dependency>
					<dependency>
						<groupId>org.aspectj</groupId>
						<artifactId>aspectjtools</artifactId>
						<version>${org.aspectj-version}</version>
					</dependency>
				</dependencies>
				<executions>
					<execution>
						<goals>
							<goal>compile</goal>
							<goal>test-compile</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<aspectLibraries>
				      <aspectLibrary>
					      <groupId>org.springframework</groupId>
					      <artifactId>spring-aspects</artifactId>
				      </aspectLibrary>
				    </aspectLibraries>
					<outxml>true</outxml>
					<source>${java-version}</source>
					<target>${java-version}</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.6</version>

				<configuration>
					<junitArtifactName>junit:junit</junitArtifactName>
					<excludes>
						<exclude>**/*_Roo_*</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>tomcat-maven-plugin</artifactId>
				<version>1.0-beta-1</version>
			</plugin>	
			
		    <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <version>2.2</version>
            </plugin>
            <plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-release-plugin</artifactId>
				<version>2.1</version>
				<configuration>
					<mavenExecutorId>forked-path</mavenExecutorId>
					<useReleaseProfile>false</useReleaseProfile>
					<arguments>-Psonatype-oss-release</arguments>
					<checkModificationExcludeList>.project,.classpath,.settings</checkModificationExcludeList>
				</configuration>
			</plugin>

		</plugins>
		
	</build>
	
	<dependencies>
				<!-- Test -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>${junit-version}</version>
			<scope>test</scope>
		</dependency>
		
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${org.springframework-version}</version>
			<exclusions>
				<!-- Exclude Commons Logging in favor of SLF4j -->
				<exclusion>
					<groupId>commons-logging</groupId>
					<artifactId>commons-logging</artifactId>
				 </exclusion>
			</exclusions>
			<scope>test</scope>
		</dependency>
		
		<dependency>
	      <groupId>javax.persistence</groupId>
	      <artifactId>persistence-api</artifactId>
	      <version>1.0</version>
	      <scope>provided</scope>
	    </dependency> 
	
	    <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>${jaxb-api-version}</version>
        </dependency>

        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <version>${jaxb-impl-version}</version>
        </dependency>
        
    </dependencies>
    
    
    
   <profiles>
     <profile>
      <id>business</id>
      <activation>
      	<file><exists>.businessProjectType</exists></file>
      </activation>
      <build>
      	<plugins>
      		<plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-dependency-plugin</artifactId>
		       
		        <executions>
		          <execution>
		            <id>unpack-dependencies</id>
		            <phase>generate-sources</phase>
		            <goals>
		              <goal>unpack-dependencies</goal>
		            </goals>
		            <configuration>
		              <includes>WEB-INF/schemas/*.xsd,WEB-INF/xjb/*.xjb</includes>
		              <outputDirectory>${project.build.directory}/xsdImported</outputDirectory>
		              <overWriteReleases>false</overWriteReleases>
		              <overWriteSnapshots>true</overWriteSnapshots>
		              <silent>true</silent>
		            </configuration>
		          </execution>
		        </executions>
		    </plugin>
	
		      <plugin>
		        <artifactId>maven-resources-plugin</artifactId>
		        <version>2.4.3</version>
		        <executions>
		          <execution>
		            <id>copy-resources</id>
		            <phase>validate</phase>
		            <goals>
		              <goal>copy-resources</goal>
		            </goals>
		            <configuration>
		              <outputDirectory>${project.build.directory}/xsdImported/WEB-INF/schemas</outputDirectory>
		              <resources>          
		                <resource>
		                  <directory>src/main/resources/WEB-INF/schemas</directory>
		                </resource>
		              </resources>              
		            </configuration>            
		          </execution>
		        </executions>
		      </plugin>

	
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxb2-maven-plugin</artifactId>
                
                <version>1.3</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>xjc</goal>
                        </goals>
                    </execution>
               </executions>
               
               <configuration>
                    <schemaDirectory>${project.build.directory}/xsdImported/WEB-INF/schemas</schemaDirectory>
              		<bindingDirectory>${project.build.directory}/xsdImported/WEB-INF/xjb</bindingDirectory>
              		<failOnNoSchemas>false</failOnNoSchemas>
               </configuration>
           </plugin>
         </plugins>
      
        </build>
      </profile>
      
      <profile>
      <id>server</id>
      <activation>
      	<file><exists>.serverProjectType</exists></file>
      </activation>
      <build>
      	<plugins>
      		<plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-dependency-plugin</artifactId>
		       
		        <executions>
		          <execution>
		            <id>unpack-dependencies</id>
		            <phase>generate-sources</phase>
		            <goals>
		              <goal>unpack-dependencies</goal>
		            </goals>
		            <configuration>
		              <includes>WEB-INF/schemas/*.xsd</includes>
		              <outputDirectory>src/main/webapp</outputDirectory>
		              <overWriteReleases>false</overWriteReleases>
		              <overWriteSnapshots>true</overWriteSnapshots>
		              <silent>true</silent>
		            </configuration>
		          </execution>
		        </executions>
		    </plugin>

         </plugins>
      
        </build>
      </profile>
    
    
    </profiles>

		
	
</project>
