<!--
  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>
	<groupId>org.apache.cxf.samples</groupId>
	<artifactId>jax_rs_minimal_osgi</artifactId>
	<name>JAX-RS Minimal OSGI Demo</name>
	<description>JAX-RS Minimal OSGI Demo</description>
	<version>2.7.0.redhat-610-SNAPSHOT</version>

	<parent>
	    <groupId>org.apache.cxf.samples</groupId>
	    <artifactId>cxf-samples</artifactId>
	    <version>2.7.0.redhat-610-SNAPSHOT</version>
	    <relativePath>../..</relativePath>
	</parent>

	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<equinox.version>3.7.0.v20110613</equinox.version>
	</properties>
	

	<dependencies>
	    <dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.enterprise</artifactId>
			<version>4.2.0</version>
        </dependency>
		
		<dependency>
			<groupId>org.eclipse.tycho</groupId>
            <artifactId>org.eclipse.osgi</artifactId>
            <version>${equinox.version}</version>
			<scope>provided</scope>
		</dependency>
		
		<dependency>
			<groupId>org.eclipse.osgi</groupId>
			<artifactId>org.eclipse.osgi.services</artifactId>
			<version>3.2.100.v20100503</version>
			<scope>compile</scope>
			<exclusions>
				<exclusion>
				  <groupId>javax.servlet</groupId>
				  <artifactId>servlet-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
        
        <dependency>
		  <groupId>org.apache.felix</groupId>
		  <artifactId>org.apache.felix.fileinstall</artifactId>
		  <version>3.1.10</version>
		  <scope>provided</scope>
		</dependency>
        
        <dependency>
			<groupId>org.apache.felix</groupId>
			<artifactId>org.apache.felix.http.bundle</artifactId>
			<version>2.2.0</version>
			<scope>compile</scope> <!-- using compile instead of test so we don't need to import geronimo-servlet_3.0_spec -->
			<exclusions>
				<exclusion>
				  <groupId>javax.servlet</groupId>
				  <artifactId>servlet-api</artifactId>
				</exclusion>
				<exclusion>
				  <groupId>org.mortbay.jetty</groupId>
				  <artifactId>servlet-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
        
        <dependency>
    	  <groupId>org.apache.servicemix.specs</groupId>
    	  <artifactId>org.apache.servicemix.specs.jsr339-api-m10</artifactId>
	      <version>2.2.0</version>
	    </dependency>
        <dependency>
    	  <groupId>org.apache.servicemix.bundles</groupId>
    	  <artifactId>org.apache.servicemix.bundles.wsdl4j</artifactId>
          <version>1.6.2_6</version>
	</dependency> 
        
        <dependency>
		  <groupId>javax.mail</groupId>
		  <artifactId>mail</artifactId>
		  <version>1.4.4</version>
		</dependency> 
        <dependency>
			<groupId>org.apache.cxf</groupId>
			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
			<version>${project.version}</version>
			<exclusions>
				<exclusion>
				  <groupId>javax.ws.rs</groupId>
				  <artifactId>javax.ws.rs-api</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.codehaus.woodstox</groupId>
					<artifactId>woodstox-core-asl</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.codehaus.woodstox</groupId>
					<artifactId>stax2-api</artifactId>
				</exclusion>
                                <exclusion>
					<groupId>org.apache.geronimo.specs</groupId>
					<artifactId>geronimo-javamail_1.4_spec</artifactId>
				</exclusion>
                                <exclusion>
					<groupId>wsdl4j</groupId>
					<artifactId>wsdl4j</artifactId>
				</exclusion>
                                <exclusion>
					<groupId>com.sun.xml.bind</groupId>
					<artifactId>jaxb-impl</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
  </dependencies>

  <build>
	<plugins>
	  <plugin>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-jar-plugin</artifactId>
			<version>2.3.1</version>
			<configuration>
				<archive>
					<manifestFile>src/main/resources/META-INF/MANIFEST.MF</manifestFile>
				</archive>
			</configuration>
	 </plugin>
     <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.10</version>
        <configuration>
          <skipTests>true</skipTests>
        </configuration>
    </plugin>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-dependency-plugin</artifactId>
		<version>2.2</version>
		<executions>
			<execution>
				<id>copy-dependencies</id>
				<phase>package</phase>
				<goals>
					<goal>copy-dependencies</goal>
				</goals>
				<configuration>
					<outputDirectory>${project.build.directory}/dependencies</outputDirectory>
					<excludeScope>provided</excludeScope>
					<excludeGroupIds>org.slf4j</excludeGroupIds>
					<excludeArtifactIds>geronimo-servlet_2.5_spec,org.eclipse.osgi,org.osgi.foundation</excludeArtifactIds>
					<overWriteReleases>false</overWriteReleases>
					<overWriteSnapshots>false</overWriteSnapshots>
					<overWriteIfNewer>true</overWriteIfNewer>
				</configuration>
			</execution>
		</executions>
	</plugin>
	<plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-assembly-plugin</artifactId>
		<version>2.2.1</version>
		<configuration>
			<descriptors>
				<descriptor>src/main/assembly/descriptor.xml</descriptor>
			</descriptors>
			<outputDirectory>target/delivery</outputDirectory>
			<workDirectory>target/assembly/work</workDirectory>
		</configuration>
		<executions>
			<execution>
				<id>make-assembly</id>
				<phase>package</phase>
				<goals>
					<goal>single</goal>
				</goals>
			</execution>
		</executions>
	  </plugin>
      <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <executions>
              <execution>
                  <goals>
                      <goal>exec</goal>
                  </goals>
              </execution>
          </executions>
                  <configuration>
                      <executable>java</executable>
                      <arguments>
                      	<!--
			  	           <argument>-Xdebug</argument>
					   <argument>-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005</argument>
			-->			
                      	<argument>-jar</argument>
                      	<argument>org.eclipse.osgi-${equinox.version}.jar</argument>
                      	<argument>-console</argument>
                      </arguments>
                      <workingDirectory>${project.build.directory}/delivery/${project.artifactId}-${project.version}-equinox/${project.artifactId}-${project.version}/</workingDirectory>
                  </configuration>
      </plugin>
   </plugins>
   <pluginManagement>
	    <plugins>
		        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
		        <plugin>
		            <groupId>org.eclipse.m2e</groupId>
		            <artifactId>lifecycle-mapping</artifactId>
		            <version>1.0.0</version>
		            <configuration>
		                <lifecycleMappingMetadata>
		                    <pluginExecutions>
		                        <pluginExecution>
		                            <pluginExecutionFilter>
		                                <groupId>
		                                    org.apache.maven.plugins
		                                </groupId>
		                                <artifactId>
		                                    maven-dependency-plugin
		                                </artifactId>
		                                <versionRange>[2.2,)</versionRange>
		                                <goals>
		                                    <goal>copy-dependencies</goal>
		                                </goals>
		                            </pluginExecutionFilter>
		                            <action>
		                                <ignore />
		                            </action>
		                        </pluginExecution>
		                    </pluginExecutions>
		                </lifecycleMappingMetadata>
		            </configuration>
		        </plugin>
		    </plugins>
		</pluginManagement>
  </build>  
  <!--
  <repositories>
    <repository>
      <id>apache-snapshots</id>
      <name>Apache SNAPSHOT Repository</name>
      <url>http://repository.apache.org/snapshots</url>
      <snapshots>
      	<enabled>true</enabled>
      </snapshots>
    </repository>
  </repositories>
  -->
</project>
