<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>at.cdes</groupId>
    <artifactId>cdes-main</artifactId>
    <version>6.15.49-SNAPSHOT</version>
	<relativePath>../</relativePath>
  </parent>
  <artifactId>cdes-impl</artifactId>
  <description>cdes-impl: The implementation of the cdes business logic.</description>
  <packaging>bundle</packaging>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>5.1.9</version>
				<configuration>
					<instructions>
						<Private-Package>
							<!-- cdes-api -->
<!--                             at.cdes.controller.action,
                            at.cdes.controller.apiHelper,
                            at.cdes.controller.documentNumber, -->
                            at.cdes.service.*,
                            at.cdes.util.*,
                            ognl,

							<!-- cdes-impl -->
							<!-- at.cdes.appserver, (maven warning tells as this one is never used) -->
<!-- 							at.cdes.controller.action.impl,
							at.cdes.controller.actionhandler.*,
							at.cdes.controller.aop,
							at.cdes.controller.helper,
							at.cdes.controller.number, -->
							at.cdes.db.*,
							at.cdes.ext.*,
							at.cdes.file,
							at.cdes.gwtdto.*,
							at.cdes.oldGwtDto,
							at.cdes.hibernate,
							at.cdes.impl.*,
							at.cdes.mail,
							at.cdes.monitoring,
							at.cdes.msp.*,
							at.cdes.servlet,
							at.cdes.svg
						</Private-Package>
						<Export-Package>
										at.cdes.controller.*,
										at.cdes.bo.*,
										at.cdes.bo.plot,
										<!-- Those two are for interfaces needed in cdes-services.xml; seems that they need to be explicitely given, in order to show up in the Manifest -->
										at.cdes.bo.data.order.plott,
										at.cdes.bo.mime,
										at.cdes.controller.apiHelper,
										at.cdes.gwtdto,
										at.cdes.oldGwtDto,
										at.cdes.impl.config,              <!-- ConfigurationRegistry also used by project cdes -->
										at.cdes.impl.file,                <!-- GWTFileHandler etc. -->
										at.cdes.impl.i18n,
										at.cdes.impl.sec,
										at.cdes.service.*,
										at.cdes.spring,
										at.cdes.util,
										au.com.bytecode.opencsv,
										javassist.*,
										<!-- org.apache.xmlbeans.* Outcommented since maven warning tells us this one is never used-->
										</Export-Package>
						<Import-Package>!org.apache.catalina.*,
							!org.apache.commons.cli,
							!org.apache.neethi,
							!org.apache.tools.ant,
							!org.apache.ws.commons.schema.*,
							!org.apache.xmlbeans.*,
							!bitronix.*,
							!com.ibm.ejs.jts.jta.*,
							!com.ibm.websphere.*,
							!com.ibm.ws.*,
							!javassist.*,
							!javax.portlet.*,
							!javax.security.jacc.*,
							!org.apache.tools.ant.*,
							!com.sun.msv.datatype.*,
							!org.gjt.xpp,
							!nu.xom,
							!org.jdom.*,
							!org.objectweb.*,
							!org.relaxng.datatype.*,
							!org.xmlpull.*,
							!com.sun.jdi.*,
							!junit.framework,
							!junit.textui,
							!EDU.oswego.cs.dl.util.concurrent,
							!org.apache.axis2.jaxws.description,
							org.bouncycastle.*,
							org.w3c.dom,
							org.clazzes.remoting,
							org.clazzes.remoting.cmd,
							*</Import-Package>
						<Embed-Transitive>true</Embed-Transitive>
						<Embed-Dependency>jcifs,
							axiom-api,
							axiom-impl,
							axis2,
							wsdl4j,
							geronimo-ws-metadata_2.0_spec,
							jsr311-api,
							commons-httpclient,
							apache-mime4j-core,
							woden-api,
							woden-impl-commons,
							woden-impl-dom,
							hibernate-core,
							hibernate-ehcache,
							cglib,
							ehcache,
							dom4j,
							jaxen,
							javassist,
							gettext-commons,
							opencsv
						</Embed-Dependency>
					</instructions>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.1</version>
				<configuration>
        			<skipTests>true</skipTests>
					<excludes>
						<exclude>**/NumberCalculatorTest.java</exclude>
						<exclude>**/ReleaseObjectListTest.java</exclude>
					</excludes>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.clazzes</groupId>
				<artifactId>maven-tatools-plugin</artifactId>
				<!-- In order to update translatable strings in src/main/resources/at/cdes/i18n/keys.pot
					type mvn tatools:gettext -->
				<configuration>
					<poDirectory>src/main/resources/at/cdes/impl/i18n</poDirectory>
				</configuration>
			</plugin>
		</plugins>

		<resources>
			<resource>
				<directory>src/main/resources</directory>
			</resource>
		</resources>
	</build>
	<pluginRepositories>
		<pluginRepository>
			<id>org.clazzes</id>
			<name>clazzes.org repository.</name>
			<url>https://maven.clazzes.org</url>
		</pluginRepository>
	</pluginRepositories>

	<dependencies>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcprov-jdk15on</artifactId>
		</dependency>
		<dependency>
			<groupId>org.bouncycastle</groupId>
			<artifactId>bcpkix-jdk15on</artifactId>
		</dependency>
		<dependency>
			<groupId>org.clazzes.util</groupId>
			<artifactId>clazzes-util</artifactId>
		</dependency>
		<dependency>
			<groupId>org.clazzes.util</groupId>
			<artifactId>aop-util</artifactId>
			<version>1.7.3</version>
		</dependency>
		<dependency>
			<groupId>org.clazzes</groupId>
			<artifactId>jdbc2xml</artifactId>
		</dependency>
		<dependency>
			<groupId>at.cdes</groupId>
			<artifactId>cdes-api</artifactId>
			<version>6.15.49-SNAPSHOT</version>
		</dependency>
		<dependency>
			<groupId>at.cdes</groupId>
			<artifactId>cdes-batik</artifactId>
			<version>1.0.0</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>3.3.2.GA</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-ehcache</artifactId>
			<version>3.3.2.GA</version>
		</dependency>
		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
		</dependency>
		<dependency>
			<groupId>commons-logging</groupId>
			<artifactId>commons-logging</artifactId>
			<version>1.1.1</version>
		</dependency>
		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
		</dependency>
		<dependency>
			<groupId>org.javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.18.2-GA</version>
		</dependency>
		<dependency>
			<groupId>org.xnap</groupId>
			<artifactId>gettext-commons</artifactId>
			<version>0.9</version>
		</dependency>
		<dependency>
			<groupId>ognl</groupId>
			<artifactId>ognl</artifactId>
			<version>2.6.9</version>
		</dependency>
		<dependency>
			<groupId>cglib</groupId>
			<artifactId>cglib</artifactId>
			<version>2.2</version>
		</dependency>
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.15</version>
		</dependency>
        <dependency>
        	<groupId>com.google.code.gson</groupId>
        	<artifactId>gson</artifactId>
      	</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
		</dependency>
		<!--
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring</artifactId>
			<version>2.5.6.SEC03-clazzes1</version>
		</dependency>
		 -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-compress</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.pdfbox</groupId>
			<artifactId>pdfbox</artifactId>
			<version>1.7.1</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<scope>compile</scope>
		</dependency>

		<!-- Packages for Microsoft Sharepoint web service client. -->
		<dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2</artifactId>
			<version>1.6.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2-jaxws</artifactId>
			<version>1.6.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2-transport-http</artifactId>
			<version>1.6.2</version>
		</dependency>
		<dependency>
			<groupId>org.apache.axis2</groupId>
			<artifactId>axis2-transport-local</artifactId>
			<version>1.6.2</version>
		</dependency>
		<dependency>
			<groupId>wsdl4j</groupId>
			<artifactId>wsdl4j</artifactId>
			<version>1.6.2</version>
		</dependency>
		<dependency>
			<groupId>commons-httpclient</groupId>
			<artifactId>commons-httpclient</artifactId>
			<version>3.1</version>
		</dependency>
		<dependency>
			<groupId>org.apache.ws.commons.axiom</groupId>
			<artifactId>axiom-api</artifactId>
			<version>1.2.13</version>
		</dependency>
		<dependency>
			<groupId>org.apache.ws.commons.axiom</groupId>
			<artifactId>axiom-impl</artifactId>
			<version>1.2.13</version>
		</dependency>
		<dependency>
			<groupId>org.apache.ws.commons.schema</groupId>
			<artifactId>XmlSchema</artifactId>
			<version>1.4.7</version>
		</dependency>
		<dependency>
			<groupId>org.apache.neethi</groupId>
			<artifactId>neethi</artifactId>
			<version>3.0.2</version>
		</dependency>
		<dependency>
			<groupId>jcifs</groupId>
			<artifactId>jcifs</artifactId>
			<version>1.3.17</version>
		</dependency>
		<dependency>
			<groupId>org.clazzes.util</groupId>
			<artifactId>sched-util</artifactId>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.compendium</artifactId>
		</dependency>
		<dependency>
			<groupId>org.clazzes.util</groupId>
			<artifactId>http-util</artifactId>
		</dependency>
		<dependency>
			<groupId>org.clazzes.util</groupId>
			<artifactId>sql-util</artifactId>
			</dependency>
		<dependency>
			<groupId>org.clazzes.remoting</groupId>
			<artifactId>remoting</artifactId>
		</dependency>
    	<dependency>
	  		<groupId>commons-io</groupId>
		  	<artifactId>commons-io</artifactId>
		</dependency>
		<dependency>
			<groupId>org.apache.aries.blueprint</groupId>
			<artifactId>org.apache.aries.blueprint.core</artifactId>
			<version>1.4.3</version>
		</dependency>
		<dependency>
			<groupId>org.osgi</groupId>
			<artifactId>org.osgi.core</artifactId>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>org.jsoup</groupId>
			<artifactId>jsoup</artifactId>
			<version>1.18.1</version>
		</dependency>
	</dependencies>

	<profiles>
		<profile>
			<id>derby-db</id>
			<activation>
				<property>
					<name>at.cdes.db</name>
					<value>derby</value>
				</property>
			</activation>
			<dependencies>
				<dependency>
					<groupId>org.apache.derby</groupId>
					<artifactId>derby</artifactId>
					<version>10.4.1.3</version>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>mysql-db</id>
			<activation>
				<property>
					<name>at.cdes.db</name>
					<value>mysql</value>
				</property>
			</activation>
			<dependencies>
				<dependency>
					<groupId>com.mysql</groupId>
					<artifactId>mysql-connector-java</artifactId>
					<version>5.0.4</version>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>mssql-db</id>
			<activation>
				<property>
					<name>at.cdes.db</name>
					<value>mssql</value>
				</property>
			</activation>

			<dependencies>
				<dependency>
					<groupId>com.microsoft</groupId>
					<artifactId>sqljdbc</artifactId>
					<version>2.0</version>
				</dependency>
			</dependencies>
		</profile>

		<profile>
			<id>compilesinglepo</id>
			<activation>
				<property><name>do.osgi.install</name></property>
            	                <activeByDefault>false</activeByDefault>
			</activation>			
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.8</version>
						<executions>
							<execution>
								<id>execZeroImpl</id>
								<phase>generate-resources</phase>
								<configuration>
									<target name="compilesinglepo" description="Compile a single localization source file.">
										<exec executable="msgfmt" spawn="false" failonerror="true">
											<arg line="-java" />
											<arg line="-d ${project.basedir}/../cdes/src/main/resources/at/cdes/tapestry/i18n" />
											<arg line="-r at.cdes.impl.i18n.Messages" />
											<arg line="-l de" />
											<arg file="${project.basedir}/../cdes/src/main/resources/at/cdes/tapestry/i18n/Messages_de.po" />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
							<execution>
								<id>execOneImpl</id>
								<phase>generate-resources</phase>
								<configuration>
									<target name="compilesinglepo" description="Compile a single localization source file.">
										<exec executable="msgfmt" spawn="false" failonerror="true">
											<arg line="-java" />
											<arg line="-d ${project.basedir}/../cdes/src/main/resources/at/cdes/tapestry/i18n" />
											<arg line="-r at.cdes.impl.i18n.Messages" />
											<arg line="-l it" />
											<arg file="${project.basedir}/../cdes/src/main/resources/at/cdes/tapestry/i18n/Messages_it.po" />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
							<execution>
								<id>execTwoImpl</id>
								<phase>generate-resources</phase>
								<configuration>
									<target name="compilesinglepo" description="Compile a single localization source file.">
										<exec executable="msgfmt" spawn="false" failonerror="true">
											<arg line="-java" />
											<arg line="-d ${project.basedir}/../cdes/src/main/resources/at/cdes/tapestry/i18n" />
											<arg line="-r at.cdes.impl.i18n.Messages" />
											<arg line="-l en" />
											<arg file="${project.basedir}/../cdes/src/main/resources/at/cdes/tapestry/i18n/Messages_en.po" />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
							<execution>
								<id>execThreeImpl</id>
								<phase>generate-resources</phase>
								<configuration>
									<target name="compilesinglepo" description="Compile a single localization source file.">
										<exec executable="msgfmt" spawn="false" failonerror="true">
											<arg line="-java" />
											<arg line="-d ${project.basedir}/../cdes/src/main/resources/at/cdes/tapestry/i18n" />
											<arg line="-r at.cdes.impl.i18n.Messages" />
											<arg line="-l sl" />
											<arg file="${project.basedir}/../cdes/src/main/resources/at/cdes/tapestry/i18n/Messages_sl.po" />
										</exec>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>

</project>
