<?xml version="1.0" encoding="UTF-8" standalone="no"?><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">
<!--

 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.

-->

	<parent>
		<artifactId>triaxrs.parent</artifactId>
		<groupId>org.apache.clerezza</groupId>
		<version>0.3-incubating</version>
	</parent>
	<modelVersion>4.0.0</modelVersion>
	<groupId>org.apache.clerezza</groupId>
	<artifactId>triaxrs</artifactId>
	<version>0.11-incubating</version>
	<packaging>bundle</packaging>
	<name>Clerezza - Triaxrs</name>
	<description>JAX-RS (aka JSR 311) implementation for runnning in OSGi container</description>
	<dependencies>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.compendium</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.ws.rs</groupId>
			<artifactId>jsr311-api</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.clerezza</groupId>
			<artifactId>jaxrs.extensions</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.clerezza</groupId>
			<artifactId>utils</artifactId>
		</dependency>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.wymiwyg</groupId>
			<artifactId>wrhapi</artifactId>
		</dependency>
		<dependency>
			<groupId>org.easymock</groupId>
			<artifactId>easymock</artifactId>
			<scope>test</scope>
		</dependency>
	</dependencies>
	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-scr-plugin</artifactId>
				<executions>
					<execution>
						<id>generate-scr-scrdescriptor</id>
						<goals>
							<goal>scr</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-Activator>org.apache.clerezza.triaxrs.Activator</Bundle-Activator>
						<Embed-Dependency>*;artifactId=jsr311-api;inline=true</Embed-Dependency>
						<Export-Package>org.apache.clerezza.triaxrs.prefixmanager,javax.ws.rs.*;version="1.0"</Export-Package>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.xsite</groupId>
				<artifactId>xsite-maven-plugin</artifactId>
				<configuration>
					<sourceDirectoryPath>${basedir}/src/site/xsite</sourceDirectoryPath>
					<sitemapPath>content/sitemap.xml</sitemapPath>
					<skinPath>templates/skin.html</skinPath>
					<outputDirectoryPath>${basedir}/target/site/documentation</outputDirectoryPath>
				</configuration>
				<executions>
					<execution>
						<phase>pre-site</phase>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-antrun-plugin</artifactId>
				<executions>
					<execution>
						<phase>pre-site</phase>
						<configuration>
							<tasks>
								<echo>Add version number in download.xhtml</echo>
								<property name="stable_version" value="${project.version}" />
								<property name="stable_version_rdf_providers" value="0.5" />
								<script language="javascript"> <![CDATA[
						  		var version_no = project.getProperty("stable_version");
					   			version_no = version_no.replace("-SNAPSHOT","");
					   			var term = /\d+$/;		  	
								var last_number = term.exec(version_no);
								if(Number(last_number) == 0) {
									// Because we don't know when we update the secondary version number
									version_no = ("X.X");
					   			}else{
					   				last_number = (Number(last_number)-1).toString();
					   				//workaround because regex /\d+$/ as param in function replace is not supported
					   				//no idea why length is first a function and than a number object
					   				version_no = version_no.slice(0,version_no.length()-last_number.toString().length)+last_number;
					   			}
					   			project.setProperty("stable_version",version_no);]]>
								</script>
								<condition else="${project.version}" property="latest_stable_version_no" value="${stable_version}">
									<contains string="${project.version}" substring="SNAPSHOT" />
								</condition>
								<replaceregexp file="${basedir}/target/site/documentation/download.xhtml" flags="g" match="\[VERSION\]" replace="${latest_stable_version_no}">
								</replaceregexp>
								<replaceregexp file="${basedir}/target/site/documentation/download.xhtml" flags="g" match="\[VERSION-RDF-PROVIDERS\]" replace="${stable_version_rdf_providers}">
								</replaceregexp>
								<property name="link_jaxrs" value="&lt;a href=&quot;http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.triaxrs/${project.version}/&quot; &gt; http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.triaxrs/${project.version}/ &lt;/a&gt;" />
								<property name="link_jaxrs_providers" value="&lt;a href=&quot;http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.jaxrs.rdf.providers/&quot; &gt; http://repo.trialox.org/snapshot/org/apache/clerezza/org.apache.clerezza.jaxrs.rdf.providers/ &lt;/a&gt;" />
								<property name="html_text" value="&lt;p&gt; The latest snapshot is available on ${link_jaxrs} and ${link_jaxrs_providers} &lt;/p&gt;" />
								<condition else="" property="insert_text" value="${html_text}">
									<contains string="${project.version}" substring="SNAPSHOT" />
								</condition>
								<replaceregexp file="${basedir}/target/site/documentation/download.xhtml" flags="g" match="\[ADD_SNAPSHOT_LINK\]" replace="${insert_text}">
								</replaceregexp>
							</tasks>
						</configuration>
						<goals>
							<goal>run</goal>
						</goals>
					</execution>
				</executions>
				<dependencies>
					<dependency>
						<groupId>org.apache.ant</groupId>
						<artifactId>ant</artifactId>
						<version>1.7.1</version>
					</dependency>
					<dependency>
						<groupId>org.apache.ant</groupId>
						<artifactId>ant-apache-regexp</artifactId>
						<version>1.7.1</version>
					</dependency>
					<dependency>
						<groupId>org.apache.ant</groupId>
						<artifactId>ant-apache-bsf</artifactId>
						<version>1.7.1</version>
					</dependency>
					<dependency>
						<groupId>org.apache.ant</groupId>
						<artifactId>ant-apache-regexp</artifactId>
						<version>1.7.1</version>
					</dependency>
					<dependency>
						<groupId>org.apache.ant</groupId>
						<artifactId>ant-nodeps</artifactId>
						<version>1.7.1</version>
					</dependency>
					<dependency>
						<groupId>rhino</groupId>
						<artifactId>js</artifactId>
						<version>1.7R1</version>
					</dependency>
					<dependency>
						<groupId>ant-contrib</groupId>
						<artifactId>ant-contrib</artifactId>
						<version>1.0b3</version>
					</dependency>
					<dependency>
						<groupId>jakarta-regexp</groupId>
						<artifactId>jakarta-regexp</artifactId>
						<version>1.4</version>
					</dependency>
				</dependencies>
			</plugin>
		</plugins>
	</build>
	<!-- <repositories>
		<repository>
			<id>codehaus-repository</id>
			<name>Codehaus Repository</name>
			<url>http://repository.codehaus.org</url>
		</repository>
	</repositories> -->
</project>
