<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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.cogchar</groupId>
        <artifactId>org.cogchar.modules.main</artifactId>
        <version>1.1.3</version>
        <relativePath>../org.cogchar.modules.main/pom.xml</relativePath>
    </parent>
    
    <groupId>org.cogchar</groupId>
    <artifactId>ext.bundle.ontoware</artifactId>
    <packaging>bundle</packaging>

    <name>ext.bundle.ontoware - OSGi -ontoware wrapper</name>
    <description>Provides dependencies and OSGi bindings for working with ontoware</description>

    <dependencies>
		<!--
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
		-->
    	<dependency>
			<groupId>org.appdapter</groupId>
			<artifactId>ext.bundle.jena_all_2_10_1</artifactId>
		</dependency>	
		
    	<dependency>
			<groupId>org.appdapter</groupId>
			<artifactId>ext.bundle.apache_httpclient</artifactId>
			<version>${appdapter.version}</version>
		</dependency>					
		<!--
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <scope>provided</scope>
        </dependency>
		-->
        <dependency>
            <!-- Proper bundle used by ontoware RDF2Go stuff, which is not otherwise propagated.
				We do *not* want to re-export this bundle.
			-->
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.4</version>
			<!-- Since we want this bundle-dep to propagate, we don't want "provided"
            <scope>provided</scope>
			-->
        </dependency>
        <dependency>
            <groupId>org.semweb4j</groupId>
            <artifactId>rdf2go.api</artifactId>
            <version>${org.semweb4j.version}</version>
			<!-- Nope, we want this dep to propagate, so we want scope=compile, which is the default.
             <scope>provided</scope>
			 -->
        </dependency>
        <dependency>
            <groupId>org.semweb4j</groupId>
            <artifactId>rdfreactor.runtime</artifactId>
            <version>${org.semweb4j.version}</version>
			<!-- We are re-exporting this jar contents, so "provided" is correct scope -->
             <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.semweb4j</groupId>
            <!-- does not have an OSGi manifest.  provides org.ontoware.rdf2go.impl.StaticBinding, which is in a 
            package that is also defined by rdf2go.api  which does have an OSGi manifest.   Probably the .impl
            bundle should be treated as a fragment, injected into the .api Fragment-host.
            -->
            <artifactId>rdf2go.impl.jena</artifactId>
            <version>${org.semweb4j.version}</version>
			<!-- We are re-exporting this jar contents, so "provided" is correct scope -->
             <scope>provided</scope>
            <!--  Still needed?
            <exclusions>
                    <exclusion>
                            <artifactId>httpclient</artifactId>
                            <groupId>org.apache.httpcomponents</groupId>
                    </exclusion>
            </exclusions>
            -->
            <exclusions>
				<!-- We do not want to propagate a direct dependence on these jena deps. -->
                <exclusion>
                    <groupId>org.apache.jena</groupId>
                    <artifactId>jena-arq</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.jena</groupId>
                    <artifactId>jena-core</artifactId>
                </exclusion>
                <exclusion>
					<!-- We are not using this feature currently, and it drags in a lot of other deps -->
                    <groupId>com.github.jsonld-java</groupId>
                    <artifactId>jsonld-java-jena</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
		<!--
        <dependency>
            <groupId>com.github.jsonld-java</groupId>
            <artifactId>jsonld-java-jena</artifactId>
            <version>0.4.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.3.3</version>
            <scope>provided</scope>
        </dependency>
		-->
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
						<!-- Probly not needed
                        <Import-Package>sun.misc;resolution:='optional',*</Import-Package>
						-->
						<Import-Package>!com.github.jsonldjava.*,*</Import-Package>
                        <Export-Package>
							<!-- Notes:  1) We don't want to re-export the packages from rdf2go.api.
							2) The impl package is somewhat tricky, as this is the special "binding" pkg, 
							but also contains AbstractModelFactory.class.  That is why we get:

Bundle org.cogchar:ext.bundle.ontoware:bundle:1.1.3-SNAPSHOT : Split package org/ontoware/rdf2go/impl
Use directive -split-package:=(merge-first|merge-last|error|first) on Export/Private Package instruction to get rid of this warning
							-->
							org.ontoware.rdf2go.impl.*,  
							org.ontoware.rdfreactor.*
							<!--
							org.ontoware.*, rdf2go.*, rdfreactor.runtime, com.github.jsonldjava.*, com.fasterxml.jackson.*, org.apache.commons.io.*
							-->
						</Export-Package>
						<!-- Perhaps not needed
                        <Private-Package>edu.emory.mathcs.backport.java.util.*</Private-Package>
						-->
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <!--version>2.3.2</version--><!--$NO-MVN-MAN-VER$-->
            </plugin>
        </plugins>
    </build>
</project>
<!--
/*
 *  Copyright 2011 by The Appdapter Project (www.appdapter.org).
 *
 *  Licensed 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.
 */
-->
