<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.apache.myfaces.tobago</groupId>
    <artifactId>tobago-example</artifactId>
    <version>2.5.0</version>
  </parent>
  <artifactId>tobago-example-addressbook-cdi</artifactId>
  <packaging>war</packaging>
  <name>Tobago Example Addressbook (Java EE 6)</name>
  <description>A simple, but full functional application with persistence.</description>

  <properties>
    <openjpa.version>1.2.3</openjpa.version>
    <openwebbeans.version>1.2.8</openwebbeans.version>
    <deltaspike.version>1.9.6</deltaspike.version>
    <tobago.basedir>${project.basedir}/../..</tobago.basedir>
  </properties>
  <build>
    <finalName>tobago-example-addressbook-cdi</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>process-classes</phase>
            <configuration>
              <tasks>
                <java classname="org.apache.openjpa.enhance.PCEnhancer" classpathref="maven.runtime.classpath" dir="target/classes" fork="true" />
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-maven-plugin</artifactId>
        <configuration>
          <loginServices>
            <loginService implementation="org.eclipse.jetty.security.HashLoginService">
              <name>addressbook-realm</name>
              <config>src/test/resources/realm.properties</config>
            </loginService>
          </loginServices>
          <stopKey>stopKey</stopKey>
          <stopPort>9999</stopPort>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
        <executions>
          <execution>
            <id>unpack</id>
            <phase>package</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.tango-project</groupId>
                  <artifactId>tango-icon-theme</artifactId>
                  <version>0.8.0</version>
                </artifactItem>
              </artifactItems>
              <outputDirectory>
                ${project.build.directory}/${project.build.finalName}/image
              </outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jcdi_1.0_spec</artifactId>
      <version>1.1</version>
      <!-- XXX websphere-provided -->
        <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-validation_1.1_spec</artifactId>
      <version>1.0</version>
      <!-- XXX websphere-provided -->
        <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-atinject_1.0_spec</artifactId>
      <version>1.2</version>
      <!-- XXX websphere-provided -->
        <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-interceptor_1.1_spec</artifactId>
      <version>1.0</version>
      <!-- XXX websphere-provided -->
        <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-annotation_1.1_spec</artifactId>
      <version>1.0.1</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-impl</artifactId>
      <version>${openwebbeans.version}</version>
    <!-- XXX websphere-provided -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>javassist</groupId>
      <artifactId>javassist</artifactId>
      <version>3.12.1.GA</version>
    <!-- XXX websphere-provided -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-spi</artifactId>
      <version>${openwebbeans.version}</version>
    <!-- XXX websphere-provided -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-web</artifactId>
      <version>${openwebbeans.version}</version>
    <!-- XXX websphere-provided -->
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.openwebbeans</groupId>
      <artifactId>openwebbeans-resource</artifactId>
      <version>${openwebbeans.version}</version>
      <!-- XXX websphere-provided -->
        <scope>provided</scope>
    </dependency>

<!-- which repository-->
<!--
    <dependency>
      <groupId>org.apacheExtras.myfaces.codi.addon</groupId>
      <artifactId>controlled-owb-bootstrapping-addon</artifactId>
      <version>1.0.0</version>
      <scope>compile</scope>
    </dependency>
-->
    <dependency>
        <groupId>org.tango-project</groupId>
        <artifactId>tango-icon-theme</artifactId>
        <version>0.8.0</version>
    </dependency>
    <dependency>
    	<groupId>org.apache.geronimo.specs</groupId>
    	<artifactId>geronimo-jpa_3.0_spec</artifactId>
    	<version>1.1.1</version>
      <scope>provided</scope>
    </dependency>
    <!-- <dependency>
      <groupId>org.apache.openjpa</groupId>
      <artifactId>openjpa</artifactId>
      <version>${openjpa.version}</version>
    </dependency>-->
    <!--dependency>
      <groupId>org.apache.openjpa</groupId>
      <artifactId>openjpa-persistence</artifactId>
      <version>${openjpa.version}</version>
      <exclusions>
        <exclusion>
          <groupId>hsqldb</groupId>
          <artifactId>hsqldb</artifactId>
        </exclusion>
        <exclusion>
          <groupId>ant</groupId>
          <artifactId>ant</artifactId>
        </exclusion>
      </exclusions>
    </dependency-->
    <dependency>
      <groupId>org.apache.openjpa</groupId>
      <artifactId>openjpa-persistence-jdbc</artifactId>
      <version>${openjpa.version}</version>
      <exclusions>
        <exclusion>
          <groupId>hsqldb</groupId>
          <artifactId>hsqldb</artifactId>
        </exclusion>
        <exclusion>
          <groupId>ant</groupId>
          <artifactId>ant</artifactId>
        </exclusion>
        <exclusion>
          <groupId>log4j</groupId>
          <artifactId>log4j</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <!--dependency>
      <groupId>org.apache.openjpa</groupId>
      <artifactId>openjpa-xmlstore</artifactId>
      <version>${openjpa.version}</version>
      <exclusions>
        <exclusion>
          <groupId>ant</groupId>
          <artifactId>ant</artifactId>
        </exclusion>
      </exclusions>
    </dependency-->
    <dependency>
      <groupId>org.apache.myfaces.tobago</groupId>
      <artifactId>tobago-fileupload</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>org.apache.myfaces.tobago</groupId>
      <artifactId>tobago-security</artifactId>
      <version>${project.version}</version>
    </dependency>
    <dependency>
      <groupId>commons-io</groupId>
      <artifactId>commons-io</artifactId>
    </dependency>
<!--
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
-->
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-api</artifactId>
<!--
      <version>1.7.2</version>
-->
    </dependency>
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-simple</artifactId>
<!--
      <version>1.7.2</version>
-->
    </dependency>
<!--
    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
      &lt;!&ndash; XXX websphere-provided &ndash;&gt;
        <scope>provided</scope>
    </dependency>
      <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>jcl-over-slf4j</artifactId>
        &lt;!&ndash; XXX websphere-provided &ndash;&gt;
          <scope>provided</scope>
    </dependency>
-->
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <version>10.15.2.0</version>
    </dependency>
    <dependency>
       <groupId>org.apache.geronimo.specs</groupId>
       <artifactId>geronimo-servlet_3.0_spec</artifactId>
       <version>1.0</version>
       <scope>provided</scope>
    </dependency>

    <!-- DeltaSpike -->
    <dependency>
      <groupId>org.apache.deltaspike.modules</groupId>
      <artifactId>deltaspike-jsf-module-impl</artifactId>
      <version>${deltaspike.version}</version>
    </dependency>

  </dependencies>

  <profiles>

    <profile>
      <id>default</id>
      <activation>
        <property>
          <name>!jsf</name>
        </property>
      </activation>
      <dependencies>

        <dependency>
          <groupId>org.apache.myfaces.core</groupId>
          <artifactId>myfaces-api</artifactId>
          <version>${myfaces20.version}</version>
          <scope>compile</scope>
        </dependency>

      </dependencies>
    </profile>

    <profile>
      <id>jsf-provided</id>
      <activation>
        <property>
          <name>jsf</name>
          <value>provided</value>
        </property>
      </activation>
      <dependencies>

      </dependencies>
    </profile>

    <profile>
      <id>myfaces-2.0</id>
      <activation>
        <property>
          <name>jsf</name>
          <value>myfaces-2.0</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.openwebbeans</groupId>
          <artifactId>openwebbeans-jsf</artifactId>
          <version>${openwebbeans.version}</version>
        </dependency>

<!-- for JSF 2.0 and Bean Validation (JSR-303)  -->
        <dependency>
          <groupId>org.glassfish.web</groupId>
          <artifactId>javax.el</artifactId>
        </dependency>

      </dependencies>
    </profile>

    <profile>
      <id>myfaces-2.1</id>
      <activation>
        <property>
          <name>jsf</name>
          <value>myfaces-2.1</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.openwebbeans</groupId>
          <artifactId>openwebbeans-jsf</artifactId>
          <version>${openwebbeans.version}</version>
        </dependency>

<!-- for JSF 2.0 and Bean Validation (JSR-303)  -->
        <dependency>
          <groupId>org.glassfish.web</groupId>
          <artifactId>javax.el</artifactId>
        </dependency>

      </dependencies>
    </profile>

    <profile>
      <id>myfaces-2.2</id>
      <activation>
        <property>
          <name>jsf</name>
          <value>myfaces-2.2</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.openwebbeans</groupId>
          <artifactId>openwebbeans-jsf</artifactId>
          <version>${openwebbeans.version}</version>
        </dependency>

<!-- for JSF 2.0 and Bean Validation (JSR-303)  -->
        <dependency>
          <groupId>org.glassfish.web</groupId>
          <artifactId>javax.el</artifactId>
        </dependency>

      </dependencies>
    </profile>

    <profile>
      <id>mojarra-2.0</id>
      <activation>
        <property>
          <name>jsf</name>
          <value>mojarra-2.0</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.openwebbeans</groupId>
          <artifactId>openwebbeans-jsf</artifactId>
          <version>${openwebbeans.version}</version>
        </dependency>

<!-- for JSF 2.0 and Bean Validation (JSR-303)  -->
        <dependency>
          <groupId>org.glassfish.web</groupId>
          <artifactId>javax.el</artifactId>
        </dependency>

      </dependencies>
    </profile>

    <profile>
      <id>mojarra-2.1</id>
      <activation>
        <property>
          <name>jsf</name>
          <value>mojarra-2.1</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.openwebbeans</groupId>
          <artifactId>openwebbeans-jsf</artifactId>
          <version>${openwebbeans.version}</version>
        </dependency>

<!-- for JSF 2.0 and Bean Validation (JSR-303)  -->
        <dependency>
          <groupId>org.glassfish.web</groupId>
          <artifactId>javax.el</artifactId>
        </dependency>

      </dependencies>
    </profile>

    <profile>
      <id>mojarra-2.2</id>
      <activation>
        <property>
          <name>jsf</name>
          <value>mojarra-2.2</value>
        </property>
      </activation>
      <dependencies>
        <dependency>
          <groupId>org.apache.openwebbeans</groupId>
          <artifactId>openwebbeans-jsf</artifactId>
          <version>${openwebbeans.version}</version>
        </dependency>

<!-- for JSF 2.0 and Bean Validation (JSR-303)  -->
        <dependency>
          <groupId>org.glassfish.web</groupId>
          <artifactId>javax.el</artifactId>
        </dependency>

      </dependencies>
    </profile>
  </profiles>

</project>
