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

    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 xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://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.apache.camel</groupId>
    <artifactId>components</artifactId>
    <version>3.0.0</version>
  </parent>
  <groupId>org.apache.camel</groupId>
  <artifactId>camel-blueprint</artifactId>
  <version>3.0.0</version>
  <name>Camel :: Blueprint</name>
  <description>Using Camel with OSGi Blueprint</description>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <properties>
    <firstVersion>2.4.0</firstVersion>
    <label>java,osgi</label>
  </properties>
  <dependencies>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core-engine</artifactId>
      <version>3.0.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core-xml</artifactId>
      <version>3.0.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-core-osgi</artifactId>
      <version>3.0.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-bean</artifactId>
      <version>3.0.0</version>
      <scope>compile</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi.core</artifactId>
      <version>6.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.osgi</groupId>
      <artifactId>osgi.cmpn</artifactId>
      <version>6.0.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.aries.blueprint</groupId>
      <artifactId>org.apache.aries.blueprint.core</artifactId>
      <version>1.10.0</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.aries</groupId>
      <artifactId>org.apache.aries.util</artifactId>
      <version>1.1.3</version>
      <scope>provided</scope>
    </dependency>
    <dependency>
      <groupId>org.apache.karaf.bundle</groupId>
      <artifactId>org.apache.karaf.bundle.core</artifactId>
      <version>4.2.7</version>
      <scope>provided</scope>
      <optional>true</optional>
    </dependency>
  </dependencies>
  <build>
    <resources>
      <resource>
        <directory>target/schema</directory>
        <includes>
          <include>**/*</include>
        </includes>
        <excludes>
          <exclude>**/*.class</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
      </resource>
    </resources>
    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <configuration>
            <artifactItems>
              <artifactItem>
                <groupId>org.apache.camel</groupId>
                <artifactId>camel-blueprint</artifactId>
                <version>${project.version}</version>
                <type>jar</type>
                <overWrite>false</overWrite>
                <outputDirectory>${project.build.directory}/schema</outputDirectory>
                <includes>camel-blueprint.xsd</includes>
              </artifactItem>
            </artifactItems>
          </configuration>
        </plugin>
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>${lifecycle-mapping-version}</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <versionRange>${maven-antrun-plugin-version}</versionRange>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>
              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-package-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>jaxb-list</id>
            <phase>process-classes</phase>
            <goals>
              <goal>generate-jaxb-list</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <executions>
          <execution>
            <id>copy-generated-resources-jaxb</id>
            <phase>process-classes</phase>
            <goals>
              <goal>resources</goal>
            </goals>
            <configuration>
              <resources>
                <resource>
                  <directory>${basedir}/target/generated/camel/jaxb</directory>
                </resource>
              </resources>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-eip-documentation-enricher-maven-plugin</artifactId>
        <version>${project.version}</version>
        <executions>
          <execution>
            <id>eip-documentation-enricher</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>eip-documentation-enricher</goal>
            </goals>
            <configuration>
              <inputCamelSchemaFile>${project.build.directory}/schema/schema1.xsd</inputCamelSchemaFile>
              <outputCamelSchemaFile>${project.build.directory}/schema/camel-blueprint.xsd</outputCamelSchemaFile>
              <deleteFilesAfterRun>${project.build.directory}/schema/schema1.xsd,${project.build.directory}/schema/schema2.xsd</deleteFilesAfterRun>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <executions>
          <execution>
            <id>bundle-manifest</id>
            <phase>prepare-package</phase>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>jaxb2-maven-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-schema</id>
            <phase>generate-test-sources</phase>
            <goals>
              <goal>schemagen</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <outputDirectory>${project.build.directory}/schema</outputDirectory>
          <sources>
            <source>${project.build.directory}/schema-src</source>
          </sources>
          <createJavaDocAnnotations>false</createJavaDocAnnotations>
          <schemaSourceExcludeFilters>
            <filter implementation="org.codehaus.mojo.jaxb2.shared.filters.pattern.PatternFileFilter">
              <patterns>
                <pattern>Helper.java</pattern>
                <pattern>Adapter.java</pattern>
              </patterns>
            </filter>
          </schemaSourceExcludeFilters>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
