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

Copyright 2018 GeneXus S.A..

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.genexus.gxserver</groupId>
    <artifactId>gxserver-client</artifactId>
    <version>1.0.1</version>
    <packaging>jar</packaging>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>Java client for GeneXus Server services</description>
    <url>https://github.com/genexuslabs/gxserver-client</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
        <spotbugs.effort>Max</spotbugs.effort>
        <spotbugs.failOnError>true</spotbugs.failOnError>
        <spotbugs.threshold>Low</spotbugs.threshold>
    </properties>

    <organization>
        <name>GeneXus S.A.</name>
        <url>https://genexus.com</url>
    </organization>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://opensource.org/licenses/MIT</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <id>jlr</id>
            <name>José Lamas Ríos</name>
            <email>jlr@genexus.com</email>
            <organization>GeneXus S.A.</organization>
            <organizationUrl>https://genexus.com/</organizationUrl>
        </developer>
        <developer>
            <id>agutierrezgx</id>
            <name>Antonella Gutierrez</name>
            <organization>GeneXus S.A.</organization>
            <organizationUrl>https://genexus.com/</organizationUrl>
        </developer>
    </developers>

    <scm>
        <connection>scm:git:https://github.com/genexuslabs/gxserver-client</connection>
        <developerConnection>scm:git:git@github.com:genexuslabs/gxserver-client.git</developerConnection>
        <url>https://github.com/genexuslabs/gxserver-client</url>
      <tag>gxserver-client-1.0.1</tag>
  </scm>

    <dependencies>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.6</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.9.10.8</version>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
            <version>3.1.11</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.xws</groupId>
            <artifactId>xws-security</artifactId>
            <version>3.0</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.bind</groupId>
            <artifactId>jakarta.xml.bind-api</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>jakarta.xml.ws</groupId>
            <artifactId>jakarta.xml.ws-api</artifactId>
            <version>3.0.1</version>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.ws</groupId>
            <artifactId>jaxws-rt</artifactId>
            <version>3.0.1</version>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.org.apache.xml.internal</groupId>
            <artifactId>resolver</artifactId>
            <version>20050927</version>
        </dependency>
        <dependency>
            <groupId>javax.mail</groupId>
            <artifactId>javax.mail-api</artifactId>
            <version>1.6.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.13.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-core</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <targetPath>META-INF</targetPath>
                <directory>src</directory>
                <includes>
                    <include>jax-ws-catalog.xml</include>
                    <include>wsdl/**</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgument />
                    <showDeprecation>true</showDeprecation>
                </configuration>
                <version>3.8.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <excludePackageNames>com.genexus.server.services.*</excludePackageNames>
                </configuration>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.22.2</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jaxws-maven-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>wsimport</goal>
                        </goals>
                        <configuration>
                            <args>-XadditionalHeaders</args>
                            <wsdlFiles>
                                <wsdlFile>HelperService.svc.singlewsdl.wsdl</wsdlFile>
                            </wsdlFiles>
                            <vmArgs>
                                <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
                            </vmArgs>
                            <wsdlLocation>/META-INF/wsdl/HelperService.svc.singlewsdl.wsdl</wsdlLocation>
                            <staleFile>${project.build.directory}/jaxws/stale/HelperService.svc.singlewsdl.stale</staleFile>
                            <bindingDirectory>${basedir}/src/jaxws-bindings</bindingDirectory>
                            <bindingFiles>
                                <bindingFile>CommonHandler.xml</bindingFile>
                                <bindingFile>HelperService.svc.singlewsdl_handler.xml</bindingFile>
                            </bindingFiles>
                        </configuration>
                        <id>wsimport-generate-HelperService.svc.singlewsdl</id>
                        <phase>generate-sources</phase>
                    </execution>
                    <execution>
                        <goals>
                            <goal>wsimport</goal>
                        </goals>
                        <configuration>
                            <args>-XadditionalHeaders</args>
                            <wsdlFiles>
                                <wsdlFile>TeamWorkService2.svc.singlewsdl.wsdl</wsdlFile>
                            </wsdlFiles>
                            <vmArgs>
                                <vmArg>-Djavax.xml.accessExternalSchema=all</vmArg>
                            </vmArgs>
                            <wsdlLocation>/META-INF/wsdl/TeamWorkService2.svc.singlewsdl.wsdl</wsdlLocation>
                            <staleFile>${project.build.directory}/jaxws/stale/TeamWorkService2.svc.singlewsdl.stale</staleFile>
                            <bindingDirectory>${basedir}/src/jaxws-bindings</bindingDirectory>
                            <bindingFiles>
                                <bindingFile>CommonHandler.xml</bindingFile>
                                <bindingFile>TeamWorkService2.svc.singlewsdl_handler.xml</bindingFile>
                            </bindingFiles>
                        </configuration>
                        <id>wsimport-generate-TeamWorkService2.svc.singlewsdl</id>
                        <phase>generate-sources</phase>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.sun.xml.ws</groupId>
                        <artifactId>jaxws-tools</artifactId>
                        <version>3.0.1</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <sourceDestDir>${project.build.directory}/generated-sources/jaxws-wsimport</sourceDestDir>
                    <xnocompile>true</xnocompile>
                    <verbose>true</verbose>
                    <extension>true</extension>
                    <catalog>${basedir}/src/jax-ws-catalog.xml</catalog>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <version>4.2.3</version>
                <configuration>
                    <failOnError>${spotbugs.failOnError}</failOnError>
                </configuration>
                <executions>
                    <execution>
                        <id>spotbugs</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <phase>verify</phase>
                        <configuration>
                            <excludeFilterFile>${project.basedir}/src/spotbugs/excludesFilter.xml</excludeFilterFile>
                            <xmlOutput>true</xmlOutput>
                            <spotbugsXmlOutput>false</spotbugsXmlOutput>
                            <effort>${spotbugs.effort}</effort>
                            <threshold>${spotbugs.threshold}</threshold>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <version>2.5.3</version>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <releaseProfiles>ci-cd</releaseProfiles>
                    <goals>deploy</goals>
                </configuration>
          </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>ci-cd</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>3.2.1</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- Prevent gpg from using pinentry programs. Fixes: gpg: signing 
                                        failed: Inappropriate ioctl for device -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <repositories>
        <repository>
            <!-- Needed for com.sun.xml.wss:xws-security:3.0 pom -->
            <id>repo.jenkins-ci.org</id>
            <name>Jenkins Public Repository</name>
            <url>https://repo.jenkins-ci.org/public/</url>
            <layout>default</layout>
        </repository>
    </repositories>
</project>