<?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-dom</artifactId>
    <packaging>bundle</packaging>

    <name>DOOM</name>
    <description>An implementation of the Axiom API that also implements DOM.</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>dom-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>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>commons-logging</groupId>
            <artifactId>commons-logging</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>axiom-testsuite</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>dom-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.dom.impl.mixin</weavablePackage>
                                <weavablePackage>org.apache.axiom.om.impl.dom.mixin</weavablePackage>
                            </weavablePackages>
                            <interfaces>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMCDATASection</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMComment</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMDocument</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMDocumentFragment</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMDocumentType</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMEntityReference</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMNamespaceDeclaration</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMNSAwareAttribute</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMNSAwareElement</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMNSUnawareAttribute</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMNSUnawareElement</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMProcessingInstruction</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMSourcedElement</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.DOOMText</interface>
                                <interface>org.apache.axiom.om.impl.dom.intf.factory.DOOMNodeFactory</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.DOOMSOAPMessage</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11Body</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11Envelope</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11Fault</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11FaultCode</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11FaultDetail</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11FaultReason</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11FaultRole</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11Header</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap11.DOOMSOAP11HeaderBlock</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12Body</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12Envelope</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12Fault</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12FaultCode</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12FaultDetail</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12FaultNode</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12FaultReason</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12FaultRole</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12FaultSubCode</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12FaultText</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12FaultValue</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12Header</interface>
                                <interface>org.apache.axiom.soap.impl.dom.intf.soap12.DOOMSOAP12HeaderBlock</interface>
                            </interfaces>
                            <packageMappings>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.core</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.dom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.om.impl.intf</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.dom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.om.impl.intf.factory</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.dom.factory</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.intf</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.dom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.intf.soap11</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.dom.soap11</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.intf.soap12</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.dom.soap12</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.dom</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.dom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.om.impl.dom.intf</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.dom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.om.impl.dom.intf.factory</interfacePackage>
                                    <outputPackage>org.apache.axiom.om.impl.dom.factory</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.dom.intf</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.dom</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.dom.intf.soap11</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.dom.soap11</outputPackage>
                                </packageMapping>
                                <packageMapping>
                                    <interfacePackage>org.apache.axiom.soap.impl.dom.intf.soap12</interfacePackage>
                                    <outputPackage>org.apache.axiom.soap.impl.dom.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.dom.*,
                            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.dom.CoreNodeImpl -&gt; org.apache.axiom.om.impl.dom.factory.DOOMNodeFactory,
                                org.apache.axiom.om.impl.dom.CoreNodeImpl -&gt; org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl,
                                org.apache.axiom.om.impl.dom.DOOMNSAwareElementImpl -&gt; org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl,
                                org.apache.axiom.om.impl.dom.CoreChildNodeImpl -&gt; org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl,
                                org.apache.axiom.om.impl.dom.AxiomCoreParentNodeImpl -&gt; org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl,
                                org.apache.axiom.om.impl.dom.DOOMNSAwareAttributeImpl -&gt; org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl,
                                org.apache.axiom.om.impl.dom.DOOMNamespaceDeclarationImpl -&gt; org.apache.axiom.om.impl.dom.factory.DOOMNodeFactoryImpl
                            </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>
