<?xml version="1.0"?>
<!--
  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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.apache.cxf</groupId>
    <artifactId>cxf-java2wadl-plugin</artifactId>
    <packaging>maven-plugin</packaging>
    <version>3.3.9</version>
    <name>Apache CXF Java2WADL Maven2 Plugin</name>
    <description>Apache CXF Java2WADL Maven2 Plugin</description>
    <url>https://cxf.apache.org</url>


    <parent>
      <groupId>org.apache.cxf</groupId>
      <artifactId>cxf-maven-plugins</artifactId>
      <version>3.3.9</version>
    </parent>
    <properties>
        <cxf.module.name>org.apache.cxf.plugin.java2wadl</cxf.module.name>
        <cxf.manifest.location />
    </properties>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.shared</groupId>
            <artifactId>maven-artifact-resolver</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-compat</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-artifact</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.plexus</groupId>
            <artifactId>plexus-utils</artifactId>
            <version>${cxf.plexus-utils.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-tools-common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-tools-wadlto-jaxrs</artifactId>
            <version>${project.version}</version>
        </dependency>

        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
        </dependency>

        <dependency>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>3.0.1</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-project</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-artifact-manager</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.maven</groupId>
                    <artifactId>maven-toolchain</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

    </dependencies>
    

    <profiles>
        <profile>
            <id>pre-java9</id>
            <dependencies>
                <dependency>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                    <version>1.7.0</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/../lib/tools.jar</systemPath>
                </dependency>
            </dependencies>
            <activation>
                <file>
                    <exists>${java.home}/../lib/tools.jar</exists>
                </file>
            </activation>
        </profile>

        <profile>
            <id>ibmjdk</id>
            <activation>
                <property>
                    <name>java.vendor</name>
                    <value>IBM Corporation</value>
                </property>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>xerces</groupId>
                    <artifactId>xercesImpl</artifactId>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>mac-jdk16</id>
            <activation>
                <file>
                    <exists>${java.home}/../Classes/classes.jar</exists>
                </file>
            </activation>
            <dependencies>
                <dependency>
                    <groupId>com.sun</groupId>
                    <artifactId>tools</artifactId>
                    <version>1.6.0</version>
                    <scope>system</scope>
                    <systemPath>${java.home}/../Classes/classes.jar</systemPath>
                </dependency>
            </dependencies>
        </profile>
        <profile>
            <id>setup.eclipse</id>
            <build>
                <defaultGoal>process-test-sources</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>setup.eclipse.project.wadl2java</id>
                                <phase>process-test-sources</phase>
                                <configuration>
                                    <target>
                                        <!-- The javadoc dumping capability requires com.sun classes from with rt/classes.jar -->
                                        <propertyfile file="${basedir}/.settings/org.eclipse.jdt.core.prefs">
                                            <entry key="org.eclipse.jdt.core.compiler.problem.forbiddenReference" value="ignore" />
                                        </propertyfile>
                                    </target>
                                </configuration>
                                <goals>
                                    <goal>run</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        
        <profile>
            <id>jdk13</id>
              <activation>
                  <jdk>[13,)</jdk>
              </activation>
              <build>
                  <pluginManagement>
                      <plugins>
                          <plugin>
                              <groupId>org.apache.maven.plugins</groupId>
                              <artifactId>maven-compiler-plugin</artifactId>
                              <executions>
                                  <execution>
                                    <id>default-jdk13-compile</id>
                                    <goals>
                                        <goal>compile</goal>
                                    </goals>
                                    <configuration>
                                        <forceJavacCompilerUse>true</forceJavacCompilerUse>
                                        <compileSourceRoots>
                                            <compileSourceRoot>${project.basedir}/src/main/java13</compileSourceRoot>
                                        </compileSourceRoots>
                                        <outputDirectory>${project.build.outputDirectory}/META-INF/versions/13</outputDirectory>
                                    </configuration>
                              </execution>
                          </executions>
                          <configuration>
                              <release>9</release>
                          </configuration>
                      </plugin>
                      <plugin>
                          <groupId>org.apache.maven.plugins</groupId>
                          <artifactId>maven-jar-plugin</artifactId>
                          <executions>
                              <execution>
                                  <id>default-jar</id>
                                  <configuration>
                                      <archive>
                                          <manifestEntries>
                                              <Multi-Release>true</Multi-Release>
                                          </manifestEntries>
                                      </archive>
                                  </configuration>
                              </execution>
                          </executions>
                      </plugin>
                  </plugins>
              </pluginManagement>
          </build>
        </profile>
    </profiles>
</project>
