<?xml version="1.0" encoding="UTF-8"?>
<!--
 ~ Copyright (c) WSO2 Inc. (http://wso2.com) All Rights Reserved.
 ~
 ~ Licensed under the Apache License, Version 2.0 (the "License");
 ~ you may not use this file except in compliance with the License.
 ~ You may obtain a copy of the License at
 ~
 ~      http://www.apache.org/licenses/LICENSE-2.0
 ~
 ~ Unless required by applicable law or agreed to in writing, software
 ~ distributed under the License is distributed on an "AS IS" BASIS,
 ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 ~ See the License for the specific language governing permissions and
 ~ limitations under the License.
-->

<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.wso2.carbon.analytics</groupId>
        <artifactId>org.wso2.carbon.analytics.parent</artifactId>
        <version>2.0.298</version>
        <relativePath>../../pom.xml</relativePath>
    </parent>

    <artifactId>org.wso2.carbon.editor.log.appender</artifactId>
    <name>WSO2 Carbon - Editor Log Appender</name>
    <packaging>bundle</packaging>
    <url>http://wso2.com</url>

    <dependencies>
        <dependency>
            <groupId>org.ops4j.pax.logging</groupId>
            <artifactId>pax-logging-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.ops4j.pax.logging</groupId>
            <artifactId>pax-logging-log4j2</artifactId>
        </dependency>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
        </dependency>
        <dependency>
            <groupId>org.wso2.orbit.org.owasp.encoder</groupId>
            <artifactId>encoder</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-scr-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>3.0.1</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
                        <Bundle-Name>${project.artifactId}</Bundle-Name>
                        <Fragment-Host>org.ops4j.pax.logging.pax-logging-log4j2</Fragment-Host>
                        <Export-Package>
                            org.wso2.carbon.editor.log.appender.*
                        </Export-Package>
                        <DynamicImport-Package>*</DynamicImport-Package>
                        <Import-Package>
                            !org.wso2.carbon.editor.log.appender.*
                        </Import-Package>
                        <Include-Resource>${project.build.directory}/classes/</Include-Resource>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <id>log4j-plugin-processor</id>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                        <phase>process-classes</phase>
                        <configuration>
                            <proc>only</proc>
                            <annotationProcessors>
                                <annotationProcessor>
                                    org.apache.logging.log4j.core.config.plugins.processor.PluginProcessor
                                </annotationProcessor>
                            </annotationProcessors>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>3.0.0</version>
                <executions>
                    <execution>
                        <id>parse-version</id>
                        <goals>
                            <goal>parse-version</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>launch.properties</include>
                </includes>
                <targetPath>resources</targetPath>
            </resource>
        </resources>
    </build>
    <properties>
        <log.appender.launch.property.entry>
            file\:plugins/${project.artifactId}_${parsedVersion.osgiVersion}.jar@1\:false
        </log.appender.launch.property.entry>
    </properties>
</project>
