<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright 2013 Red Hat Inc. and/or its affiliates and other contributors.
-
- Licensed 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">
   <parent>
      <groupId>org.switchyard</groupId>
      <artifactId>switchyard-release</artifactId>
      <version>2.0.1.redhat-620133</version>
      <relativePath>../../pom.xml</relativePath>
   </parent>
   <modelVersion>4.0.0</modelVersion>
   <artifactId>switchyard-javadocs</artifactId>
   <packaging>jar</packaging>
   <name>SwitchYard: Javadoc</name>
   <description>SwitchYard Javadoc</description>
   <properties>
       <javadoc.branding>SwitchYard Public API - ${project.version}</javadoc.branding>
   </properties>
   <dependencies>
      <dependency>
         <groupId>org.switchyard</groupId>
         <artifactId>switchyard-admin</artifactId>
      </dependency>
      <dependency>
         <groupId>org.switchyard</groupId>
         <artifactId>switchyard-api</artifactId>
      </dependency>
      <dependency>
         <groupId>org.switchyard</groupId>
         <artifactId>switchyard-remote</artifactId>
      </dependency>
      <dependency>
         <groupId>org.switchyard</groupId>
         <artifactId>switchyard-test</artifactId>
      </dependency>
      <dependency>
         <groupId>org.switchyard.components</groupId>
         <artifactId>switchyard-component-common</artifactId>
      </dependency>
      <dependency>
         <groupId>org.switchyard.components</groupId>
         <artifactId>switchyard-component-soap</artifactId>
      </dependency>
      <dependency>
         <groupId>org.switchyard.components</groupId>
         <artifactId>switchyard-component-http</artifactId>
      </dependency>
      <dependency>
         <groupId>org.switchyard.components</groupId>
         <artifactId>switchyard-component-resteasy</artifactId>
      </dependency>
      <dependency>
         <groupId>org.switchyard.components</groupId>
         <artifactId>switchyard-component-common-camel</artifactId>
      </dependency>
      <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-processor</artifactId>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
   </dependencies>
   <profiles>
      <profile>
         <id>javadoc</id>
         <activation>
            <activeByDefault>true</activeByDefault>
            <property>
               <name>javadoc</name>
            </property>
         </activation>
         <build>
            <plugins>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-dependency-plugin</artifactId>
                  <executions>
                     <execution>
                        <id>unpack-artifact-sources</id>
                        <phase>generate-resources</phase>
                        <goals>
                           <goal>unpack</goal>
                        </goals>
                        <configuration>
                           <artifactItems>
                              <artifactItem>
                                 <groupId>org.switchyard</groupId>
                                 <artifactId>switchyard-api</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <excludes>
                                    org/switchyard/APILogger.java,
                                    org/switchyard/APIMessages.java,
                              </excludes>
                              </artifactItem>
                              <artifactItem>
                                 <groupId>org.switchyard</groupId>
                                 <artifactId>switchyard-remote</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <excludes>
                                    org/switchyard/remote/RemoteLogger.java,
                                    org/switchyard/remote/RemoteMessages.java,
                                    org/switchyard/remote/RemoteRegistry.java,
                                    org/switchyard/remote/infinispan/*,
                                    org/switchyard/remote/cluster/*
                            </excludes>
                              </artifactItem>
                              <artifactItem>
                                 <groupId>org.switchyard</groupId>
                                 <artifactId>switchyard-admin</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <includes>
                                 org/switchyard/admin/mbean
                              </includes>
                              </artifactItem>
                              <artifactItem>
                                 <groupId>org.switchyard</groupId>
                                 <artifactId>switchyard-test</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <excludes>
                                   org/switchyard/test/TestLogger.java,
                                   org/switchyard/test/TestMessages.java
                                </excludes>
                              </artifactItem>
                              <artifactItem>
                                 <groupId>org.switchyard.components</groupId>
                                 <artifactId>switchyard-component-common</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <includes>
                                   org/switchyard/component/common/composer/BaseContextMapper.java,
                                   org/switchyard/component/common/composer/BaseMessageComposer.java,
                                   org/switchyard/component/common/composer/BaseRegexContextMapper.java,
                                   org/switchyard/component/common/composer/BindingData.java,
                                   org/switchyard/component/common/composer/ContextMapper.java,
                                   org/switchyard/component/common/composer/MessageComposer.java,
                                   org/switchyard/component/common/composer/RegexContextMapper.java,
                                   org/switchyard/component/common/composer/label/*
                                </includes>
                              </artifactItem>
                              <artifactItem>
                                 <groupId>org.switchyard.components</groupId>
                                 <artifactId>switchyard-component-soap</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <includes>
                                   org/switchyard/component/soap/composer/SOAPBindingData.java,
                                   org/switchyard/component/soap/composer/SOAPMessageComposer.java,
                                   org/switchyard/component/soap/composer/SOAPContextMapper.java
                                </includes>
                              </artifactItem>
                              <artifactItem>
                                 <groupId>org.switchyard.components</groupId>
                                 <artifactId>switchyard-component-http</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <includes>
                                   org/switchyard/component/http/composer/HttpBindingData.java,
                                   org/switchyard/component/http/composer/HttpMessageComposer.java,
                                   org/switchyard/component/http/composer/HttpContextMapper.java
                                </includes>
                              </artifactItem>
                              <artifactItem>
                                 <groupId>org.switchyard.components</groupId>
                                 <artifactId>switchyard-component-resteasy</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <includes>
                                   org/switchyard/component/resteasy/composer/RESTEasyBindingData.java,
                                   org/switchyard/component/resteasy/composer/RESTEasyMessageComposer.java,
                                   org/switchyard/component/resteasy/composer/RESTEasyContextMapper.java
                                </includes>
                              </artifactItem>
                              <artifactItem>
                                 <groupId>org.switchyard.components</groupId>
                                 <artifactId>switchyard-component-common-camel</artifactId>
                                 <classifier>sources</classifier>
                                 <overWrite>true</overWrite>
                                 <includes>
                                   org/switchyard/component/camel/common/composer/CamelBindingData.java,
                                   org/switchyard/component/camel/common/composer/CamelMessageComposer.java,
                                   org/switchyard/component/camel/common/composer/CamelContextMapper.java
                                </includes>
                              </artifactItem>
                           </artifactItems>
                           <outputDirectory>${project.build.directory}/java-source</outputDirectory>
                        </configuration>
                     </execution>
                     <!-- add more unpack-executions here -->
                  </executions>
               </plugin>
               <plugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-javadoc-plugin</artifactId>
                  <version>2.9.1</version>
                  <configuration>
                     <sourcepath>${project.build.directory}/java-source</sourcepath>
                     <windowtitle>${javadoc.branding}</windowtitle>
                     <doctitle>${javadoc.branding}</doctitle>
                     <header>${javadoc.branding}</header>
                     <footer>${javadoc.branding}</footer>
                  </configuration>
                  <executions>
                     <execution>
                        <goals>
                           <goal>javadoc</goal>
                        </goals>
                        <phase>process-resources</phase>
                     </execution>
                  </executions>
               </plugin>
            </plugins>
         </build>
      </profile>
   </profiles>
</project>
