<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>
  <groupId>com.fathzer</groupId>
  <artifactId>ajlib</artifactId>
  <packaging>jar</packaging>
  <version>0.2.2</version>
  <name>A-JLib</name>
  <description>AJlib is a simple java library with Swing widgets, utilities and other stuff</description>
  <url>http://ajlib.soft.fathzer.com</url>
  
  <licenses>
    <license>
      <name>GNU Lesser General Public License v3 (LGPL-v3)</name>
      <url>http://www.gnu.org/licenses/lgpl-3.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <scm>
    <url>http://svn.code.sf.net/p/ajlib/code/trunk</url>
    <connection>http://svn.code.sf.net/p/ajlib/code/trunk</connection>
  </scm>
  
  <developers>
    <developer>
      <id>Fathzer</id>
      <name>Jean-Marc Astesana</name>
      <email>admin@fathzer.com</email>
    </developer>
  </developers>  
  
  <distributionManagement>
    <repository>
      <id>ReleaseFathzer</id>
      <name>Release fathzer.com</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>SnapshotFathzer</id>
      <name>Snapshot fathzer.com</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
      <uniqueVersion>false</uniqueVersion>
    </snapshotRepository>
  </distributionManagement>
  
  <properties>
    <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>
  </properties>

  <build>
    <sourceDirectory>src</sourceDirectory>
    <resources>
      <resource>
        <directory>src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <testSourceDirectory>srcJUnit</testSourceDirectory>
    <testResources>
      <testResource>
        <directory>srcJUnit</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </testResource>
    </testResources>

    <plugins>
      <plugin>
        <groupId>org.kohsuke</groupId>
    	<artifactId>pgp-maven-plugin</artifactId>
    	<version>1.0</version>
        <executions>
          <execution>
            <goals>
              <goal>sign</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
        	<!-- For obvious security reasons, keyFile and pass phrase are not provided -->
      		<secretkey>keyfile:${user.home}/fathzer_private_key.asc</secretkey>
      		<passphrase>file:${user.home}/fathzer_key_pwd.txt</passphrase>
    	</configuration>
      </plugin>
    
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>

      <plugin>
      	<artifactId>maven-jar-plugin</artifactId>
      	<version>2.4</version>
      	<configuration>
	        <archive>
	          <manifest>
	            <addClasspath>true</addClasspath>
	            <mainClass>com.fathzer.soft.ajlib.swing.demo.AJLibDemo</mainClass>
	          </manifest>
	        </archive>
	        <excludes>
	          <exclude>com/fathzer/soft/ajlib/junit/*.*</exclude>
	          <exclude>com/fathzer/soft/ajlib/junit</exclude>
	          <exclude>**/package.html</exclude>
	        </excludes>
	    </configuration>
      </plugin>
      
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-source-plugin</artifactId>
        <version>2.2.1</version>
        <executions>
          <execution>
            <id>attach-sources</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
        
      <plugin>
		<groupId>org.apache.maven.plugins</groupId>
		<artifactId>maven-javadoc-plugin</artifactId>
		<version>2.9</version>
		<configuration>
			<doencoding>UTF-8</doencoding>
			<excludePackageNames>*.junit.*:com.fathzer.soft.ajlib.swing.demo</excludePackageNames>
			<overview>${basedir}/overview.html</overview>
			<header>${project.version}</header>
			<footer>${project.version}</footer>
		</configuration>
		<executions>
			<execution>
				<id>javadoc_generation</id>
				<phase>package</phase>
				<goals>
					<goal>jar</goal>
				</goals>
			</execution>
		</executions>
      </plugin>
      
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.7</version>
        <executions>
          <execution>
            <phase>install</phase>
            <configuration>
              <target>
				<echo message="This is an ant message: version=${project.version} to ${project.build.directory}"/>
				<zip destfile="${basedir}/A-JLib-v${project.version}.zip">
				    <zipfileset dir="." includes="license.html"/>
				    <zipfileset dir="${project.build.directory}" includes="*.jar"/>
				</zip>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      
    </plugins>
  </build>
  
  <dependencies>
  	<dependency>
		<groupId>junit</groupId>
		<artifactId>junit</artifactId>
		<version>4.11</version>
		<scope>test</scope>
	</dependency>
  </dependencies>
  
</project>