<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <artifactId>OpenPatrician</artifactId>
        <groupId>ch.sahits.game</groupId>
        <version>0.0.2</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>OpenPatricianUtilities</artifactId>

    <name>OpenPatricianUtilities</name>
    
    <packaging>jar</packaging>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies><!-- 
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.osgi.core</artifactId>
            <version>1.4.0</version>
        </dependency> -->
    </dependencies>

    <build>
    	<plugins><!-- 
    		<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
			</plugin> -->
		</plugins>
	</build>
    <!-- 
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.1.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-Activator>ch.sahits.game.openpatrician.util.UtilityActivator</Bundle-Activator>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>
 -->
 <!-- 
    <profiles>
        <profile>
             this profile executes the bundle on apache felix
            <id>run-on-felix</id>
            <dependencies>
                <dependency>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>org.apache.felix.main</artifactId>
                    <version>3.0.3</version>
                    <scope>provided</scope>
                </dependency>
                <dependency>
                    <groupId>org.apache.felix.gogo</groupId>
                    <artifactId>org.apache.felix.gogo.commands</artifactId>
                    <version>0.4.0</version>
                </dependency>
            </dependencies>

            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <version>1.5</version>
                        <executions>
                            <execution>
                                <id>compile</id>
                                <phase>compile</phase>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                                <configuration>
                                    <target>
                                        <property name="plugins" refid="maven.runtime.classpath" />
                                        <pathconvert pathsep=" " dirsep="/" property="project.build.url">
                                            <path path="${project.build.directory}" />
                                        </pathconvert>
                                        <pathconvert property="plugins.jars" pathsep=":">
                                            <path path="${plugins}" />
                                            <map from="${project.build.directory}/classes" to="" />
                                        </pathconvert>
                                        <makeurl property="urls" separator=" " validate="false">
                                            <path path="${plugins.jars}" />
                                        </makeurl>
                                        <pathconvert pathsep=" " property="bundles">
                                            <path path="${plugins}" />
                                            <mapper>
                                                <chainedmapper>
                                                    <flattenmapper />
                                                    <globmapper from="*" to="file:modules/*" casesensitive="no" />
                                                </chainedmapper>
                                            </mapper>
                                        </pathconvert>
                                        <makeurl property="main.bundle.url" file="${project.build.directory}/${project.artifactId}-${project.version}.jar" />
                                        <echo file="${project.build.directory}/run.properties">felix.auto.install=${urls}
                                            felix.auto.start=${main.bundle.url}
                                            org.osgi.framework.storage=${project.build.url}/felix-cache
                                            org.osgi.framework.bootdelegation=*</echo>
                                        <replace file="${project.build.directory}/run.properties" token="\" value="\\" />
                                        <echo file="${project.build.directory}/config.properties">felix.auto.install="${bundles}"
                                            felix.auto.start=file:modules/${project.artifactId}-${project.version}.jar</echo>
                                        <copy file="${maven.dependency.org.apache.felix.org.apache.felix.main.jar.path}" tofile="${project.build.directory}/felix.jar" />
                                    </target>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                        <version>2.2-beta-5</version>
                        <executions>
                            <execution>
                                <id>create-executable-jar</id>
                                <phase>package</phase>
                                <goals>
                                    <goal>single</goal>
                                </goals>
                                <configuration>
                                    <descriptors>
                                        <descriptor>${basedir}/src/main/assembly/felix.xml</descriptor>
                                    </descriptors>
                                    <finalName>${project.artifactId}-${project.version}</finalName>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
     -->
</project>
