<?xml version="1.0"?>
<!--
  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>
    <artifactId>cxf-rt-rs-security-oauth2</artifactId>
    <packaging>bundle</packaging>
    <name>Apache CXF Runtime OAuth 2.0</name>
    <description>Apache CXF Runtime OAuth 2.0</description>
    <url>http://cxf.apache.org</url>
    <parent>
        <artifactId>cxf-rt-rs-security-oauth-parent</artifactId>
        <groupId>org.apache.cxf</groupId>
        <version>3.1.7</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <properties>
        <cxf.osgi.import>
            net.sf.ehcache*;resolution:=optional;version="[2.5, 3.0.0)",
            javax.servlet*;version="${cxf.osgi.javax.servlet.version}"
        </cxf.osgi.import>
        <hibernate.em.version>4.1.0.Final</hibernate.em.version>
        <hsqldb.version>2.3.4</hsqldb.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-frontend-jaxrs</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-security-jose-jaxrs</artifactId>
            <version>${project.version}</version>
        </dependency> 
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-client</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${cxf.servlet-api.group}</groupId>
            <artifactId>${cxf.servlet-api.artifact}</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
          <groupId>net.sf.ehcache</groupId>
          <artifactId>ehcache</artifactId>
          <version>${cxf.ehcache.version}</version>
          <scope>provided</scope>
          <optional>true</optional>
        </dependency>
        <dependency>
          <groupId>javax.cache</groupId>
          <artifactId>cache-api</artifactId>
          <version>${cxf.jcache.version}</version>
          <scope>provided</scope>
          <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.apache.geronimo.specs</groupId>
            <artifactId>geronimo-jpa_2.0_spec</artifactId>
            <version>${cxf.geronimo.jpa.version}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jettison</groupId>
            <artifactId>jettison</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-rt-rs-extension-providers</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency> 
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hsqldb</groupId>
            <artifactId>hsqldb</artifactId>
            <version>${hsqldb.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>org.ehcache</groupId>
          <artifactId>ehcache</artifactId>
          <version>${cxf.ehcache3.version}</version>
          <scope>test</scope>
        </dependency>
        <!--
        <dependency>
             <groupId>org.apache.openjpa</groupId>
             <artifactId>openjpa</artifactId>
             <version>${cxf.openjpa.version}</version>
             <scope>provided</scope>
        </dependency>
        -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-entitymanager</artifactId>
            <version>${hibernate.em.version}</version>
            <scope>test</scope>
        </dependency>
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-nop</artifactId>
        <version>${cxf.slf4j.version}</version>
        <scope>test</scope>
      </dependency>
        
     </dependencies>
     <build>
       <plugins>
         <plugin>
	       <groupId>org.bsc.maven</groupId>
	       <artifactId>maven-processor-plugin</artifactId>
	       <version>3.1.0</version>
	       <executions>
	        <execution>
		     <id>process</id>
		     <goals>
		       <goal>process</goal>
		     </goals>
		     <phase>generate-sources</phase>
		     <configuration>
               <compilerArguments>-Aopenjpa.source=7 -Aopenjpa.metamodel=true</compilerArguments>
		       <processors>
		         <processor>org.apache.openjpa.persistence.meta.AnnotationProcessor6</processor>
	           </processors>
               <outputDirectory>target/generated-sources/metamodel</outputDirectory>
		     </configuration>
            </execution>
		   </executions>
		   <dependencies>
		     <dependency>
		       <groupId>org.apache.openjpa</groupId>
		       <artifactId>openjpa</artifactId>
		       <version>${cxf.openjpa.version}</version>
		     </dependency>
		   </dependencies>
		 </plugin>
		 <plugin>
		  <groupId>org.codehaus.mojo</groupId>
		  <artifactId>build-helper-maven-plugin</artifactId>
		  <version>1.10</version>
		  <executions>
		    <execution>
		      <id>add-source</id>
		      <phase>generate-sources</phase>
		      <goals>
			<goal>add-source</goal>
		      </goals>
		      <configuration>
			<sources>
			  <source>target/generated-sources/metamodel</source>
			</sources>
		      </configuration>
		    </execution>
		  </executions>
		 </plugin>
            <!--
            <plugin>
                <groupId>org.apache.openjpa</groupId>
                <artifactId>openjpa-maven-plugin</artifactId>
                <version>${cxf.openjpa.version}</version>
                <configuration>
                    <includes>
                       org/apache/cxf/rs/security/oauth2/common/Client.class,
                       org/apache/cxf/rs/security/oauth2/common/UserSubject.class,
                       org/apache/cxf/rs/security/oauth2/grants/code/AuthorizationCodeGrant,
                       org/apache/cxf/rs/security/oauth2/grants/code/ServerAuthorizationCodeGrant.class,
                       org/apache/cxf/rs/security/oauth2/tokens/bearer/BearerAccessToken.class,
                       org/apache/cxf/rs/security/oauth2/common/ServerAccessToken.class,
                       org/apache/cxf/rs/security/oauth2/common/AccessToken.class,
                       org/apache/cxf/rs/security/oauth2/tokens/refresh/RefreshToken.class,
                       org/apache/cxf/rs/security/oauth2/common/OAuthPermission.class
                    </includes>
                </configuration>
                <executions>
                    <execution>
                        <id>enhancer</id>
                        <phase>process-test-classes</phase>
                        <goals>
                            <goal>test-enhance</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            -->
        </plugins>
      </build>
   </project>
