<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements. See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership. The ASF licenses this file
  ~ to you 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.apache.ws.commons.axiom</groupId>
        <artifactId>implementations</artifactId>
        <version>1.4.0</version>
    </parent>

    <artifactId>axiom-impl</artifactId>
    <packaging>bundle</packaging>

    <name>LLOM</name>
    <description>The default implementation of the Axiom API.</description>

    <dependencies>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>om-mixins</artifactId>
            <version>${project.version}</version>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-weaver-annotations</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.woodstox</groupId>
            <artifactId>woodstox-core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-testsuite</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>testutils</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>${project.groupId}</groupId>
                <artifactId>axiom-weaver-maven-plugin</artifactId>
                <version>${project.version}</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>weave</goal>
                        </goals>
                        <configuration>
                            <weavablePackages>
                                <weavablePackage>org.apache.axiom.core.impl.mixin</weavablePackage>
                                <weavablePackage>org.apache.axiom.om.impl.mixin</weavablePackage>
                                <weavablePackage>org.apache.axiom.soap.impl.mixin</weavablePackage>
                                <weavablePackage>org.apache.axiom.om.impl.llom.mixin</weavablePackage>
                            </weavablePackages>
                            <interfaces>
                                <interface>org.apache.axiom.om.impl.intf.AxiomAttribute</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomCDATASection</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomCharacterDataNode</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomComment</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomDocType</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomDocument</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomElement</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomEntityReference</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomNamespaceDeclaration</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomProcessingInstruction</interface>
                                <interface>org.apache.axiom.om.impl.intf.AxiomSourcedElement</interface>
                                <interface>org.apache.axiom.om.impl.intf.factory.AxiomNodeFactory</interface>
                                <interface>org.apache.axiom.soap.impl.intf.AxiomSOAPMessage</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11Body</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11Envelope</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11Fault</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11FaultCode</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11FaultDetail</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11FaultReason</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11FaultRole</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11Header</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap11.AxiomSOAP11HeaderBlock</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12Body</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12Envelope</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12Fault</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12FaultCode</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12FaultDetail</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12FaultNode</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12FaultReason</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12FaultRole</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12FaultSubCode</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12FaultText</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12FaultValue</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12Header</interface>
                                <interface>org.apache.axiom.soap.impl.intf.soap12.AxiomSOAP12HeaderBlock</interface>
                            </interfaces>
                            <packageMappings>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.core</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.llom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.om.impl.intf</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.llom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.om.impl.intf.factory</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.llom.factory</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.intf</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.llom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.intf.soap11</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.llom.soap11</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.intf.soap12</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.llom.soap12</outputPackage>
                                </packageMapping>
                            </packageMappings>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <!-- Keep heap size small. We have some unit tests that deal with volumes
                         of data proportional to the heap size (to test that Axiom is streaming
                         the data instead of loading it into memory). Obviously, the execution time of
                         these tests also are proportional to the heap size. To accelerate the execution
                         of the tests, we should use a heap size as small as possible. -->
                    <argLine>${argLine} -Xms64m -Xmx64m</argLine>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Import-Package>*</Import-Package>
                        <Private-Package>
                            org.apache.axiom.core.*,
                            !org.apache.axiom.om.impl,
                            org.apache.axiom.om.impl.*,
                            org.apache.axiom.soap.impl.*,
                            org.apache.axiom.util.xml.*
                        </Private-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.veithen.phos</groupId>
                <artifactId>enforcer-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <ignore>
                                <!-- TODO: inject the reference to the singleton into mixins directly -->
                                org.apache.axiom.om.impl.llom.CoreNodeImpl -&gt; org.apache.axiom.om.impl.llom.factory.AxiomNodeFactoryImpl,
                                org.apache.axiom.om.impl.llom.CoreNodeImpl -&gt; org.apache.axiom.om.impl.llom.factory.LLOMNodeFactory
                            </ignore>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <inherited>false</inherited>
                <reportSets>
                    <reportSet>
                        <reports>
                            <report>index</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
        </plugins>
    </reporting>
</project>
