<?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.exoplatform.platform</groupId>
    <artifactId>exo.platform.packaging</artifactId>
    <version>3.5.0-Beta3</version>
  </parent>
  <artifactId>exo.platform.packaging.source</artifactId>
  <packaging>pom</packaging>
  <name>eXo Platform - Packaging Source</name>
  <profiles>
  <profile>
  <id>release</id>
  <build>
  <plugins>
   <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
             <id>unpack-platform-zip</id>
             <phase>generate-resources</phase>
             <goals>
               <goal>unpack</goal>
             </goals>
             <configuration>
               <overWriteSnapshots>true</overWriteSnapshots>                
               <artifactItems>
                                <artifactItem>
					<groupId>org.exoplatform.ecms</groupId>
					<artifactId>exo-ecms</artifactId>
					<version>${org.exoplatform.ecms.version}</version>
					<type>zip</type>
                                        <outputDirectory>${project.build.directory}/source</outputDirectory>
					<classifier>source-release</classifier>
				</artifactItem>
				<artifactItem>
					<groupId>org.exoplatform.platform</groupId>
					<artifactId>exo.platform.parent</artifactId>
					<version>${project.version}</version>
					<type>zip</type>
                                        <outputDirectory>${project.build.directory}/source</outputDirectory>					          
                                        <classifier>source-release</classifier>
				</artifactItem>
                                <artifactItem>
					<groupId>org.exoplatform.social</groupId>
					<artifactId>social-project</artifactId>
					<version>${org.exoplatform.social.version}</version>
					<type>zip</type>
                                        <outputDirectory>${project.build.directory}/source</outputDirectory>
					<classifier>source-release</classifier>
				</artifactItem>
                                <artifactItem>
					<groupId>org.exoplatform.cs</groupId>
					<artifactId>cs</artifactId>
					<version>${org.exoplatform.cs.version}</version>
					<type>zip</type>
                                        <outputDirectory>${project.build.directory}/source</outputDirectory>
					<classifier>source-release</classifier>
				</artifactItem>
                                <artifactItem>
					<groupId>org.exoplatform.ks</groupId>
					<artifactId>ks</artifactId>
					<version>${org.exoplatform.ks.version}</version>
					<type>zip</type>
                                        <outputDirectory>${project.build.directory}/source</outputDirectory>
					<classifier>source-release</classifier>
				</artifactItem>                               
                                <artifactItem>
					<groupId>org.exoplatform.commons</groupId>
					<artifactId>exo.platform.commons</artifactId>
					<version>${org.exoplatform.commons.version}</version>
					<type>zip</type>
                                        <outputDirectory>${project.build.directory}/source</outputDirectory>
					<classifier>source-release</classifier>
				</artifactItem>
                                <!--Inactive Until PLF uses JCR CR4 versions -->
                                <!--artifactItem>
					<groupId>org.exoplatform.core</groupId>
					<artifactId>core-parent</artifactId>
					<version>${org.exoplatform.core.version}</version>
					<type>zip</type>
                                        <outputDirectory>${project.build.directory}/source</outputDirectory>
					<classifier>source-release</classifier>
				</artifactItem>
                                <artifactItem>
					<groupId>org.exoplatform.gwt</groupId>
					<artifactId>exo-gwtframework-parent</artifactId>
					<version>${org.exoplatform.gwtframework.version}</version>
					<type>zip</type>
                                        <outputDirectory>${project.build.directory}/source</outputDirectory>
					<classifier>source-release</classifier>
				</artifactItem>                                
                                <artifactItem>
					<groupId>org.exoplatform.jcr</groupId>
 					<artifactId>jcr-parent</artifactId>
 					<version>${org.exoplatform.jcr.version}</version>
 					<type>zip</type>
                                         <outputDirectory>${project.build.directory}/source</outputDirectory>
 					<classifier>source-release</classifier>
 				</artifactItem>
                                 <artifactItem>
 					<groupId>org.exoplatform.kernel</groupId>
 					<artifactId>kernel-parent</artifactId>
 					<version>${org.exoplatform.kernel.version}</version>
 					<type>zip</type>
                                         <outputDirectory>${project.build.directory}/source</outputDirectory>
 					<classifier>source-release</classifier>
 				</artifactItem>
                                 <artifactItem>
 					<groupId>org.exoplatform.ws</groupId>
 					<artifactId>ws-parent</artifactId>
 					<version>${org.exoplatform.ws.version}</version>
 					<type>zip</type>
                                         <outputDirectory>${project.build.directory}/source</outputDirectory>
 					<classifier>source-release</classifier>
 				</artifactItem-->
                </artifactItems>
              </configuration>
            </execution>
         </executions>
       </plugin>
       <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-assembly-plugin</artifactId>
             <dependencies>             
             </dependencies>
             <executions>
               <execution>
                 <id>source</id>
                 <phase>package</phase>
                 <goals>
                   <goal>single</goal>
                 </goals>
                 <configuration>
                   <descriptors>
                     <descriptor>src/main/assembly/source-archive.xml</descriptor>
                   </descriptors>                  
                   <appendAssemblyId>false</appendAssemblyId>
                 </configuration>
               </execution>
             </executions>
           </plugin>     
    </plugins>
   </build>
   </profile>
 </profiles>
</project>
