<?xml version="1.0" encoding="UTF-8"?>
<!--
 Licensed to the Apache Software Foundation (ASF) under one
 or more contributor license agreements.  See the NOTICE file
 distributed with this work for additional information
 regarding copyright ownership.  The ASF licenses this file
 to you under the Apache License, Version 2.0 (the
 "License"); you may not use this file except in compliance
 with the License.  You may obtain a copy of the License at
 
 http://www.apache.org/licenses/LICENSE-2.0
 
 Unless required by applicable law or agreed to in writing,
 software distributed under the License is distributed on an
 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 KIND, either express or implied.  See the License for the
 specific language governing permissions and limitations
 under the License.   
-->
<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">
  
  <modelVersion>4.0.0</modelVersion>
  <groupId>org.apache.openjpa</groupId>
  <artifactId>sdo-persistence</artifactId>
  <packaging>jar</packaging>
  <version>0.2.0-SNAPSHOT</version>
  <name>Fluid</name>
  <description>Persistence Service for Service Data Objects using OpenJPA</description>
  <url>http://people.apache.org/~ppoddar/fluid/site/index.html</url>
  <inceptionYear>2007</inceptionYear>
   <developers>
         <developer>
            <name>Pinaki Poddar</name>
            <id>ppoddar</id>
            <organization>BEA Systems, Inc.</organization>
            <email>ppoddar@bea.com</email>
        </developer>
  	</developers>
    <contributors>
         <contributor>
            <name>Sanjeeb Sahoo</name>
            <organization>Sun MicroSystems, Inc.</organization>
            <email>Sanjeeb.Sahoo@sun.com</email>
        </contributor>
  	</contributors>
  	
 
  	<scm>
        <connection>scm:svn:http://${scm.dir}</connection>
        <developerConnection>scm:svn:https://${scm.dir}</developerConnection>
        <url>https://${scm.dir}</url>
  	</scm>
  	
    <organization>
        <name>Apache Software Labs</name>
        <url>http://labs.apache.org</url>
    </organization>
  
  
  <properties>
        <scm.dir>svn.apache.org/repos/asf/labs/fluid</scm.dir>
        <generated.src>src/test/generated</generated.src>
        <javadoc.output.dir>src/site/resources</javadoc.output.dir>
        <maven.sdocbook.src.dir>src/site/docbook</maven.sdocbook.src.dir>
  </properties>
  
  <repositories>
        <repository>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <url>http://www.ibiblio.org/maven2</url>
        </repository>
        <repository>
            <id>maven-central</id>
            <name>Maven Plugin Repository</name>
            <url>http://repo1.maven.org</url>
        </repository>
        <repository>
            <id>apache-snapshots</id>
            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
        </repository>
        <repository>
            <id>apache-incubator</id>
            <url>http://people.apache.org/repo/m2-incubating-repository</url>
        </repository>
        <repository>
            <id>serp-rep</id>
            <url>http://serp.sourceforge.net/m2repo</url>
        </repository>
  </repositories>
    
  <dependencies>
    <dependency>
      <groupId>org.apache.openjpa</groupId>
      <artifactId>openjpa</artifactId>
      <version>1.0.0-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>
    
    <dependency>
       <groupId>org.apache.openjpa</groupId>
       <artifactId>openjpa-lib</artifactId>
       <version>1.0.0-SNAPSHOT</version>
       <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>net.sourceforge.serp</groupId>
  	  <artifactId>serp</artifactId>
  	  <version>1.13.0</version>
  	  <scope>compile</scope>
    </dependency>
        
    <dependency>
      <groupId>org.apache.tuscany.sdo</groupId>
  	  <artifactId>tuscany-sdo-impl</artifactId>
  	  <version>1.0-incubating-beta1</version>
  	  <scope>compile</scope>
    </dependency>
    
    <dependency>
      <groupId>mysql</groupId>
      <artifactId>mysql-connector-java</artifactId>
      <version>5.0.4</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
      <groupId>commons-collections</groupId>
      <artifactId>commons-collections</artifactId>
      <version>3.2</version>
      <scope>test</scope>
    </dependency>       
    
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>3.8.1</version>
      <scope>test</scope>
    </dependency>
    
    <dependency>
	    <groupId>org.apache.tuscany.das</groupId>
		<artifactId>tuscany-das-rdb</artifactId>
		<version>1.0-incubator-M2</version>
	</dependency>
	
  </dependencies>
  
  
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                    <fork>true</fork>
                </configuration>
            </plugin>
            
            <plugin>
        		<groupId>org.apache.maven.plugins</groupId>
        		<artifactId>maven-surefire-plugin</artifactId>
        		<configuration>
          			<forkMode>pertest</forkMode>
          			<disableXmlReport>true</disableXmlReport>
          			<trimStackTrace>true</trimStackTrace>
        		</configuration>
      		</plugin>
<!--      		
      		<plugin>
      			<groupId>org.apache.maven.plugins</groupId>
      			<artifactId>maven-javadoc-plugin</artifactId>
      			<version>2.2</version>
				<configuration>
                   <outputDirectory>${javadoc.output.dir}</outputDirectory>
                   <reportOutputDirectory>${javadoc.output.dir}</reportOutputDirectory>
                   <additionalparam>${javadoc.additionalparam}</additionalparam>
                   <aggregate>true</aggregate>
                   <verbose>false</verbose>
                   <noqualifier>all</noqualifier>
                   <maxmemory>512m</maxmemory>
                   <links>
                      <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
                      <link>http://java.sun.com/javaee/5/docs/api</link>
                      <link>http://openjpa.apache.org/docs/latest/javadoc/</link>
                      <link>http://jakarta.apache.org/commons/collections/api-release</link>
                    </links>
                </configuration>  
                <executions>
                  <execution>
                     <goals>
                       <goal>javadoc</goal>
                       <goal>test-javadoc</goal>
                     </goals>
                   </execution>
                 </executions>    			
      		</plugin>
-->      		
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>test-compile</phase>
                        <configuration>
                    		<fork>true</fork>
                            <tasks>
                                <path id="cp">
                                    <pathelement path="${basedir}/test/resources"/>
                                    <path refid="maven.test.classpath"/>
                                    <path refid="maven.compile.classpath"/>
                                    <path refid="maven.dependency.classpath"/>
                                </path>
                                <taskdef name="openjpac" classname=
                                    "org.apache.openjpa.ant.PCEnhancerTask">
                                    <classpath refid="cp"/>
                                </taskdef>
                                <fileset id="enhance.path.ref"
                                    dir="${project.build.testOutputDirectory}">
                                    <include name="**/*.class"/>
                                </fileset>
                                <!-- Generate POJO source files from META-INF/*.xsd -->
                                <mkdir dir="${generated.src}"/>
                                <echo message="Generating Java classes from SDO Types"/>
                                <java classname="org.apache.openjpa.sdo.SDO2POJOGenerator">
                                  <classpath refid="cp"/>
                                  <arg value="-d"/>
                                  <arg value="${generated.src}"/>
                                  <arg value="META-INF/po.xsd"/>
                                  <arg value="META-INF/person.xsd"/>
                                </java>
                                <echo message="Compiling generated Java source"/>
                                <javac srcdir="${generated.src}" 
                                	executable="${env.JAVA_HOME}/bin/javac.exe"
                                	fork="true"
                                	destdir="${project.build.testOutputDirectory}">
                                    <classpath refid="cp"/>
                                </javac>
                                <echo message="Enhancing generated Java source"/>
                                <java classname="org.apache.openjpa.enhance.PCEnhancer">
                                    <classpath refid="cp"/>
                                    <arg value="-properties"/>
                                    <arg value="META-INF/persistence.xml"/>
                                </java>
                            </tasks>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            
        </plugins>
    </build>  
    
    
    <profiles>    
        <profile>
            <!--                        
                Javadoc profile. Docs can be built by running:
                    mvn process-classes -Dtest=false -Pjavadoc-profile
            -->  
            <id>javadoc-profile</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>2.2</version>
                        <executions>
                            <execution>
                                <phase>process-classes</phase>
                                <goals><goal>javadoc</goal></goals>
                                <configuration>
                                    <outputDirectory>${javadoc.output.dir}</outputDirectory>
                                    <reportOutputDirectory>${javadoc.output.dir}</reportOutputDirectory>
                                    <additionalparam>
                                        ${javadoc.additionalparam}
                                    </additionalparam>
                                    <aggregate>true</aggregate>
                                    <verbose>false</verbose>
                                    <noqualifier>all</noqualifier>
                                    <!-- <linksource>true</linksource> -->
                                    <maxmemory>512m</maxmemory>
                                    <links>
                                        <link>http://java.sun.com/j2se/1.5.0/docs/api</link>
                                        <link>http://java.sun.com/javaee/5/docs/api</link>
                                        <link>http://jakarta.apache.org/commons/collections/api-release</link>
                                    </links>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
            <activation>
                <property>
                    <name>builddocs</name>
                    <value>true</value>
                </property>
            </activation>
        </profile>
     </profiles>
     
     <distributionManagement>
  	<!-- use the following if you're not using a snapshot version. -->
  		<!-- repository>
    		<id>repo</id>
    			<name>Repository Name</name>
    			<url>scp://host/path/to/repo</url>
  		</repository -->
  		<!-- use the following if you ARE using a snapshot version. -->
  		<snapshotRepository>
    		<id>fluid.snapshot.repo</id>
    		<name>Fluid Snapshot Repository</name>
    		<url>scp://svn.apache.org/repos/asf/labs/fluid</url>
  		</snapshotRepository>
     	<site>
      		<id>fluid.website</id>
         		<!-- Set to the deployment URL on your own server. -->
         	<url>scp://people.apache.org/home/ppoddar/public_html/fluid/site/</url>
      	</site>
	</distributionManagement>
     
     <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
                  <reportSets>
                     <reportSet>
                        <reports>
                           <report>dependencies</report>
                           <report>project-team</report>
                           <report>mailing-list</report>
                           <report>scm</report>
                        </reports>
                     </reportSet>
                  </reportSets>
      </plugin>
    </plugins>
  </reporting>
</project>
