<?xml version="1.0" encoding="UTF-8"?>
<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>sam-parent</artifactId>
    <version>8.0.1.R2023-10-RT</version>
  </parent>
  <groupId>org.talend.esb</groupId>
  <artifactId>sam-agent</artifactId>
  <version>8.0.1.R2023-10-RT</version>
  <packaging>bundle</packaging>
  <name>Talend ESB :: SAM :: Agent</name>
  <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>
  <properties>
    <revision>${sam-agent.version}</revision>
  </properties>
  <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.talend.esb</groupId>
      <artifactId>sam-common</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-frontend-jaxws</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-ws-security</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http</artifactId>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.core</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>org.osgi.compendium</artifactId>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-context</artifactId>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-test</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf.xjc-utils</groupId>
      <artifactId>cxf-xjc-runtime</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-local</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-rt-transports-http-jetty</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${project.artifactId}</Bundle-SymbolicName>
            <Export-Package>{local-packages},
                            META-INF.tesb</Export-Package>
            <Export-Service>org.talend.esb.sam.agent.feature.EventFeature</Export-Service>
            <Bundle-Activator>org.talend.esb.sam.agent.activator.AgentActivator</Bundle-Activator>
            <Import-Package>*
                            ,org.springframework.beans.factory.config
                            ,org.springframework.scheduling.annotation
                            ,org.springframework.scheduling.config
                            ,org.springframework.scheduling.concurrent</Import-Package>
            <_failok>true</_failok>
            <_nouses>true</_nouses>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-test-sources</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>wsdl2java</goal>
            </goals>
            <configuration>
              <wsdlOptions>
                <wsdlOption>
                  <wsdl>${basedir}/src/test/resources/wsdl/CustomerService.wsdl</wsdl>
                  <bindingFiles>
                    <bindingFile>${basedir}/src/test/resources/wsdl/binding.xml</bindingFile>
                  </bindingFiles>
                </wsdlOption>
              </wsdlOptions>
              <testSourceRoot>${basedir}/target/generated/src/test/java</testSourceRoot>
            </configuration>
          </execution>
        </executions>
      </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.sam.agent.cfg</file>
                  <type>cfg</type>
                  <classifier>org.talend.esb.sam.agent</classifier>
                </artifact>
                <artifact>
                  <file>etc/org.talend.esb.sam.agent.keystore.cfg</file>
                  <type>cfg</type>
                  <classifier>org.talend.esb.sam.agent.keystore</classifier>
                </artifact>
                <artifact>
                  <file>etc/org.talend.esb.sam.agent.client.ut.policy</file>
                  <type>policy</type>
                  <classifier>org.talend.esb.sam.agent.client.ut</classifier>
                </artifact>
                <artifact>
                  <file>etc/org.talend.esb.sam.agent.client.saml.policy</file>
                  <type>policy</type>
                  <classifier>org.talend.esb.sam.agent.client.saml</classifier>
                </artifact>
              </artifacts>
            </configuration>
          </execution>
        </executions>
      </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.sam.agent</scanPath>
          </scanPaths>
          <excludeArtifacts>
            <excludeArtifact>.*</excludeArtifact>
          </excludeArtifacts>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
