<?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>
	<groupId>com.nativelibs4java</groupId>
	<artifactId>nativelibs4java-parent</artifactId>
	<version>1.9</version>
	<packaging>pom</packaging>
	<inceptionYear>2009</inceptionYear>
	<name>NativeLibs4Java Common Configuration</name>
	
	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>
	
	<repositories>
		<repository>
			<id>sonatype</id>
			<name>Sonatype OSS Snapshots Repository</name>
			<url>http://oss.sonatype.org/content/groups/public</url>
		</repository>
		<!--repository>
			<id>typesafe</id>
			<name>typesafe-releases</name>
			<url>http://repo.typesafe.com/typesafe/maven-releases</url>
		</repository>
		<repository>
		  <id>typesafe2</id>
		  <name>Typesafe Repository</name>
		  <url>http://repo.typesafe.com/typesafe/releases/</url>
		</repository-->
		<!--repository>
			<id>nativelibs4java</id>
			<name>nativelibs4java Maven2 Repository</name>
			<url>http://nativelibs4java.sourceforge.net/maven</url>
		</repository-->
	</repositories>
	<pluginRepositories>
		<pluginRepository>
			<id>sonatype</id>
			<name>Sonatype OSS Snapshots Repository</name>
			<url>http://oss.sonatype.org/content/groups/public</url>
		</pluginRepository>
		<pluginRepository>
			<id>typesafe</id>
			<name>typesafe-releases</name>
			<url>http://repo.typesafe.com/typesafe/maven-releases</url>
		</pluginRepository>
		<pluginRepository>
		  <id>typesafe2</id>
		  <name>Typesafe Repository</name>
		  <url>http://repo.typesafe.com/typesafe/releases/</url>
		</pluginRepository>
		<!--pluginRepository>
			<id>nativelibs4java</id>
			<name>nativelibs4java Maven2 Repository</name>
			<url>http://nativelibs4java.sourceforge.net/maven</url>
		</pluginRepository-->
	</pluginRepositories>
	
	<properties>
		<mainClass></mainClass>
    <!-- <maven.javadoc.failOnError>false</maven.javadoc.failOnError> -->
		<versionSpecificSubPackage></versionSpecificSubPackage>
		<bridj.version>0.7.0</bridj.version>
		<maven-velocity-plugin.version>0.9</maven-velocity-plugin.version>
		<jnaerator.version>0.12</jnaerator.version>
		
		<jna.version></jna.version>
		<rococoa.version></rococoa.version>
		<scala.version>2.10.4</scala.version>
		
		<shadedArtifactAttached>true</shadedArtifactAttached>
		<shadedClassifierName>shaded</shadedClassifierName>
	</properties>
	
	<developers>
		<developer>
			<id>olivier.chafik</id>
			<name>Olivier Chafik</name>
			<email>olivier.chafik@gmail.com</email>
		</developer>
	</developers>
	
	<licenses>
		<license>
			<name>New BSD License (GPL-compatible)</name>
			<url>http://code.google.com/p/bridj/wiki/CreditsAndLicense</url>
			<distribution>repo</distribution>
			<comments></comments>
		</license>
	</licenses>
	
	<description>
NativeLibs4Java is an umbrella project that gathers ready-to-use Java libraries that wrap various native libraries.
Most of these wrappers are created automatically by JNAerator.
	</description>
	
	<mailingLists>
		<mailingList>
			<name>nativelibs4java</name>
			<post>nativelibs4java@googlegroups.com</post>
			<archive>http://groups.google.com/group/nativelibs4java/topics</archive>
		</mailingList>
	</mailingLists>
	
	<scm>
		<connection>scm:git:git@github.com:ochafik/nativelibs4java.git</connection>
		<developerConnection>scm:git:git@github.com:ochafik/nativelibs4java.git</developerConnection>
		<url>git@github.com:ochafik/nativelibs4java.git</url>
	</scm>
	
	<dependencies>
		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.10</version>
			<scope>test</scope>
		</dependency>
	</dependencies>
	
	<dependencyManagement>
		<dependencies>
      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-library</artifactId>
        <version>${scala.version}</version>
      </dependency>
      <dependency>
        <groupId>org.scala-lang</groupId>
        <artifactId>scala-reflect</artifactId>
        <version>${scala.version}</version>
      </dependency>
			<dependency>
				<groupId>org.scala-lang</groupId>
				<artifactId>scala-compiler</artifactId>
				<version>${scala.version}</version>
			</dependency>
		</dependencies>
	</dependencyManagement>
	<build>
		<pluginManagement>
			<plugins>
				<!--
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>tycho-maven-plugin</artifactId>
					<version>${tycho-version}</version>
					<extensions>true</extensions>
				</plugin>
			
				<plugin>
					<groupId>org.eclipse.tycho</groupId>
					<artifactId>target-platform-configuration</artifactId>
					<version>${tycho-version}</version>
					<configuration>
						<environments>
							<environment>
								<os>linux</os>
								<ws>gtk</ws>
								<arch>x86</arch>
							</environment>
							<environment>
								<os>linux</os>
								<ws>gtk</ws>
								<arch>x86_64</arch>
							</environment>
							<environment>
								<os>win32</os>
								<ws>win32</ws>
								<arch>x86</arch>
							</environment>
							<environment>
								<os>win32</os>
								<ws>win32</ws>
								<arch>x86_64</arch>
							</environment>
							<environment>
								<os>macosx</os>
								<ws>cocoa</ws>
								<arch>x86_64</arch>
							</environment>
						</environments>
					</configuration>
				</plugin>
				-->
				<plugin>
					<groupId>net.alchim31.maven</groupId>
					<artifactId>scala-maven-plugin</artifactId>
					<version>3.1.0</version>
					<executions>
						<execution>
							<goals>
								<goal>compile</goal>
								<goal>testCompile</goal>
                                 <goal>doc-jar</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<args>
							<arg>-optimise</arg>
						</args>
						<jvmArgs>
							<jvmArg>-Xms64m</jvmArg>
							<jvmArg>-Xmx1024m</jvmArg>
						</jvmArgs>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.nativelibs4java</groupId>
					<artifactId>maven-velocity-plugin</artifactId>
					<version>${maven-velocity-plugin.version}</version>
					<executions>
						<execution>
							<phase>generate-sources</phase>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
					<configuration>
						<properties>
							<version>${project.version}</version>
							<project_version>${project.version}</project_version>
							<project_name>${project.artifactId}</project_name>
							<bridj_version>${bridj.version}</bridj_version>
							<jnaerator_version>${jnaerator.version}</jnaerator_version>
							<jna_version>${jna.version}</jna_version>
							<rococoa_version>${rococoa.version}</rococoa_version>
							<versionSpecificSubPackage>${versionSpecificSubPackage}</versionSpecificSubPackage>
						</properties>
					</configuration>
				</plugin>
				<plugin>
					<groupId>com.nativelibs4java</groupId>
					<artifactId>maven-jnaerator-plugin</artifactId>
					<version>${jnaerator.version}</version>
					<executions>
						<execution>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-shade-plugin</artifactId>
					<version>2.1</version>
                     <configuration>
                        <artifactSet>
							<excludes>
								<exclude>org.scala-lang:scala-*</exclude>
								<exclude>junit:junit</exclude>
							</excludes>
						</artifactSet>
                         <filters>
                             <filter>
                                 <artifact>*:*</artifact>
                                 <excludes>
                                     <exclude>META-INF/*.SF</exclude>
                                     <exclude>META-INF/*.DSA</exclude>
                                     <exclude>META-INF/*.RSA</exclude>
                                     <exclude>META-INF/maven/**</exclude>
                                 </excludes>
                             </filter>
                         </filters>
                     </configuration>
				</plugin>
				<plugin>
					<groupId>org.eclipse.m2e</groupId>
					<artifactId>lifecycle-mapping</artifactId>
					<version>1.0.0</version>
					<configuration>
						<lifecycleMappingMetadata>
							<pluginExecutions>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.nativelibs4java</groupId>
										<artifactId>maven-velocity-plugin</artifactId>
										<versionRange>[0.0.0,)</versionRange>
										<goals>
											<goal>generate</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute />
									</action>
								</pluginExecution>
								<pluginExecution>
									<pluginExecutionFilter>
										<groupId>com.nativelibs4java</groupId>
										<artifactId>maven-javacl-plugin</artifactId>
										<versionRange>[0.0.0,)</versionRange>
										<goals>
											<goal>compile</goal>
										</goals>
									</pluginExecutionFilter>
									<action>
										<execute />
									</action>
								</pluginExecution>
							</pluginExecutions>
						</lifecycleMappingMetadata>
					</configuration>
				</plugin>
					<plugin>
					   <groupId>org.apache.maven.plugins</groupId>
					   <artifactId>maven-jar-plugin</artifactId>
					   <version>2.4</version>
					   <executions>
							   <execution>
									   <id>test-jar</id>
									   <phase>package</phase>
									   <goals>
											   <goal>test-jar</goal>
									   </goals>
							   </execution>
					   </executions>
					   <configuration>
							   <archive>
									   <addMavenDescriptor>false</addMavenDescriptor>
									   <manifest>
											   <mainClass>${mainClass}</mainClass>
									   </manifest>
							   </archive>
					   </configuration>
			   </plugin>
			</plugins>
		</pluginManagement>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-source-plugin</artifactId>
				<version>2.1.2</version>
				<executions>
					<execution>
						<id>attach-sources</id>
						<goals>
							<goal>jar-no-fork</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-javadoc-plugin</artifactId>
				<version>2.8</version>
                 <configuration>
                     <minmemory>128m</minmemory>
                     <maxmemory>512</maxmemory>
                     <breakiterator>true</breakiterator>
                     <quiet>true</quiet>
                     <source>1.5</source>
                     <verbose>false</verbose>
                     <linksource>true</linksource>
                     <show>public</show>
                     <links>
                         <link>http://download.oracle.com/javase/6/docs/api/</link>
                         <link>http://nativelibs4java.sourceforge.net/bridj/api/stable/</link>
                         <link>http://nativelibs4java.sourceforge.net/javacl/api/stable/</link>
                     </links>
                     <excludePackageNames>com.nativelibs4java.opencl.library</excludePackageNames>
                 
                 </configuration>
				<executions>
					<execution>
						<id>attach-javadocs</id>
						<goals>
							<goal>aggregate</goal>
							<goal>jar</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>cobertura-maven-plugin</artifactId>
				<version>2.4</version>
				<configuration>
					<aggregate>true</aggregate>
					<instrumentation>
						<excludes>
							<exclude>antlr/**/*.class</exclude>
							<exclude>net/**/*.class</exclude>
							<exclude>com/sun/**/*.class</exclude>
						</excludes>
					</instrumentation>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.5</source>
					<target>1.5</target>
					<encoding>UTF-8</encoding>
				</configuration>
			</plugin>
			
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.14</version>
                <configuration>
                    <!--<argLine>-d32</argLine>-->
                </configuration>
			</plugin>
		</plugins>
	</build>
	
	<issueManagement>
		<system>github</system>
		<url>https://github.com/ochafik/nativelibs4java/issues</url>
	</issueManagement>
	
	<!--distributionManagement>
		<site>
			<id>nativelibs4java-sites</id>
			<name>NativeLibs4Java Sourceforge Sites</name>
		    <url>sftp://opentator,nativelibs4java@frs.sourceforge.net:/home/groups/n/na/nativelibs4java/htdocs/sites</url>
		</site>
	</distributionManagement-->
	
	<profiles>
		<profile>
			<id>devel</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<properties>
				<maven.compiler.debug>true</maven.compiler.debug>
			</properties>
			<modules>
				<module>InteropIntegration</module>
				<module>Velocity</module>
				<module>BridJ</module>
				<module>jnaerator</module>
				<module>OpenCL</module>
        <!-- <module>OpenCL-JNA</module> -->
				<module>Utils</module>
				<module>IdleTime</module>
				<module>JarShrinker</module>
			</modules>
		</profile>
		<profile>
			<id>coordinated-release</id>
			<activation>
				<activeByDefault>true</activeByDefault>
			</activation>
			<modules>
				<module>Velocity</module>
				<module>BridJ</module>
				<module>jnaerator</module>
        <module>OpenCL</module>
        <!-- <module>OpenCL-JNA</module> -->
				<module>Utils</module>
			</modules>
		</profile>
		<profile>
			<id>bridj-jnaerator-release</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<modules>
				<module>Velocity</module>
				<module>BridJ</module>
				<module>jnaerator</module>
			</modules>
		</profile>
		<profile>
			<id>javacl-release</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<modules>
				<module>OpenCL</module>
				<module>Utils</module>
			</modules>
		</profile>
		<profile>
			<id>scalacl-release</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<modules>
				<module>Scalaxy</module>
				<module>ScalaCL</module>
			</modules>
		</profile>
		<profile>
			<id>gpg</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<build>
				<plugins>
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-gpg-plugin</artifactId>
						<version>1.4</version>
						<executions>
							<execution>
								<id>sign-artifacts</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
					</plugin>
				</plugins>
			</build>
		</profile>
        <profile>
          <id>regenerate</id>
		  <activation>
			<activeByDefault>false</activeByDefault>
		  </activation>
        </profile>
		<profile>
			<id>webstart</id>
			<activation>
				<activeByDefault>false</activeByDefault>
			</activation>
			<properties>
				<maven.compiler.debug>false</maven.compiler.debug>
				<shadedArtifactAttached>false</shadedArtifactAttached>
			</properties>
			<build>
				<plugins>
					<!--plugin>
						<artifactId>maven-antrun-plugin</artifactId>
						<version>1.7</version>
						<executions>
							<execution>
								<phase>install</phase>
								<configuration>
									<target>
										<scp todir="${nativelibs4java.sourceforge.user}:${nativelibs4java.sourceforge.password}@web.sourceforge.net:/home/groups/n/na/nativelibs4java/htdocs/webstart/jnaerator" trust="true" failonerror="true">
											<fileset file="${project.build.directory}/${project.name}-${project.version}-shaded.jar" />
										</scp>
									</target>
								</configuration>
								<goals>
									<goal>run</goal>
								</goals>
							</execution>
						</executions>
						
						<dependencies>
							<dependency>
								<groupId>ant</groupId>
								<artifactId>ant-jsch</artifactId>
								<version>1.6.5</version>
							</dependency>
							<dependency>
								<groupId>com.jcraft</groupId>
								<artifactId>jsch</artifactId>
								<version>0.1.42</version>
							</dependency>
						</dependencies>
					</plugin-->
					<plugin>
						<groupId>org.apache.maven.plugins</groupId>
						<artifactId>maven-jarsigner-plugin</artifactId>
						<version>1.2</version>
						<executions>
							<execution>
								<id>sign</id>
								<phase>verify</phase>
								<goals>
									<goal>sign</goal>
								</goals>
							</execution>
						</executions>
						<configuration>
							<removeExistingSignatures>true</removeExistingSignatures>
							<keystore>/Users/ochafik/security/ochafik.keystore</keystore>
							<alias>ochafik2012</alias>
								<!--alias>nativelibs4java</alias-->
								<!-- mvn "-Dstorepass=$KEYSTORE_PASS" -Dmaven.test.skip=true package -->
							<storepass>${storepass}</storepass>
						</configuration>
					</plugin>
				</plugins>
			</build>
		</profile>
	</profiles>
</project>
