<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>com.tourgeek.config</groupId>
    <artifactId>tourgeek-config-web-reactor</artifactId>
    <version>0.8.5</version>
  </parent>
  
  <artifactId>com.tourgeek.config.web.httpweb</artifactId>

	<name>tourgeek-config-web-httpweb - Hybrid osgi webapp</name>
	<description>web osgi httpweb bundle</description>

	<packaging>bundle</packaging>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<extensions>true</extensions>
				<configuration>
					<instructions>
						<Bundle-ManifestVersion>2</Bundle-ManifestVersion>
						<Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
						<Export-Package>${project.artifactId}.*;version=${project.version}</Export-Package>
						<Import-Package>*;resolution:=optional</Import-Package>
						<Bundle-Activator>${project.artifactId}.HttpServiceActivator</Bundle-Activator>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.eclipse.jetty</groupId>
				<artifactId>jetty-maven-plugin</artifactId>
				<configuration>
					<httpConnector>
						<port>8888</port>
						<idleTimeout>30000</idleTimeout>
					</httpConnector>
					<webAppSourceDirectory>${project.build.directory}/${project.artifactId}-${project.version}
					</webAppSourceDirectory>
					<webApp>
						<contextPath>/</contextPath>
					</webApp>
				</configuration>
			</plugin>

			<!-- plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-dependency-plugin</artifactId>
				<executions>
					<execution>
						<id>move-dojo-resources</id>
						<phase>process-resources</phase>
						<goals>
							<goal>unpack</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<artifactItems>
						<artifactItem>
							<groupId>org.dojotoolkit</groupId>
							<artifactId>dojo</artifactId>
							<version>${dojo-version}</version>
							<type>zip</type>
							<outputDirectory>${project.build.directory}</outputDirectory>
						</artifactItem>
						<artifactItem>
							<groupId>org.jbundle.res</groupId>
							<artifactId>org.jbundle.res.images</artifactId>
							<version>${jbundle-version}</version>
			                <classifier>root</classifier>
							<type>jar</type>
							<outputDirectory>${project.build.directory}/${project.build.finalName}
							</outputDirectory>
						</artifactItem>
						<artifactItem>
							<groupId>org.jbundle.res</groupId>
							<artifactId>org.jbundle.res.images.misc</artifactId>
							<version>${jbundle-version}</version>
			                <classifier>root</classifier>
							<type>jar</type>
							<outputDirectory>${project.build.directory}/${project.build.finalName}
							</outputDirectory>
						</artifactItem>
                        <artifactItem>
                            <groupId>org.jbundle.res</groupId>
                            <artifactId>org.jbundle.res.docs.styles.xsl</artifactId>
                            <version>${jbundle-version}</version>
                            <classifier>root</classifier>
                            <type>jar</type>
                            <outputDirectory>${project.build.directory}/${project.build.finalName}
                            </outputDirectory>
                        </artifactItem>
                        <artifactItem>
                            <groupId>org.jbundle.util.osgi</groupId>
                            <artifactId>org.jbundle.res.docs.styles</artifactId>
                            <version>${jbundle-util-osgi-webstart-version}</version>
                            <type>jar</type>
                            <outputDirectory>${project.build.directory}/${project.build.finalName}
                            </outputDirectory>
                        </artifactItem>
   						<artifactItem>
							<groupId>com.tourgeek.res</groupId>
							<artifactId>com.tourgeek.res.images</artifactId>
							<version>${project.version}</version>
			                <classifier>root</classifier>
							<type>jar</type>
							<outputDirectory>${project.build.directory}/${project.build.finalName}
							</outputDirectory>
							<excludes>docs\/programmer\/**,docs\/help\/specifications\/**,docs\/test\/**
							</excludes>
						</artifactItem>
						<artifactItem>
						  <groupId>org.jbundle.util.osgi.wrapped</groupId>
						  <artifactId>org.jbundle.util.osgi.wrapped.uk.org.pajhome.crypt.sha1</artifactId>
							<version>2.2.0</version>
							<type>jar</type>
							<outputDirectory>${project.build.directory}/sha</outputDirectory>
						</artifactItem>
					</artifactItems>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<executions>
					<execution>
						<id>copy-resources</id>
						<phase>process-resources</phase>
						<goals>
							<goal>copy-resources</goal>
						</goals>
						<configuration>
							<outputDirectory>${project.build.directory}/${project.build.finalName}/docs/styles/js
							</outputDirectory>
							<resources>
								<resource>
									<directory>${project.build.directory}/dojo-${dojo-version}
									</directory>
									<filtering>false</filtering>
								</resource>
							</resources>
						</configuration>
					</execution>
				</executions>
			</plugin -->
		</plugins>

		<!-- resources>
			<resource>
				<directory>${project.build.directory}/sha/org/jbundle/util/osgi/wrapped/uk/org/pajhome/crypt/sha1</directory>
				<targetPath>docs/styles/js/sha</targetPath>
			</resource>
			<resource>
				<directory>${project.build.directory}/${project.build.finalName}</directory>
				<targetPath />
			</resource>
		</resources -->
	</build>

	<dependencies>	    
		<dependency>
		    <groupId>com.tourgeek.config</groupId>
		    <version>0.8.5</version>
			<artifactId>tourgeek-config-dep-all</artifactId>
			<type>pom</type>
			<scope>provided</scope>	<!-- Hey this is OSGi -->
		</dependency>

		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>osgi.core</artifactId>
			<scope>provided</scope> <!-- This better be provided -->
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>osgi.cmpn</artifactId>
			<scope>provided</scope> <!-- This better be provided -->
		</dependency>

	    <dependency>
			<groupId>org.jbundle.config.web</groupId>
			<artifactId>org.jbundle.config.web.httpservice</artifactId>
			<version>${jbundle-version-range}</version>
	    </dependency>
	</dependencies>

</project>

