<?xml version="1.0"?>
<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>se.skltp.adapterservices.insuranceprocess.healthreporting</groupId>
	<artifactId>FkEintygAdapterIC</artifactId>
	<name>${project.artifactId}</name>
	<packaging>mule</packaging>
	<url>http://maven.apache.org</url>

	<parent>
		<groupId>se.skltp.adapterservices.insuranceprocess.healthreporting</groupId>
		<artifactId>ForsakringskassanEintygAdapter</artifactId>
		<version>2.2</version>
	</parent>

	<dependencies>
		<!-- schema dependency -->

		<dependency>
			<groupId>se.skltp.adapterservices.insuranceprocess.healthreporting</groupId>
			<artifactId>insuranceprocess-healthreporting-schemas</artifactId>
		</dependency>
        <dependency>
            <groupId>se.skltp.adapterservices.insuranceprocess.healthreporting</groupId>
            <artifactId>fk-vardgivare-sjukvard-schemas</artifactId>
        </dependency>
		<dependency>
			<groupId>se.skltp.adapterservices.insuranceprocess.healthreporting</groupId>
			<artifactId>FkEintygAdapterIC-validator</artifactId>
            <version>${project.version}</version>
		</dependency>
		
		<!-- itintegration monitoring schemas för PingForConfiguration -->
		<dependency>
		  	<groupId>se.skltp.itintegration.monitoring</groupId>
  			<artifactId>ServiceContracts_itintegration_monitoring</artifactId>
		</dependency>

		<!-- soi toolkit dependencies -->

		<dependency>
			<groupId>org.soitoolkit.commons.components</groupId>
			<artifactId>soitoolkit-commons-mule</artifactId>
		</dependency>

		<dependency>
			<groupId>org.soitoolkit.commons.poms</groupId>
			<artifactId>soitoolkit-test-dependencies</artifactId>
			<type>pom</type>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.soitoolkit.commons.poms.mule-dependencies</groupId>
			<artifactId>soitoolkit-mule-3.3.1-dependencies</artifactId>
			<type>pom</type>
		</dependency>
		
		<dependency>
			 <groupId>se.skltp.commons</groupId>
			 <artifactId>tp-commons-mule</artifactId>
		</dependency>
		
		<!-- Test dependecies -->
		<dependency>
		  <groupId>org.bouncycastle</groupId>
		  <artifactId>bcprov-jdk16</artifactId>
		  <version>1.45</version>
		  <scope>test</scope>
		</dependency>

        <dependency>
          <groupId>commons-io</groupId>
          <artifactId>commons-io</artifactId>
          <version>2.4</version>
          <scope>test</scope>
        </dependency>

        <dependency>
          <groupId>org.mockito</groupId>
          <artifactId>mockito-all</artifactId>
          <version>1.9.5</version>
          <scope>test</scope>
        </dependency>

        <dependency>
          <groupId>xmlunit</groupId>
          <artifactId>xmlunit</artifactId>
          <version>1.6</version>
          <scope>test</scope>
        </dependency>

	</dependencies>

	<build>
		<resources>
			<resource>
				<directory>${basedir}/src/main/resources</directory>
			</resource>
			<resource>
				<!-- To get mule-config files from the Mule Studio defined resource-folder 
					in the classpath... -->
				<directory>${basedir}/src/main/app</directory>
			</resource>
		</resources>

		<plugins>
			<plugin>
				<!-- Add mule-nature to the eclipse-.project-file -->
				<artifactId>maven-eclipse-plugin</artifactId>
				<configuration>
					<additionalBuildcommands>
						<buildcommand>org.mule.tooling.core.muleBuilder</buildcommand>
					</additionalBuildcommands>
					<additionalProjectnatures>
						<projectnature>org.mule.tooling.core.muleNature</projectnature>
					</additionalProjectnatures>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.mule.tools</groupId>
				<artifactId>maven-mule-plugin</artifactId>
				<extensions>true</extensions>
				<!-- Include mule-dependencies that doesn't come with Mule 3.x otherwise 
					we can't install to a vanilla Mule 3.x installation -->
				<configuration>
					<inclusions>
						<inclusion>
							<groupId>org.mule.modules</groupId>
							<artifactId>mule-module-rest</artifactId>
						</inclusion>
						<inclusion>
							<groupId>org.mule.modules</groupId>
							<artifactId>devkit</artifactId>
						</inclusion>
					</inclusions>
					<exclusions>

						<!-- xercesImpl is endorsed in MULE_HOME/lib/endorsed, see issue 274 -->
						<exclusion>
							<groupId>xerces</groupId>
							<artifactId>xercesImpl</artifactId>
						</exclusion>

						<!-- log4j is already included in MULE_HOME/lib/boot, see issue 283 -->
						<exclusion>
							<groupId>log4j</groupId>
							<artifactId>log4j</artifactId>
						</exclusion>

						<!-- junit is already included in MULE_HOME/lib/opt, see issue 283 -->
						<exclusion>
							<groupId>junit</groupId>
							<artifactId>junit</artifactId>
						</exclusion>

						<!-- servlet-api-2.5 is already included in MULE_HOME/lib/opt, see 
							issue 283 -->
						<exclusion>
							<groupId>org.mortbay.jetty</groupId>
							<artifactId>servlet-api-2.5</artifactId>
						</exclusion>

						<!-- jug is already included in MULE_HOME/lib/opt, see issue 283 -->
						<exclusion>
							<groupId>org.safehaus.jug</groupId>
							<artifactId>jug.osgi</artifactId>
						</exclusion>
						<!-- activemq needs to be added manually to MULE_HOME/lib/user if required, 
							see issue 283 -->
						<exclusion>
							<groupId>org.apache.activemq</groupId>
							<artifactId>activemq-core</artifactId>
						</exclusion>
						<exclusion>
							<groupId>org.apache.xbean</groupId>
							<artifactId>xbean-spring</artifactId>
						</exclusion>

						<!-- hornetq needs to be added manually to MULE_HOME/lib/user if required, 
							see issue 283 -->
						<exclusion>
							<groupId>org.hornetq</groupId>
							<artifactId>hornetq-core-client</artifactId>
						</exclusion>
						<exclusion>
							<groupId>org.hornetq</groupId>
							<artifactId>hornetq-jms</artifactId>
						</exclusion>
						<exclusion>
							<groupId>org.jboss.netty</groupId>
							<artifactId>netty</artifactId>
						</exclusion>

						<!-- jtds (JDBC driver fpr Microsoft SQL Server) needs to be added 
							manually to MULE_HOME/lib/user if required, see issue 283 -->
						<exclusion>
							<groupId>net.sourceforge.jtds</groupId>
							<artifactId>jtds</artifactId>
						</exclusion>

					</exclusions>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<configuration>
					<!-- if no classifier is declared, then a mvn install results in a file 
						in the local repo: ic2-1.0.0-SNAPSHOT.mule which is a jar-file - only strangely 
						named and with a bad extension -->
					<classifier>core</classifier>
					<excludes>
						<exclude>log4j.xml</exclude>
					</excludes>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>

		</plugins>

	</build>

	<profiles>
		<profile>
			<id>muleServer</id>
			<!-- Start mule server with the command "mvn -PmuleServer" or "mvn -PmuleServer 
				-Dexec.args="${artifaceId}-config.xml"" if you want to override the default 
				config-file -->
			<build>
				<defaultGoal>test</defaultGoal>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>exec-maven-plugin</artifactId>
						<executions>
							<execution>
								<phase>test</phase>
								<goals>
									<goal>java</goal>
								</goals>
								<configuration>
									<mainClass>se.skl.skltpservices.adapter.fk.FkIntegrationComponentMuleServer</mainClass>
									<classpathScope>test</classpathScope>
								</configuration>
							</execution>
						</executions>
					</plugin>
					<plugin>
						<artifactId>maven-surefire-plugin</artifactId>
						<configuration>
							<skip>true</skip>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
