<?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.4.0</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> -->
    <dependency>
    	<groupId>org.springframework</groupId>
    	<artifactId>spring-core</artifactId>
    </dependency>
    <dependency>
    	<groupId>org.springframework</groupId>
    	<artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
    	<groupId>org.springframework</groupId>
    	<artifactId>spring-beans</artifactId>
    </dependency>
    <dependency>
    	<groupId>log4j</groupId>
    	<artifactId>log4j</artifactId>
    </dependency>
    <dependency>
    	<groupId>commons-io</groupId>
    	<artifactId>commons-io</artifactId>
    </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
        </dependency>
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
        </dependency>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
        </dependency>
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-all</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
    	<plugins><!-- 
    		<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
			</plugin> -->
	  <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>cobertura-maven-plugin</artifactId>
        <version>2.5.2</version>
        <configuration>
			<instrumentation>
				<excludes>
					<exclude>**/*Test*.class</exclude>
				</excludes>
			</instrumentation>
          <check>
            <branchRate>50</branchRate>
            <lineRate>60</lineRate>
            <haltOnFailure>false</haltOnFailure>
            <totalBranchRate>50</totalBranchRate>
            <totalLineRate>50</totalLineRate>
            <packageLineRate>50</packageLineRate>
            <packageBranchRate>50</packageBranchRate>
            <!-- 
            <regexes>
              <regex>
                <pattern>ch.sahits.game.*</pattern>
                <branchRate>90</branchRate>
                <lineRate>80</lineRate>
              </regex>
              <regex>
                <pattern>com.example.boringcode.*</pattern>
                <branchRate>40</branchRate>
                <lineRate>30</lineRate>
              </regex>
            </regexes> -->
          </check>
        </configuration>
        <executions>
          <execution>
            <goals>
              <goal>clean</goal>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
	</plugins>
	</build>
	<reporting>
		<plugins>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.5.2</version>
			</plugin>
		      <plugin>
		        <groupId>org.codehaus.mojo</groupId>
		        <artifactId>findbugs-maven-plugin</artifactId>
		        <version>2.5.2</version>
		        <configuration>
		          <xmlOutput>true</xmlOutput>
		          <!-- Optional directory to put findbugs xdoc xml report -->
		          <xmlOutputDirectory>target/site</xmlOutputDirectory>
		        </configuration>
		      </plugin>			
		</plugins>
	</reporting>
    <!-- 
    <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>
