<?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/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>org.daisy</groupId>
    <artifactId>daisy</artifactId>
    <version>2</version>
    <relativePath />
  </parent>

  <groupId>org.daisy.libs</groupId>
  <artifactId>jing</artifactId>
  <version>20091111.0.0</version>
  <packaging>bundle</packaging>

  <name>Jing (OSGi bundle)</name>
  <description>An OSGi Bundle for Jing - tools for validating and translating RelaxNG</description>
  <url>http://code.google.com/p/jing-trang</url>
  <organization>
    <name>Thai Open Source Software Center Ltd</name>
    <url>http://www.thaiopensource.com/relaxng/jing.html</url>
  </organization>
  <licenses>
    <license>
      <name>New BSD License</name>
      <url>http://www.opensource.org/licenses/bsd-license.php</url>
    </license>
  </licenses>
  <scm>
    <connection>http://jing-trang.googlecode.com/svn/trunk/</connection>
    <url>http://code.google.com/p/jing-trang/source/browse/</url>
    <tag>jing-20091111.0.0</tag>
  </scm>
  <developers>
    <developer>
      <id>jclark</id>
      <name>James Clark</name>
      <email>jjc@jclark.com</email>
      <roles>
        <role>developer</role>
      </roles>
    </developer>
  </developers>

  <properties>
    <lib.groupId>com.thaiopensource</lib.groupId>
    <lib.artifactId>jing</lib.artifactId>
    <lib.version>20091111</lib.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>${lib.groupId}</groupId>
      <artifactId>${lib.artifactId}</artifactId>
      <version>${lib.version}</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>com.thaiopensource.jing</Bundle-SymbolicName>
            <Export-Package>org.relaxng.datatype,
                            org.relaxng.datatype.helpers,
                            com.thaiopensource.*
            </Export-Package>
            <Import-Package>com.icl.saxon;resolution:=optional,
                            net.sf.saxon;resolution:=optional,
                            org.apache.tools.ant.*;resolution:=optional,
                            org.apache.xalan.*;resolution:=optional,
                            org.apache.xerces.*;resolution:=optional,
                            org.apache.xml.resolver.*;resolution:=optional,
                            org.apache.tools.ant.*;resolution:=optional,
                            org.iso_relax.*;resolution:=optional,
                            *                                        
            </Import-Package>
            <Embed-Dependency>*;inline=true</Embed-Dependency>
            <_removeheaders>Built-By,Bnd-LastModified,Embed-Dependency,Include-Resource,Private-Package</_removeheaders>
          </instructions>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>sonatype-oss-release</id>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <phase>none</phase>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>fetch-sources-and-javadocs</id>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <artifactItems>
                    <artifactItem>
                      <groupId>${lib.groupId}</groupId>
                      <artifactId>${lib.artifactId}</artifactId>
                      <version>${lib.version}</version>
                      <classifier>javadoc</classifier>
                      <outputDirectory>${project.build.directory}/javadoc</outputDirectory>
                    </artifactItem>
                    <artifactItem>
                      <groupId>${lib.groupId}</groupId>
                      <artifactId>${lib.artifactId}</artifactId>
                      <version>${lib.version}</version>
                      <classifier>sources</classifier>
                      <outputDirectory>${project.build.directory}/sources</outputDirectory>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources-and-javadoc</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <descriptors>
                    <descriptor>sources.xml</descriptor>
                    <descriptor>javadoc.xml</descriptor>
                  </descriptors>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
