<?xml version="1.0"?>
<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>
    <artifactId>my-project</artifactId>
    <groupId>net.pascalalma</groupId>
    <version>1.0-SNAPSHOT</version>
  </parent>

  <groupId>net.pascalalma</groupId>
  <artifactId>my-business-services-ear</artifactId>
  <packaging>ear</packaging>
  <name>${project.artifactId}</name>
  <version>1.0-SNAPSHOT</version>
  <description>packaging module for task-services deployment</description>

  <dependencies>
      <!-- Libs necessary at runtime -->
      <dependency>
            <groupId>net.pascalalma</groupId>
            <artifactId>my-services</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>ejb</type>
        </dependency>
      <dependency>
            <groupId>net.pascalalma</groupId>
            <artifactId>my-business-services</artifactId>
            <version>1.0-SNAPSHOT</version>
            <type>ejb</type>
        </dependency>
      <dependency>
            <groupId>net.pascalalma</groupId>
            <artifactId>my-model</artifactId>
            <version>1.0-SNAPSHOT</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>3.4.0.GA</version>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate</artifactId>
            <version>3.2.6.ga</version>
        </dependency>
        <!-- necessary in combination with Hibernate: -->
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
            <version>3.2.1</version>
        </dependency>
  </dependencies>

   <pluginRepositories>
        <pluginRepository>
            <id>maven.java.net</id>
            <name>Java.net Maven2 Repository</name>
            <url>http://download.java.net/maven/2</url>
        </pluginRepository>
    </pluginRepositories>
  <build>
        <plugins>
            <plugin>
                <artifactId>maven-ear-plugin</artifactId>
                <configuration>
                    <displayName>Entity Services</displayName>
                    <description>The EJB Component for Entity Services</description>
                    <version>1.4</version>
                    <modules>
                        <ejbModule>
                            <groupId>net.pascalalma</groupId>
                            <artifactId>my-services</artifactId>
                        </ejbModule>
                        <ejbModule>
                            <groupId>net.pascalalma</groupId>
                            <artifactId>my-business-services</artifactId>
                        </ejbModule>
                    </modules>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.glassfish.maven.plugin</groupId>
                <artifactId>maven-glassfish-plugin</artifactId>
                <version>2.1</version>

                <configuration>
                    <glassfishDirectory>${glassfish.home}</glassfishDirectory>
                    <user>admin</user>
                    <passwordFile>${glassfish.home}/domains/domain1/config/domain-passwords</passwordFile>
                    <autoCreate>false</autoCreate>
                    <debug>true</debug>
                    <echo>true</echo>
                    <terse>false</terse>
                    <domain>
                        <name>domain1</name>
                        <httpPort>8888</httpPort>
                        <adminPort>4848</adminPort>
                        <reuse>true</reuse>
                    </domain>
                    <components>
                        <component>
                            <name>${project.artifactId}</name>
                            <artifact>${project.build.directory}/${project.build.finalName}.ear</artifact>
                        </component>
                    </components>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>