<?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>commons-httpclient</artifactId>
  <version>3.1.0</version>
  <packaging>bundle</packaging>

  <name>Apache Commons HTTP Client (OSGi bundle)</name>
  <description>An OSGi bundle for commons-httpclient ${project.version}</description>
  <url>http://jakarta.apache.org/httpcomponents/httpclient-3.x/</url>
  <organization>
    <name>Apache Software Foundation</name>
    <url>http://jakarta.apache.org/</url>
  </organization>
  <licenses>
    <license>
      <name>Apache License</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
    </license>
  </licenses>

  <dependencies>
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
      <version>3.1</version>
    </dependency>
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <unpackBundle>true</unpackBundle>
          <instructions>
            <Bundle-SymbolicName>org.apache.commons.httpclient</Bundle-SymbolicName>
            <Export-Package>org.apache.commons.httpclient.*;-split-package:=merge-first</Export-Package>
            <Import-Package>javax.*;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-dependency-plugin</artifactId>
            <executions>
              <execution>
                <id>unpack-sources</id>
                <goals>
                  <goal>unpack</goal>
                </goals>
                <configuration>
                  <outputDirectory>${project.build.directory}/sources</outputDirectory>
                  <artifactItems>
                    <artifactItem>
                      <groupId>commons-httpclient</groupId>
                      <artifactId>commons-httpclient</artifactId>
                      <version>3.1</version>
                      <classifier>sources</classifier>
                    </artifactItem>
                  </artifactItems>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <descriptors>
                    <descriptor>sources.xml</descriptor>
                  </descriptors>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
                <configuration>
                  <attach>true</attach>
                  <includeDependencySources>true</includeDependencySources>
                  <dependencySourceIncludes>
                    <dependencySourceInclude>commons-httpclient:commons-httpclient</dependencySourceInclude>
                  </dependencySourceIncludes>
                  <encoding>ISO-8859-1</encoding>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>


  <scm>
    <tag>commons-httpclient-3.1.0</tag>
  </scm>
</project>
