<?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.richfaces.examples</groupId>
		<artifactId>photoalbum</artifactId>
		<version>3.3.3.Final</version>
	</parent>

	<groupId>org.richfaces.examples</groupId>
	<artifactId>${projectName}-ear</artifactId>
	<name>${appName} EAR module</name>
	<packaging>ear</packaging>

	<dependencies>
		<dependency>
			<groupId>org.richfaces.examples</groupId>
			<artifactId>${projectName}-web</artifactId>
			<version>${project.version}</version>
			<type>war</type>
		</dependency>
		<dependency>
			<groupId>org.richfaces.framework</groupId>
			<artifactId>richfaces-api</artifactId>
			<version>${richfacesVersion}</version>
		</dependency>
		<dependency>
			<groupId>org.richfaces.examples</groupId>
			<artifactId>${projectName}-ejb</artifactId>
			<version>${project.version}</version>
			<type>ejb</type>
		</dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <version>1.2.14</version>
        </dependency>
	<dependency>
      <groupId>org.jboss.seam</groupId>
      <artifactId>jboss-seam</artifactId>
      <version>${seamVersion}</version>
      <type>ejb</type>
      <exclusions>
            <exclusion>
                  <groupId>javax.el</groupId>
                  <artifactId>el-api</artifactId>
            </exclusion>
            <exclusion>
                  <groupId>commons-collections</groupId>
                  <artifactId>commons-collections</artifactId>
            </exclusion>
            <exclusion>
                  <groupId>org.jboss.seam</groupId>
                  <artifactId>jboss-seam-pdf</artifactId>
            </exclusion>
            <exclusion>
                  <groupId>com.sun.facelets</groupId>
                  <artifactId>jsf-facelets</artifactId>
            </exclusion>
			</exclusions>
    </dependency>
	</dependencies>
	<build>
		<finalName>${projectName}-ear-${project.version}</finalName>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-deploy-plugin</artifactId>
				<configuration>
					<skip>false</skip>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-ear-plugin</artifactId>
				<version>2.3.1</version>
				<configuration>
					<generateApplicationXml>true</generateApplicationXml>
					<includeJar>false</includeJar>
					<defaultLibBundleDir>lib</defaultLibBundleDir>
					<modules>
						<webModule>
							<groupId>org.richfaces.examples</groupId>
							<artifactId>${projectName}-web</artifactId>
							<contextRoot>/${projectName}</contextRoot>
						</webModule>
						<ejbModule>
							<groupId>org.richfaces.examples</groupId>
							<artifactId>${projectName}-ejb</artifactId>
						</ejbModule>
						<ejbModule>
							<groupId>org.jboss.seam</groupId>
							<artifactId>jboss-seam</artifactId>
						</ejbModule>
					</modules>
					<jboss>
						<version>4.2</version>
						<loader-repository>org.richfaces.examples:loader=${project.build.finalName}</loader-repository>
					</jboss>
				</configuration>
			</plugin>
	
		</plugins>
	</build>

	<profiles>
		<profile>
			<id>livedemo</id>
			
			<!--<build>-->
				<!--<plugins>-->
					<!--<plugin>-->
					   <!--<groupId>org.apache.maven.plugins</groupId>-->
					   <!--<artifactId>maven-resources-plugin</artifactId>-->
						<!--<version>2.3</version>-->
						<!--<executions>-->
							<!--<execution>-->
								<!--<id>copy-prod-resources</id>-->
								<!--<phase>install</phase>-->
								<!--<goals>-->
									<!--<goal>copy-resources</goal>-->
								<!--</goals>-->
								<!--<configuration>-->
									<!--<outputDirectory>dist</outputDirectory>-->
									<!--<resources>-->
										<!--<resource>-->
											<!--<directory>target/*.ear</directory>-->
											<!--<filtering>true</filtering>-->
										<!--</resource>-->
									<!--</resources>-->
								<!--</configuration>-->
							<!--</execution>-->
						<!--</executions>-->
					<!--</plugin>-->
				<!--</plugins>-->
			<!--</build>-->
		</profile>
	</profiles>

</project>
