<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">
   <parent>
      <groupId>org.exoplatform.core</groupId>
      <artifactId>core-parent</artifactId>
      <version>2.4.12-GA</version>
      <relativePath>../../pom.xml</relativePath>
   </parent>

   <modelVersion>4.0.0</modelVersion>
   <artifactId>core.packaging.module</artifactId>
   <packaging>pom</packaging>
   <name>eXo Core Build module</name>

   <properties>
        <exobuild.name>core</exobuild.name>
        <exobuild.type>module</exobuild.type>
        <enforcer.skip>true</enforcer.skip>
   </properties>

   <!-- declare the same dependencies than in the module.js -->
   <dependencies>
        <dependency><groupId>org.exoplatform.core</groupId><artifactId>exo.core.component.database</artifactId><version>2.4.12-GA</version></dependency>
        <dependency><groupId>org.exoplatform.core</groupId><artifactId>exo.core.component.document</artifactId><version>2.4.12-GA</version></dependency>
        <dependency><groupId>org.exoplatform.core</groupId><artifactId>exo.core.component.organization.api</artifactId><version>2.4.12-GA</version></dependency>
        <dependency><groupId>org.exoplatform.core</groupId><artifactId>exo.core.component.organization.ldap</artifactId><version>2.4.12-GA</version></dependency>
        <dependency><groupId>org.exoplatform.core</groupId><artifactId>exo.core.component.security.core</artifactId><version>2.4.12-GA</version></dependency>
        <dependency><groupId>org.exoplatform.core</groupId><artifactId>exo.core.component.xml-processing</artifactId><version>2.4.12-GA</version></dependency>
        <dependency><groupId>org.exoplatform.core</groupId><artifactId>exo.core.component.script.groovy</artifactId><version>2.4.12-GA</version></dependency>
   </dependencies>
   
   <build>
       <plugins>
           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <executions>
                  <execution>
                    <id>prepare</id>
                    <phase>package</phase>
                    <goals>
                      <goal>copy-resources</goal>
                    </goals>
                    <configuration>
                      <outputDirectory>target</outputDirectory>
                      <resources>
                          <resource>
                            <directory>src/main/javascript</directory>
                            <filtering>true</filtering>
                          </resource>
                      </resources>
                    </configuration>
                  </execution>
                </executions>
           </plugin>
           <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.3</version>
                <executions>
                  <execution>
                    <id>attach-artifacts</id>
                    <phase>package</phase>
                    <goals>
                      <goal>attach-artifact</goal>
                    </goals>
                    <configuration>
                      <artifacts>
                        <artifact>
                          <file>target/${exobuild.name}.packaging.${exobuild.type}.js</file>
                          <type>js</type>
                        </artifact>
                      </artifacts>
                    </configuration>
                  </execution>
                </executions>
            </plugin>
       </plugins>
   </build> 
</project>  
