<?xml version="1.0" encoding="UTF-8"?>
<!--

 Copyright (c) 2006-2021 Talend Inc. - www.talend.com
 All rights reserved.

 This program and the accompanying materials are made available
 under the terms of the Apache License v2.0
 which accompanies this distribution, and is available at
 http://www.apache.org/licenses/LICENSE-2.0

 -->
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>org.talend.esb</groupId>
    <artifactId>bom</artifactId>
    <version>8.0.1.R2023-10-RT</version>
    <relativePath>../bom</relativePath>
  </parent>
  <groupId>org.talend.esb</groupId>
  <artifactId>locator</artifactId>
  <version>8.0.1.R2023-10-RT</version>
  <packaging>bundle</packaging>
  <name>Talend ESB :: Locator</name>
  <description>Service Locator Client for CXF</description>
  <licenses>
    <license>
      <name>Apache Software License - Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
      <comments>A business-friendly OSS license</comments>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>org.ops4j.pax.cdi</groupId>
      <artifactId>pax-cdi-api</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>javax.inject</groupId>
      <artifactId>javax.inject</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>spring-aop</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-core</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-expression</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-asm</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
      </exclusions>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.zookeeper</groupId>
      <artifactId>zookeeper</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>jline</artifactId>
          <groupId>jline</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-handler</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>netty-transport-native-epoll</artifactId>
          <groupId>io.netty</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spotbugs-annotations</artifactId>
          <groupId>com.github.spotbugs</groupId>
        </exclusion>
        <exclusion>
          <artifactId>log4j</artifactId>
          <groupId>log4j</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>ch.qos.reload4j</groupId>
      <artifactId>reload4j</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-features-clustering</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-policy</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-cxf-soap</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>jaxb-core</artifactId>
          <groupId>com.sun.xml.bind</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jaxb-impl</artifactId>
          <groupId>com.sun.xml.bind</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-rt-bindings-soap</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>camel-cxf-transport</artifactId>
          <groupId>org.apache.camel</groupId>
        </exclusion>
        <exclusion>
          <artifactId>camel-http-common</artifactId>
          <groupId>org.apache.camel</groupId>
        </exclusion>
        <exclusion>
          <artifactId>camel-spring</artifactId>
          <groupId>org.apache.camel</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-core</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-rt-transports-http</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javax.annotation-api</artifactId>
          <groupId>javax.annotation</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javax.ws.rs-api</artifactId>
          <groupId>javax.ws.rs</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-rt-frontend-jaxws</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-rt-rs-client</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javax.servlet-api</artifactId>
          <groupId>javax.servlet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-beans</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-context</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-core</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-cxf-rest</artifactId>
      <exclusions>
        <exclusion>
          <artifactId>jaxb-core</artifactId>
          <groupId>com.sun.xml.bind</groupId>
        </exclusion>
        <exclusion>
          <artifactId>jaxb-impl</artifactId>
          <groupId>com.sun.xml.bind</groupId>
        </exclusion>
        <exclusion>
          <artifactId>slf4j-api</artifactId>
          <groupId>org.slf4j</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-rt-bindings-soap</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>camel-cxf-transport</artifactId>
          <groupId>org.apache.camel</groupId>
        </exclusion>
        <exclusion>
          <artifactId>camel-http-common</artifactId>
          <groupId>org.apache.camel</groupId>
        </exclusion>
        <exclusion>
          <artifactId>camel-spring</artifactId>
          <groupId>org.apache.camel</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-core</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-rt-transports-http</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javax.annotation-api</artifactId>
          <groupId>javax.annotation</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javax.ws.rs-api</artifactId>
          <groupId>javax.ws.rs</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-rt-frontend-jaxws</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>cxf-rt-rs-client</artifactId>
          <groupId>org.apache.cxf</groupId>
        </exclusion>
        <exclusion>
          <artifactId>javax.servlet-api</artifactId>
          <groupId>javax.servlet</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-beans</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-context</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
        <exclusion>
          <artifactId>spring-core</artifactId>
          <groupId>org.springframework</groupId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-rs-client</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.easymock</groupId>
      <artifactId>easymock</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-core</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.hamcrest</groupId>
      <artifactId>hamcrest-library</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>javax.servlet</groupId>
      <artifactId>javax.servlet-api</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
      </plugin>
      <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-xjc-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <goals>
              <goal>xsdtojava</goal>
            </goals>
            <configuration>
              <xsdOptions>
                <xsdOption>
                  <xsd>${basedir}/src/main/resources/schemas/locator-endpoint.xsd</xsd>
                  <bindingFile>${basedir}/src/main/resources/schemas/locator-endpoint.xjb</bindingFile>
                  <catalog>${basedir}/src/main/build-resources/catalog.cat</catalog>
                  <extensionArgs>
                    <arg>-encoding</arg>
                    <arg>UTF-8</arg>
                  </extensionArgs>
                </xsdOption>
                <xsdOption>
                  <xsd>${basedir}/src/main/resources/schemas/ws-addr.xsd</xsd>
                  <bindingFile>${basedir}/src/main/resources/schemas/ws-addr.xjb</bindingFile>
                  <extensionArgs>
                    <arg>-encoding</arg>
                    <arg>UTF-8</arg>
                  </extensionArgs>
                </xsdOption>
              </xsdOptions>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <obrRepository>NONE</obrRepository>
          <instructions>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Export-Package>org.talend.esb.servicelocator.*;version="${project.version}",
                            '=META-INF.tesb.locator'</Export-Package>
            <Export-Service>org.talend.esb.servicelocator.client.ServiceLocator,
                            org.talend.esb.servicelocator.client.ExpiredEndpointCollector,
                            org.talend.esb.servicelocator.cxf.LocatorFeature</Export-Service>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.aries.blueprint</groupId>
        <artifactId>blueprint-maven-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>blueprint-generate</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <scanPaths>
            <scanPath>org.talend.esb.servicelocator</scanPath>
          </scanPaths>
          <excludeArtifacts>
            <excludeArtifact>.*</excludeArtifact>
          </excludeArtifacts>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>build-helper-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>attach-artifacts</id>
            <phase>package</phase>
            <goals>
              <goal>attach-artifact</goal>
            </goals>
            <configuration>
              <artifacts>
                <artifact>
                  <file>etc/org.talend.esb.locator.cfg</file>
                  <type>cfg</type>
                  <classifier>org.talend.esb.locator</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
</project>
