All Downloads are FREE. Search and download functionalities are using the official Maven repository.

archetype-resources.pom.xml Maven / Gradle / Ivy

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<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>${groupId}</groupId>
  <artifactId>${artifactId}</artifactId>
  <version>${version}</version>
  <packaging>bundle</packaging>
  <name>Karaf Quickstart : Camel using A-MQ</name>
  <description>ActiveMQ and Camel Example</description>

  <properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <version.compiler.plugin>2.3.1</version.compiler.plugin>
    <version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin>
    <maven.compiler.target>1.7</maven.compiler.target>
    <maven.compiler.source>1.7</maven.compiler.source>

    <!-- the version of the BOM, defining all the dependency versions -->
    <fabric8.version>2.0.36</fabric8.version>
    <!-- need to declare the Camel version as features-maven-plugin needs this property (cannot inherit from BOM in maven plugin) -->
    <activemq.version>5.11.1</activemq.version>
    <camel.version>2.15.0</camel.version>
    <karaf.version>2.4.0</karaf.version>

    <docker.from>fabric8/karaf-2.4</docker.from>
    <docker.registryPrefix>${env.DOCKER_REGISTRY}/</docker.registryPrefix>
    <docker.image>${docker.registryPrefix}fabric8/${project.artifactId}:${project.version}</docker.image>
    <docker.assemblyDescriptor>${basedir}/src/main/fabric8/assembly.xml</docker.assemblyDescriptor>
    <docker.port.container.jolokia>8778</docker.port.container.jolokia>
    <docker.port.container.http>8181</docker.port.container.http>
    <fabric8.env.AMQ_SERVICE_ID>FABRIC8MQ</fabric8.env.AMQ_SERVICE_ID>

  </properties>

  <dependencyManagement>
    <dependencies>
      <dependency>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-project</artifactId>
        <version>${fabric8.version}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>
    </dependencies>
  </dependencyManagement>

  <dependencies>
    <!--
      For this example, we will be using the OSGi Blueprint XML syntax for Apache Camel.
    -->
    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-blueprint</artifactId>
    </dependency>

    <dependency>
        <groupId>io.fabric8.mq</groupId>
        <artifactId>camel-amq</artifactId>
    </dependency>

  </dependencies>

  <build>
    <finalName>${project.artifactId}</finalName>
    <resources>
      <resource>
        <directory>src/main/resources</directory>
        <filtering>true</filtering>
      </resource>
    </resources>
    <plugins>
      <!-- Compiler plugin enforces Java 1.7 compatibility and activates annotation processors -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>${version.compiler.plugin}</version>
        <configuration>
          <source>${maven.compiler.source}</source>
          <target>${maven.compiler.target}</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${version.maven-bundle-plugin}</version>
        <extensions>true</extensions>
          <configuration>
              <instructions>
                  <Import-Package>
                      io.fabric8.mq.core,
                      io.fabric8.mq.camel,
                      org.apache.activemq.pool,
                      *
                  </Import-Package>
              </instructions>
          </configuration>
      </plugin>
        <plugin>
            <artifactId>maven-resources-plugin</artifactId>
            <executions>
                <execution>
                    <id>filter-extra-resources</id>
                    <goals>
                        <goal>copy-resources</goal>
                    </goals>
                    <phase>process-resources</phase>
                    <configuration>
                        <outputDirectory>${project.build.directory}/fabric8</outputDirectory>
                        <resources>
                            <resource>
                                <directory>src/main/fabric8</directory>
                                <filtering>true</filtering>
                            </resource>
                        </resources>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>io.fabric8</groupId>
            <artifactId>fabric8-maven-plugin</artifactId>
            <version>${fabric8.version}</version>
            <executions>
                <execution>
                    <id>json</id>
                    <goals>
                        <goal>json</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
      <plugin>
        <groupId>org.apache.karaf.tooling</groupId>
        <artifactId>features-maven-plugin</artifactId>
        <version>2.4.0</version>
        <executions>
          <execution>
            <id>add-features-to-repo</id>
            <phase>package</phase>
            <goals>
              <goal>add-features-to-repo</goal>
            </goals>
            <!-- We populate the offline repository -->
            <configuration>
              <descriptors>
                <descriptor>file://${project.build.directory}/fabric8/features.xml</descriptor>
              </descriptors>
              <repository>target/fabric8/repository/</repository>
              <addTransitiveFeatures>true</addTransitiveFeatures>
              <features>
                <feature>${project.artifactId}</feature>
              </features>
            </configuration>
          </execution>
          <execution>
            <id>create-kar</id>
            <phase>package</phase>
            <goals>
              <goal>create-kar</goal>
            </goals>
            <configuration>
              <featuresFile>${project.build.directory}/fabric8/features.xml</featuresFile>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.jolokia</groupId>
        <artifactId>docker-maven-plugin</artifactId>
        <version>${docker.maven.plugin.version}</version>
        <configuration>
          <images>
            <image>
              <name>${docker.image}</name>
              <build>
                <from>${docker.from}</from>
                <assembly>
                  <descriptor>${docker.assemblyDescriptor}</descriptor>
                  <basedir>/opt/jboss/deploy/</basedir>
                </assembly>
              </build>
            </image>
          </images>
        </configuration>
      </plugin>
    </plugins>
  </build>

   <profiles>
     <profile>
       <id>docker-build</id>
       <build>
         <plugins>
           <plugin>
             <groupId>org.jolokia</groupId>
             <artifactId>docker-maven-plugin</artifactId>
             <version>${docker.maven.plugin.version}</version>
             <executions>
               <execution>
                 <goals>
                   <goal>build</goal>
                 </goals>
                 <phase>package</phase>
               </execution>
             </executions>
           </plugin>
         </plugins>
       </build>
     </profile>
     <profile>
       <id>docker-push</id>
       <build>
         <plugins>
           <plugin>
             <groupId>org.jolokia</groupId>
             <artifactId>docker-maven-plugin</artifactId>
             <version>${docker.maven.plugin.version}</version>
             <executions>
               <execution>
                 <goals>
                   <goal>build</goal>
                   <goal>push</goal>
                 </goals>
                 <phase>package</phase>
               </execution>
             </executions>
           </plugin>
         </plugins>
       </build>
     </profile>
    <profile>
      <id>jube</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.fabric8.jube</groupId>
            <artifactId>jube-maven-plugin</artifactId>
            <version>${jube.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>build</goal>
                </goals>
                <phase>package</phase>
              </execution>
            </executions>

            <!-- TODO it'd be nice for the jube plugin to automatically download this dependency -->
            <dependencies>
              <dependency>
                <groupId>io.fabric8.jube.images.fabric8</groupId>
                <artifactId>karaf-2.4</artifactId>
                <version>${jube.version}</version>
                <classifier>image</classifier>
                <type>zip</type>
              </dependency>
            </dependencies>
            <configuration>
              <exportDir>/</exportDir>
              <assemblyDescriptor>${project.build.directory}/fabric8/assembly.xml</assemblyDescriptor>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>fabric8-snapshot</id>
      <properties>
        <fabric8.version>2.2-SNAPSHOT</fabric8.version>
      </properties>
    </profile>
  </profiles>

</project>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy