
<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>


	<artifactId>interfaces</artifactId>
	<packaging>${packaging.type}</packaging>
	<name>dllearner-interfaces</name>
	<url>http://aksw.org/Projects/DLLearner</url>
	<description>Interfaces: GUI, CLI, Web Service</description>


	<parent>
		<groupId>org.dllearner</groupId>
		<artifactId>dllearner-parent</artifactId>
		<version>1.2</version>
	</parent>

	<properties>
		<dist-dir>dl-learner-dist</dist-dir>
		<install-dir>share/dl-learner</install-dir>
		<packaging.type>jar</packaging.type>
	</properties>

	<profiles>
		<profile>
			<id>jetty</id>
			<properties>
				<packaging.type>war</packaging.type>
			</properties>
			<build>
				<plugins>
					<!-- <plugin> <groupId>org.simplericity.jettyconsole</groupId> <artifactId>jetty-console-maven-plugin</artifactId> 
						<version>1.50</version> <executions> <execution> <goals> <goal>createconsole</goal> 
						</goals> <configuration> <backgroundImage>${basedir}/src/main/resources/dl.gif</backgroundImage> 
						<additionalDependencies> <additionalDependency> <artifactId>jetty-console-log4j-plugin</artifactId> 
						</additionalDependency> </additionalDependencies> </configuration> </execution> 
						</executions> </plugin> -->
					<plugin>
						<groupId>org.apache.tomcat.maven</groupId>
						<artifactId>tomcat7-maven-plugin</artifactId>
						<version>2.2</version>
						<executions>
							<execution>
								<id>tomcat-run</id>
								<goals>
									<goal>exec-war-only</goal>
								</goals>
								<phase>package</phase>
								<configuration>
									<path>/interfaces</path>
									<enableNaming>false</enableNaming>
									<finalName>dl-learner-standalone.jar</finalName>
									<charset>utf-8</charset>
									<extraDependencies>
    <!--
										<dependency>
											<groupId>org.slf4j</groupId>
											<artifactId>slf4j-api</artifactId>
											<version>${slf4j.version}</version>
										</dependency>
										<dependency>
											<groupId>org.slf4j</groupId>
											<artifactId>jul-to-slf4j</artifactId>
											<version>${slf4j.version}</version>
										</dependency>
										<dependency>
											<groupId>org.slf4j</groupId>
											<artifactId>slf4j-log4j12</artifactId>
											<version>${slf4j.version}</version>
										</dependency>
										<dependency>
											<groupId>log4j</groupId>
											<artifactId>log4j</artifactId>
											<version>${log4j.version}</version>
										</dependency>
    -->
									</extraDependencies>
									<extraResources>
										<extraRexource>
											<directory>${basedir}/src/main/resources/</directory>
											<includes>
												<include>log4j.properties</include>
											</includes>
										</extraRexource>
									</extraResources>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
		<profile>
			<id>release</id>
			<properties>
				<packaging.type>jar</packaging.type>
			</properties>
			<build>
				<finalName>interfaces</finalName>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>appassembler-maven-plugin</artifactId>
						<version>1.9</version>
						<executions>
							<execution>
								<goals>
									<goal>assemble</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<repositoryLayout>flat</repositoryLayout>
							<useWildcardClassPath>true</useWildcardClassPath>
							<assembleDirectory>${project.build.directory}/dl-learner-dist</assembleDirectory>
							<repoPath>lib</repoPath>
							<repositoryName>lib</repositoryName>
							<!-- <defaultJvmSettings>
								<initialMemorySize>512M</initialMemorySize>
           						<maxMemorySize>1024M</maxMemorySize>
           						<extraArguments>
					                <extraArgument>-Dlog4j.configuration=../conf/log4j.properties</extraArgument>
				           		</extraArguments>
							</defaultJvmSettings> -->
							<configurationSourceDirectory>src/main/conf</configurationSourceDirectory>
							<!-- Set the target configuration directory -->
							<configurationDirectory>etc</configurationDirectory>
							<!-- Copy the contents from "/src/main/conf" to the target -->
							<copyConfigurationDirectory>true</copyConfigurationDirectory>
							<!-- Include the target configuration directory in the classpath -->
							<includeConfigurationDirectoryInClasspath>true</includeConfigurationDirectoryInClasspath>
							<extraJvmArguments>
							-Xms256m -Xmx1024m -Dlog4j.configuration=file:@BASEDIR@/etc/log4j.properties
							</extraJvmArguments>
							
							<installArtifacts>false</installArtifacts>
							<!-- <configurationDirectory>/</configurationDirectory> -->
							<platforms>
								<platform>windows</platform>
								<platform>unix</platform>
							</platforms>
							<programs>
								<program>
									<mainClass>org.dllearner.cli.CLI</mainClass>
									<name>cli</name>
								</program>
								<program>
									<mainClass>org.dllearner.cli.Enrichment</mainClass>
									<name>enrichment</name>
								</program>
								<program>
									<mainClass>org.dllearner.cli.SemKernelCLI</mainClass>
									<name>semkernel</name>
								</program>
								<!-- <program> <mainClass>org.dllearner.gui.StartGUI</mainClass> 
									<name>gui</name> </program> <program> <mainClass>org.dllearner.cli.QuickStart</mainClass> 
									<name>quickstart</name> </program> <program> <mainClass>org.dllearner.server.DLLearnerWS</mainClass> 
									<name>ws</name> </program> -->
							</programs>
						</configuration>
					</plugin>
					<plugin>
						<artifactId>maven-assembly-plugin</artifactId>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>attached</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<finalName>dllearner-${project.version}</finalName>
							<appendAssemblyId>false</appendAssemblyId>
							<descriptors>
								<descriptor>src/main/assemble/archive.xml</descriptor>
							</descriptors>
						</configuration>
					</plugin>
					<plugin>
						<groupId>de.akquinet.jbosscc.latex</groupId>
						<artifactId>maven-latex-plugin</artifactId>
						<version>1.2</version>
						<configuration>
							<settings>
								<!-- all tex main documents in this folder (including subfolders) 
									will be processed -->
								<texDirectory>${basedir}/doc/manual</texDirectory>
								<!-- the generated artifacts will be copied to this folder relative 
									to ${project.reporting.outputDirectory} -->
								<outputDirectory>.</outputDirectory>
								<!-- the working directory, for temporary files and LaTeX processing -->
								<tempDirectory>${project.build.directory}/m2latex</tempDirectory>
								<!-- clean up the working directory in the end? May be used for debugging -->
								<cleanUp>true</cleanUp>
								<!-- path to the TeX scripts, if none, it must be on the system path -->
								<texPath />
								<!-- the latex command -->
								<texCommand>pdflatex</texCommand>
								<!-- the bibtex command -->
								<bibtexCommand>bibtex</bibtexCommand>
								<!-- the arguments to use when calling latex -->
								<texCommandArgs>
									<texCommandArg>-interaction=nonstopmode</texCommandArg>
									<texCommandArg>--src-specials</texCommandArg>
								</texCommandArgs>
							</settings>
						</configuration>
						<executions>
							<!-- execute latex goal automatically during the site phase -->
							<execution>
								<phase>prepare-package</phase>
								<goals>
									<goal>latex</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
					<!--  <plugin>
			          <groupId>org.codehaus.mojo</groupId>
			          <artifactId>latex-maven-plugin</artifactId>
			          <version>1.1</version>
			          <configuration>
			          <docsRoot>${basedir}/doc/manual/</docsRoot>
			          <latexBuildDir>/tmp/latex</latexBuildDir>
			          </configuration>
        			</plugin> -->
				</plugins>
			</build>
		</profile>
		<profile>
			<id>debpackage</id>
			<properties>
				<packaging.type>jar</packaging.type>
			</properties>
			<build>
				<finalName>dl-learner</finalName>
				<plugins>
					<plugin>
						<groupId>org.codehaus.mojo</groupId>
						<artifactId>appassembler-maven-plugin</artifactId>
						<version>1.9</version>
						<executions>
							<execution>
								<goals>
									<goal>assemble</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<repositoryLayout>flat</repositoryLayout>
							<assembleDirectory>${project.build.directory}/${dist-dir}</assembleDirectory>
							<repoPath>/usr/share/dl-learner/lib</repoPath>
							<repositoryName>${install-dir}/lib</repositoryName>
							<extraJvmArguments>-Xms256m -Xmx1024m -Dlog4j.configuration=file:@BASEDIR@/etc/log4j.properties</extraJvmArguments>
							<configurationDirectory>/</configurationDirectory>
							<platforms>
								<platform>unix</platform>
							</platforms>
							<programs>
								<program>
									<mainClass>org.dllearner.cli.CLI</mainClass>
									<name>dl-learner-cli</name>
								</program>
								<program>
									<mainClass>org.dllearner.cli.Enrichment</mainClass>
									<name>dl-learner-enrichment</name>
								</program>
								<!-- <program> <mainClass>org.dllearner.gui.StartGUI</mainClass> 
									<name>gui</name> </program> <program> <mainClass>org.dllearner.cli.QuickStart</mainClass> 
									<name>quickstart</name> </program> <program> <mainClass>org.dllearner.server.DLLearnerWS</mainClass> 
									<name>ws</name> </program> -->
							</programs>
						</configuration>
					</plugin>
					<!-- <plugin>
						<groupId>de.akquinet.jbosscc.latex</groupId>
						<artifactId>maven-latex-plugin</artifactId>
						<version>1.2</version>
						<configuration>
							<settings>
								all tex main documents in this folder (including subfolders) 
									will be processed
								<texDirectory>${basedir}/doc/manual</texDirectory>
								the generated artifacts will be copied to this folder relative 
									to ${project.reporting.outputDirectory}
								<outputDirectory>.</outputDirectory>
								the working directory, for temporary files and LaTeX processing
								<tempDirectory>${project.build.directory}/m2latex</tempDirectory>
								clean up the working directory in the end? May be used for debugging
								<cleanUp>true</cleanUp>
								path to the TeX scripts, if none, it must be on the system path
								<texPath />
								the latex command
								<texCommand>pdflatex</texCommand>
								the bibtex command
								<bibtexCommand>bibtex</bibtexCommand>
								the arguments to use when calling latex
								<texCommandArgs>
									<texCommandArg>-interaction=nonstopmode</texCommandArg>
									<texCommandArg>src-specials</texCommandArg>
								</texCommandArgs>
							</settings>
						</configuration>
						<executions>
							execute latex goal automatically during the site phase
							<execution>
								<phase>prepare-package</phase>
								<goals>
									<goal>latex</goal>
								</goals>
							</execution>
						</executions>
					</plugin> -->
					<plugin>
						<artifactId>jdeb</artifactId>
						<groupId>org.vafer</groupId>
						<version>1.3</version>
						<executions>
							<execution>
								<phase>package</phase>
								<goals>
									<goal>jdeb</goal>
								</goals>
								<configuration>
									<deb>${basedir}/target/dl-learner_[[version]]_all.deb</deb>
									<controlDir>${basedir}/src/debian</controlDir>
									<dataSet>
										<data>
											<src>${project.build.directory}/${dist-dir}/${install-dir}/lib</src>
											<type>directory</type>
											<mapper>
												<type>perm</type>
												<prefix>/usr/share/dl-learner/lib</prefix>
											</mapper>
										</data>
										<data>
											<src>${project.build.directory}/${dist-dir}/bin/dl-learner-cli</src>
											<type>file</type>

											<mapper>
												<type>perm</type>
												<filemode>777</filemode>
												<prefix>/usr/bin</prefix>
											</mapper>
										</data>
										<data>
											<src>${project.build.directory}/${dist-dir}/bin/dl-learner-enrichment</src>
											<type>file</type>

											<mapper>
												<type>perm</type>
												<filemode>777</filemode>
												<prefix>/usr/bin</prefix>
											</mapper>
										</data>
										<data>
											<src>${basedir}/log4j.properties</src>
											<type>file</type>
											<mapper>
												<type>perm</type>
												<filemode>777</filemode>
												<prefix>/usr/share/dl-learner/lib</prefix>
											</mapper>
										</data>
										<data>
											<src>${basedir}/src/debian/interfaces.log</src>
											<type>file</type>
											<mapper>
												<type>perm</type>
												<filemode>777</filemode>
												<prefix>/var/log/dl-learner</prefix>
											</mapper>
										</data>
									</dataSet>
									<changesIn>${basedir}/CHANGES.txt</changesIn>
									<changesOut>${basedir}/target/dl-learner-${project.version}.changes</changesOut>
								</configuration>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
	<build>
		<finalName>dl-learner</finalName>
		
		<plugins>
		<!--	<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-shade-plugin</artifactId>
				<version>1.6</version>
				<executions>
					<execution>
						<phase>package</phase>
						<goals>
							<goal>shade</goal>
						</goals>
						<configuration>
							<transformers>
								<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
									<mainClass>org.dllearner.cli.CLI</mainClass>
								</transformer>
							</transformers>
						</configuration>
					</execution>
				</executions>
			</plugin>-->
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>xmlbeans-maven-plugin</artifactId>
				<version>2.3.3</version>
				<executions>
					<execution>
						<goals>
							<goal>xmlbeans</goal>
						</goals>
					</execution>
				</executions>
				<inherited>true</inherited>
				<configuration>
					<schemaDirectory>src/main/xsd</schemaDirectory>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>tomcat-maven-plugin</artifactId>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-resources-plugin</artifactId>
			</plugin>
			<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>javacc</id>
            <goals>
              <goal>javacc</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>latex-maven-plugin</artifactId>
          <version>1.1</version>
          <configuration>
          <docsRoot>${basedir}/doc/manual/</docsRoot>
          <latexBuildDir>/tmp/latex</latexBuildDir>
          </configuration>
        </plugin>
            

			<plugin>
				<groupId>org.mortbay.jetty</groupId>
				<artifactId>maven-jetty-plugin</artifactId>
				<configuration>
					<stopKey>stopKey</stopKey>
					<stopPort>9999</stopPort>
					<scanIntervalSeconds>1</scanIntervalSeconds>
					<requestLog implementation="org.mortbay.jetty.NCSARequestLog">
						<filename>log/yyyy_mm_dd.request.log</filename>
						<retainDays>90</retainDays>
						<append>true</append>
						<extended>true</extended>
						<logTimeZone>GMT</logTimeZone>
					</requestLog>
					<connectors>
						<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
							<port>9099</port>
							<maxIdleTime>60000</maxIdleTime>
						</connector>
					</connectors>

				</configuration>
				<!--execution is used for testing -->
				<!--executions> <execution> <id>start-jetty</id> <phase>pre-integration-test</phase> 
					<goals> <goal>run</goal> </goals> <configuration> <scanIntervalSeconds>0</scanIntervalSeconds> 
					<daemon>true</daemon> <stopKey>stopKey</stopKey> <stopPort>9999</stopPort> 
					</configuration> </execution> <execution> <id>stop-jetty</id> <phase>post-integration-test</phase> 
					<goals> <goal>stop</goal> </goals> </execution> </executions -->
			</plugin>

			<!--Surefire - for JUnits -->
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<configuration>
					<excludes>
						<exclude>org/dllearner/test/junit/OWLlinkTest.java</exclude>
						<exclude>org/dllearner/configuration/spring/TestBean.java</exclude>
						<exclude>org/dllearner/test/SpringTest.java</exclude>
						<exclude>org/dllearner/test/junit/GeizhalsTest.java</exclude>
						<exclude>org/dllearner/cli/MoosiqueCLITest.java</exclude>
					</excludes>
							<argLine>-Dlog4j.configuration=log4j.properties</argLine>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>exec-maven-plugin</artifactId>
				<version>1.3.2</version>
				<executions>
					<execution>
						<goals>
							<goal>exec</goal>
						</goals>
					</execution>
				</executions>
				<configuration>
					<executable>java</executable>
					<arguments>
						<argument>-Xms512m</argument>
						<argument>-Xmx4000m</argument>
					</arguments>
				</configuration>
			</plugin>

		</plugins>
		<pluginManagement>
			<plugins>
				<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											xmlbeans-maven-plugin
										</artifactId>
										<versionRange>
											[2.3.3,)
										</versionRange>
										<goals>
											<goal>xmlbeans</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>
											org.codehaus.mojo
										</groupId>
										<artifactId>
											javacc-maven-plugin
										</artifactId>
										<versionRange>
											[2.6,)
										</versionRange>
										<goals>
											<goal>javacc</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<ignore />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
			</plugins>
		</pluginManagement>
	</build>

	<dependencies>
		<dependency>
			<groupId>org.dllearner</groupId>
			<artifactId>components-core</artifactId>
			<exclusions>
				<exclusion>
					<artifactId>jena</artifactId>
					<groupId>com.hp.hpl.jena</groupId>
				</exclusion>
				<exclusion>
					<artifactId>stanford-corenlp</artifactId>
					<groupId>edu.stanford.nlp</groupId>
				</exclusion>
				<exclusion>
					<artifactId>slf4j-ext</artifactId>
					<groupId>org.slf4j</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<!--dependency> <groupId>org.dllearner</groupId> <artifactId>components-ext</artifactId> 
			</dependency -->
		<!-- Added the dependency of the core tests so that they will be accessible 
			from the tests in this component -->


<!--
		<dependency>
			<groupId>org.dllearner</groupId>
			<artifactId>components-core</artifactId>
			<classifier>tests</classifier>
			<scope>test</scope>
			<exclusions>
				<exclusion>
					<artifactId>jena</artifactId>
					<groupId>com.hp.hpl.jena</groupId>
				</exclusion>
				<exclusion>
					<artifactId>stanford-corenlp</artifactId>
					<groupId>edu.stanford.nlp</groupId>
				</exclusion>
			</exclusions>
		</dependency>
-->

    <!--
		<dependency>
			<groupId>com.jamonapi</groupId>
			<artifactId>jamon</artifactId>
		</dependency>
    -->
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jsp-api</artifactId>
		</dependency>
    <!--
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
		</dependency>
    -->
		<!-- <dependency>
			<groupId>org.aksw.commons</groupId>
			<artifactId>model</artifactId>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					Exclude Project-D from Project-B
					<artifactId>slf4j-log4j12</artifactId>
				</exclusion>
				 <exclusion>
					<groupId>net.sourceforge.owlapi</groupId>
					<artifactId>owlapi</artifactId>
				</exclusion>
				 <exclusion>
					<groupId>com.owldl</groupId>
					<artifactId>pellet</artifactId>
				</exclusion>
			</exclusions>
		</dependency> -->
		<dependency>
			<groupId>com.googlecode.json-simple</groupId>
			<artifactId>json-simple</artifactId>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
		</dependency>
    <!--
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-beans</artifactId>
		</dependency>
    -->
		<dependency>
			<groupId>org.apache.xmlbeans</groupId>
			<artifactId>xmlbeans</artifactId>
		</dependency>

		<dependency>
			<groupId>org.dllearner</groupId>
			<artifactId>spring-xmlbeans-3.0</artifactId>
			<version>1.0</version>
		</dependency>


		<dependency>
			<groupId>net.sf.jopt-simple</groupId>
			<artifactId>jopt-simple</artifactId>
		</dependency>

    <!--
		<dependency>
			<groupId>org.json</groupId>
			<artifactId>json</artifactId>
		</dependency>
    -->

		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.3</version>
		</dependency>

		<!--BEGIN Logging Dependencies -->

		<!--This is the api jar, it's needed at compile time -->
    <!--
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
		</dependency>
    -->
		<!--This is the bridge that ties calls to the slf4j api to the log4j framework. 
			This is a runtime dependency for programs which wish to use log4j as their 
			implementation. -->
    <!--
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<scope>runtime</scope>
		</dependency>
    -->
		<!--Log4J dependency needed for the runtime as well as some specific compile 
			time calls -->
    <!--
		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>jcl-over-slf4j</artifactId>
			<scope>runtime</scope>
		</dependency>
    -->
		<!--END Logging Dependencies -->
    <!--
		<dependency>
			<groupId>xerces</groupId>
			<artifactId>xercesImpl</artifactId>
			<version>2.8.0</version>
		</dependency>

		<dependency>
			<groupId>gurobi</groupId>
			<artifactId>gurobi</artifactId>
		</dependency>
    -->
    <dependency>
    	<groupId>org.springframework</groupId>
    	<artifactId>spring-beans</artifactId>
    </dependency>
	</dependencies>

<reporting>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>javacc-maven-plugin</artifactId>
        <version>2.6</version>
      </plugin>
    </plugins>
  </reporting>

</project>
