<?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">

	<properties>
		<bundle.symbolicName>org.wikipathways.cytoscapeapp</bundle.symbolicName>
		<bundle.namespace>org.wikipathways.cytoscapeapp</bundle.namespace>
		<cytoscape.api.version>3.1.0</cytoscape.api.version>
	</properties>

	<modelVersion>4.0.0</modelVersion>
	<groupId>org.wikipathways</groupId>
	<artifactId>cytoscapeapp</artifactId>
	<version>3.1</version>

	<name>WikiPathways Cytoscape App</name>
	
	<packaging>bundle</packaging>

	<build>
		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>
      <finalName>WikiPathways-${project.version}</finalName>
		<!-- Cytoscape requires Java 1.6 -->
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<executions>
					<execution>
						<id>default-testCompile</id>
						<phase>test-compile</phase>
						<goals>
							<goal>testCompile</goal>
						</goals>
					</execution>
					<execution>
						<id>default-compile</id>
						<phase>compile</phase>
						<goals>
							<goal>compile</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
					<optimize>true</optimize>
					<showWarnings>true</showWarnings>
					<showDeprecation>true</showDeprecation>
					<compilerArguments>
						<Xmaxwarns>10000</Xmaxwarns>
						<Xmaxerrs>10000</Xmaxerrs>
					</compilerArguments>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.7.1</version>
				<configuration>
					<redirectTestOutputToFile>true</redirectTestOutputToFile>
				</configuration>
			</plugin>
      <!-- Change artifact name -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.3.1</version>
        <executions>
          <execution>
            <goals>
              <goal>install-file</goal>
            </goals>
            <phase>install</phase>
            <configuration>
              <file>${build.directory}/${project.build.finalName}.jar</file>
              <generatePom>false</generatePom>
              <pomFile>pom.xml</pomFile>
              <version>${my.version}</version>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- Generates the OSGi metadata based on the osgi.bnd file. -->
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.3.7</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
						<Bundle-Version>${project.version}</Bundle-Version>
						<Private-Package>${bundle.namespace}.internal.*,${bundle.namespace}.impl.*</Private-Package>
            <Export-Package>${bundle.namespace}</Export-Package>
						<Bundle-Activator>${bundle.namespace}.internal.CyActivator</Bundle-Activator>
						<Import-Package>org.xml.sax;resolution:=optional,javax.xml.transform;resolution:=optional,
							javax.xml.transform.stream;resolution:=optional,
							javax.xml.parsers;resolution:=optional,org.xml.sax.helpers;resolution:=optional,
							org.xml.sax.ext;resolution:=optional,javax.xml.validation;resolution:=optional,*</Import-Package>
              <Bundle-Name>WikiPathways</Bundle-Name>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
        		<groupId>org.apache.maven.plugins</groupId>
        		<artifactId>maven-shade-plugin</artifactId>
        		<version>2.1</version>
        		<executions>
        			<execution>
        		    	<phase>package</phase>
        		   		<goals>
        		    		<goal>shade</goal>
        		    	</goals>
        	    		<configuration>
        	    			<artifactSet>
        	    				<includes>
        	    					<include>org.pathvisio:pathvisio-core</include>
        	    					<include>com.springsource:org.jdom</include>
        	    					<include>org.bridgedb:bridgedb</include>
        	    					<include>org.bridgedb:bridgedb-bio</include>
        	    					<include>derby:derby</include>
        	    				</includes>
        	    			</artifactSet>
            			</configuration>
          			</execution>
        		</executions>
      		</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<configuration>
					<excludePackageNames>*.impl:*.internal</excludePackageNames>
				</configuration>
			</plugin>
		</plugins>
	</build>

	<repositories>
             <repository>
			<id>cytoscape_snapshots</id>
			<snapshots>
			</snapshots>
			<releases>
				<enabled>false</enabled>
			</releases>
			<name>Cytoscape Snapshots</name>
			<url>http://code.cytoscape.org/nexus/content/repositories/snapshots/</url>
		</repository>
		<repository>
			<id>cytoscape_releases</id>
			<snapshots>
				<enabled>false</enabled>
			</snapshots>
			<releases>
			</releases>
			<name>Cytoscape Releases</name>
			<url>http://code.cytoscape.org/nexus/content/repositories/releases/</url>
		</repository>
         <repository> <id>com.springsource.repository.bundles.release</id> <name>SpringSource Enterprise Bundle Repository - SpringSource Bundle Releases</name> <url>http://repository.springsource.com/maven/bundles/release</url> </repository> <repository> <id>com.springsource.repository.bundles.external</id> <name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name> <url>http://repository.springsource.com/maven/bundles/external</url> </repository>
    </repositories>

	<!-- Dependencies needed to compile this project. -->
	<dependencies>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
			<version>4.2.0</version>
		</dependency>
		
		<dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>service-api</artifactId>
			<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>core-task-api</artifactId>
			<version>${cytoscape.api.version}</version>
			</dependency>
		<dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>swing-application-api</artifactId>
			<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>session-api</artifactId>
			<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>webservice-api</artifactId>
			<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.cytoscape</groupId>
    		<artifactId>io-api</artifactId>
    		<version>${cytoscape.api.version}</version>
		</dependency>
		 <dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>swing-util-api</artifactId>
			<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.cytoscape</groupId>
    		<artifactId>swing-app-api</artifactId>
    	<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>app-api</artifactId>
			<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>presentation-api</artifactId>
			<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
			<groupId>org.cytoscape</groupId>
			<artifactId>vizmap-api</artifactId>
			<version>${cytoscape.api.version}</version>
		</dependency>
		<dependency>
    		<groupId>org.cytoscape</groupId>
    		<artifactId>work-api</artifactId>
    		<version>${cytoscape.api.version}</version>
		</dependency>

		<!-- Logging -->
		<dependency>
			<groupId>org.ops4j.pax.logging</groupId>
			<artifactId>pax-logging-api</artifactId>
			<version>1.5.2</version>
			<scope>provided</scope>
		</dependency>
		
		<!-- local dependencies --> 
		<dependency>
			<groupId>com.springsource</groupId>
			<artifactId>org.jdom</artifactId>
			<version>1.1.0</version>
			<optional>true</optional>
		</dependency>
		<dependency> 
      		<groupId>org.pathvisio</groupId> 
      		<artifactId>pathvisio-core</artifactId> 
      		<version>3.1.1</version> 
      		<optional>true</optional>
    	</dependency> 
 		<dependency> 
      		<groupId>org.bridgedb</groupId> 
      		<artifactId>bridgedb</artifactId> 
      		<version>1.2.2</version> 
      		<optional>true</optional>
    	</dependency>
		<dependency> 
      		<groupId>org.bridgedb</groupId> 
      		<artifactId>bridgedb-bio</artifactId> 
      		<version>1.2.2</version> 
      		<optional>true</optional>
    	</dependency> 
    	<dependency> 
      		<groupId>derby</groupId> 
      		<artifactId>derby</artifactId> 
      		<version>10.4</version> 
      		<optional>true</optional>
    	</dependency> 
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>com.springsource.org.apache.commons.httpclient</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>
	</dependencies>

</project>
