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

  <parent>
    <groupId>org.ops4j.pax</groupId>
    <artifactId>logging</artifactId>
    <version>1.6.3</version>
  </parent>

  <groupId>org.ops4j.pax.logging</groupId>
  <artifactId>pax-logging-service</artifactId>
  <packaging>bundle</packaging>

  <name>OPS4J Pax Logging - Service</name>
  <description>Pax Logging Service is a Log4J driven service that supports Jakarta Commons Logging,
    Log4J, Avalon Logging, SLF4J and Pax Logging clients. Note that all this clients must use the Pax Logging
    Client library in the proper way. See documentation for details.
  </description>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
      </plugin>
      <plugin>
        <artifactId>maven-source-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.ops4j</groupId>
        <artifactId>maven-pax-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-dependency-plugin</artifactId>
		<executions>
          <execution>
            <id>unpack</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>log4j</groupId>
                  <artifactId>log4j</artifactId>
                </artifactItem>
              </artifactItems>
              <outputDirectory>
                ${project.build.directory}/classes
              </outputDirectory>
            </configuration>
          </execution>
        </executions>
      </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
                <execution>
                    <id>attach-sources</id>
                    <phase>process-classes</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <artifactSet>
                            <includes>
                                <include>log4j:log4j</include>
                                <include>${project.groupId}:${project.artifactId}</include>
                            </includes>
                        </artifactSet>
                        <!--
                        <filters>
                            <filter>
                                <artifact>log4j:log4j</artifact>
                                <excludes>
                                    <exclude>org/**</exclude>
                                </excludes>
                            </filter>
                        </filters>
                        -->
                        <createSourcesJar>true</createSourcesJar>
                        <promoteTransitiveDependencies>false</promoteTransitiveDependencies>
                        <createDependencyReducedPom>false</createDependencyReducedPom>
                    </configuration>
                </execution>
            </executions>
        </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
    </dependency>
    <dependency>
      <groupId>jmock</groupId>
      <artifactId>jmock</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <exclusions>
        <exclusion>
          <groupId>javax.jms</groupId>
          <artifactId>jms</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.ops4j.pax.logging</groupId>
      <artifactId>pax-logging-api</artifactId>
      <scope>provided</scope>
    </dependency>
  </dependencies>

</project>
