<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>it.uniroma2.art.sheet2rdf</groupId>
	<artifactId>stx-sheet2rdf</artifactId>
	<packaging>bundle</packaging>
	<version>1.0</version>

	<name>stx-sheet2rdf</name>
	<url>http://art.uniroma2.it/sheet2rdf/documentation/st-ext</url>
	<description>Sheet2RDF extension for Semantic Turkey. Sheet2RDF is a platform for acquisition and transformation of datasheets into RDF.</description>
	<scm>
		<url>https://bitbucket.org/art-uniroma2/sheet2rdf.git</url>
		<connection>scm:git:https://bitbucket.org/art-uniroma2/sheet2rdf.git</connection>
		<developerConnection>scm:git:https://bitbucket.org/art-uniroma2/sheet2rdf.git</developerConnection>
	</scm>
	<issueManagement>
		<url>https://art-uniroma2.atlassian.net/browse/SHEETRDF</url>
		<system>Jira</system>
	</issueManagement>
	<organization>
		<name>ART Group, University of Rome, Tor Vergata</name>
		<url>http://art.uniroma2.it</url>
	</organization>
	<licenses>
		<license>
			<name>Mozilla Public License Version 1.1</name>
			<url> http//www.mozilla.org/MPL/</url>
			<distribution>repo</distribution>
			<comments />
		</license>
	</licenses>

	<developers>
		<developer>
			<id>lorenzetti</id>
			<name>Tiziano Lorenzetti</name>
			<email>tiziano.lorenzetti@gmail.com</email>
			<organization>ART Group, University of Rome, Tor Vergata</organization>
			<organizationUrl>http://art.uniroma2.it</organizationUrl>
			<roles>
				<role>Main Developer</role>
			</roles>
		</developer>
		<developer>
			<id>starred</id>
			<name>Armando Stellato</name>
			<email>stellato@info.uniroma2.it</email>
			<url>http://art.uniroma2.it/stellato</url>
			<organization>ART Group, University of Rome, Tor Vergata</organization>
			<organizationUrl>http://art.uniroma2.it</organizationUrl>
			<roles>
				<role>General Concept and Design</role>
			</roles>
		</developer>
		<developer>
			<id>fiorelli</id>
			<name>Manuel Fiorelli</name>
			<email>fiorelli@info.uniroma2.it</email>
			<url>http://art.uniroma2.it/fiorelli</url>
			<organization>ART Group, University of Rome, Tor Vergata</organization>
			<organizationUrl>http://art.uniroma2.it</organizationUrl>
			<roles>
				<role>Support on Converter Development</role>
				<role>Maven and ANT build Management</role>
			</roles>
		</developer>
		<developer>
			<id>turbati</id>
			<name>Andrea Turbati</name>
			<email>turbati@info.uniroma2.it</email>
			<url>http://art.uniroma2.it/turbati</url>
			<organization>ART Group, University of Rome, Tor Vergata</organization>
			<organizationUrl>http://art.uniroma2.it</organizationUrl>
			<roles>
				<role>Support on CODA</role>
			</roles>
		</developer>
	</developers>

	<properties>
		<spring.version>3.2.4.RELEASE</spring.version>
		<st.version>0.10</st.version>
		<coda.version>1.0</coda.version>
		<sheet2rdf.version>1.0</sheet2rdf.version>

		<!-- Creation delle cartelle nell'estensione. Prese da semanticTurkey-read-only -->
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<dist>target</dist>

		<dist.lib>components/lib</dist.lib>

		<dist.client>${dist}/st-client</dist.client>
		<dist.client.lib>${dist.client}/${dist.lib}</dist.client.lib>
		<dist.client.applet>${dist.client.lib}/applet</dist.client.applet>

	</properties>

	<dependencies>

		<!-- Semantic turkey -->
		<dependency>
			<groupId>it.uniroma2.art.semanticturkey</groupId>
			<artifactId>st-codegen-annotations</artifactId>
			<version>${st.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>it.uniroma2.art.semanticturkey</groupId>
			<artifactId>st-codegen-processor</artifactId>
			<version>${st.version}</version>
			<scope>compile</scope>
		</dependency>
		<dependency>
			<groupId>it.uniroma2.art.semanticturkey</groupId>
			<artifactId>st-core-framework</artifactId>
			<version>${st.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- Spring mvc -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${spring.version}</version>
			<scope>provided</scope>
		</dependency>

		<!-- Sheet2RDF -->
		<dependency>
			<groupId>it.uniroma2.art.sheet2rdf</groupId>
			<artifactId>sheet2rdf</artifactId>
			<version>${sheet2rdf.version}</version>
			<scope>compile</scope>
		</dependency>

		<!-- CODA -->
		<dependency>
			<groupId>it.uniroma2.art.coda</groupId>
			<artifactId>coda-framework</artifactId>
			<version>${coda.version}</version>
			<scope>compile</scope>
		</dependency>


	</dependencies>

	<build>
		<resources>
			<resource>
				<!-- we had problems in using standard wab deployment (referencing the 
					WEB-INF/classes from depending wabs) -->
				<!-- thus we have manually managed the webapp directory and we still 
					put the classes in the . position -->
				<directory>src/main/webapp</directory>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>

		<plugins>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.3.7</version>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<!-- <_wab>src/main/webapp</_wab> could also use src/main/resources 
							if you like -->

						<Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
						<Webapp-Context>${project.artifactId}</Webapp-Context>
						<Web-ContextPath>semanticturkey/${project.groupId}/${project.artifactId}</Web-ContextPath>
						<Export-Package>
							<!-- The following is required to make provided service classes available 
								for extensions -->
							{local-packages},
							it.uniroma2.art.sheet2rdf.core.*

						</Export-Package>
						<Import-Package>
							!ch.qos.logback.*,
							!com.sun.*,
							!com.werken.xpath,
							!junit.*,
							!org.apache.commons.cli,
							!org.apache.commons.dbcp,
							!org.apache.crimson.jaxp,
							!org.apache.felix.*,
							!org.apache.log4j.chainsaw,
							!org.apache.oro.text.perl,
							!org.apache.tools.*,
							!org.apache.xml.*,
							!org.apache.xmlbeans.impl.*,
							!org.gjt.xpp,
							!org.jaxen.*,
							!org.jdom.*,
							!org.openxmlformats.schemas.*,
							!org.relaxng.datatype,
							!schemasMicrosoftComOfficePowerpoint,
							!schemasMicrosoftComOfficeWord,
							!sun.misc,
							!org.apache.log.*,
							!org.apache.poi.hdgf.extractor,
							!org.apache.poi.hpbf.extractor,
							!org.apache.poi.hslf.extractor,
							!org.apache.poi.hsmf.*,
							!org.apache.poi.hwpf.*,
							!org.junit,
							!org.xmlpull.v1,


							<!-- to avoid Provider for javax.xml.parsers.SAXParserFactory cannot 
								be found -->
							javax.xml.parsers,
							javax.xml.transform,
							javax.xml.transform.sax,
							org.xml.sax,
							javax.xml.transform.dom,
							javax.xml.namespace,
							org.xml.sax.ext,
							org.w3c.dom,

							it.uniroma2.art.semanticturkey.services,
							org.aopalliance.aop,
							org.hibernate.validator,
							org.springframework.aop,
							org.springframework.aop.framework,
							org.springframework.beans.factory,
							org.springframework.cglib.core,
							org.springframework.cglib.proxy,
							org.springframework.cglib.reflect,
							org.springframework.core.convert,
							org.springframework.osgi.web.context.support,
							org.springframework.validation.beanvalidation,
							org.springframework.web.context,
							org.springframework.web.servlet,
							<!-- This dependency is required for the instantiation of the ST HTTP 
								Context -->
							it.uniroma2.art.semanticturkey.services.http,
							<!-- This dependency is required for the exception handler -->
							it.uniroma2.art.semanticturkey.mvc,

							<!-- These dependencies are required for multipart resolver -->
							org.springframework.web.multipart.commons,
							org.apache.commons.fileupload;version="[1.2.0,2)",
							org.apache.commons.io,

							<!-- Required for CODA -->
							org.osgi.service.packageadmin,

							*
						</Import-Package>
						<!-- <Bundle-ClassPath>.</Bundle-ClassPath> -->
						<Embed-Dependency>*;scope=compile|runtime;
							artifactId=!owlart-api|log4j|org.osgi.core|coda-framework|coda-osgi|coda-osgi-bundle;
							groupId=!org.slf4j|commons-logging|org.springframework|stax|xml-apis|
							org.apache.uima|org.antlr|org.reflections|org.springframework.osgi|org.apache.felix|org.osgi
						</Embed-Dependency>
						<Embed-Transitive>true</Embed-Transitive>
						<Bundle-ClassPath>{maven-dependencies},.</Bundle-ClassPath>
						<Embed-Directory>lib</Embed-Directory>

					</instructions>
				</configuration>
			</plugin>


			<!-- Build of the xpi. -->

			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>2.6</version>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${dist.client}</outputDirectory>
							<includeEmptyDirs>true</includeEmptyDirs>
							<resources>
								<resource>
									<directory>src/main/firefox</directory>
									<filtering>true</filtering>
									<includes>
										<include>chrome.manifest</include>
										<include>install.rdf</include>
										<include>components/data/sturkey.properties</include>
									</includes>
								</resource>
								<!-- this is to copy all the rest, being sure that we don't copy 
									again the things which have been processed (filtering=true) for substituting 
									Maven variables. Thus we have to copy everything, but excluding the elements 
									above -->
								<resource>
									<directory>src/main/firefox</directory>
									<filtering>false</filtering>
									<excludes>
										<exclude>chrome.manifest</exclude>
										<exclude>install.rdf</exclude>
									</excludes>
								</resource>
							</resources>
						</configuration>
					</execution>
					<!-- generates features.xml -->
					<execution>
						<id>generate-features</id>
						<phase>generate-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${basedir}/target</outputDirectory>
							<resources>
								<resource>
									<directory>src/features</directory>
									<filtering>true</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<phase>install</phase>
						<configuration>
							<!-- Install preso da semantic turkey read only -->
							<target>
								<ant antfile="sheet2rdf-build.xml" />
							</target>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

			<!-- attach features.xml to maven repo -->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>build-helper-maven-plugin</artifactId>
				<version>1.7</version>
				<executions>
					<execution>
						<id>attach-features</id>
						<phase>package</phase>
						<goals>
							<goal>attach-artifact</goal>
						</goals>
						<configuration>
							<artifacts>
								<artifact>
									<file>${project.build.directory}/features.xml</file>
									<type>xml</type>
									<classifier>features</classifier>
								</artifact>
							</artifacts>
						</configuration>
					</execution>
				</executions>
			</plugin>

		</plugins>
	</build>


</project>