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>jar</packaging>

  <name>Fabric8 :: Quickstarts :: Java :: Camel CDI :: HTTP</name>
  <description>Camel route using CDI in a standalone Java Container calling the remote camel-servlet quickstart</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>
    <maven.surefire.plugin.version>2.17</maven.surefire.plugin.version>

    <skipTests>false</skipTests>
    <integrationTestPattern>**/*KubernetesTest.java</integrationTestPattern>

    <!-- the version of the BOM, defining all the dependency versions -->
    <fabric8.version>2.2.34</fabric8.version>

    <!-- versions for use in mvn plugins as we cannot inherit them from a BOM -->
    <camel.version>2.15.2</camel.version>
    <docker.maven.plugin.version>0.13.3</docker.maven.plugin.version>

    <docker.from>docker.io/fabric8/java</docker.from>

    <fabric8.dockerPrefix>docker.io/</fabric8.dockerPrefix>
    <fabric8.dockerUser>fabric8/</fabric8.dockerUser>
    <docker.image>${fabric8.dockerPrefix}${fabric8.dockerUser}${project.artifactId}:${project.version}</docker.image>
    <docker.assemblyDescriptorRef>artifact-with-dependencies</docker.assemblyDescriptorRef>
    <docker.port.container.jolokia>8778</docker.port.container.jolokia>
    <docker.env.MAIN>org.apache.camel.cdi.Main</docker.env.MAIN>
 
    <fabric8.label.component>${project.artifactId}</fabric8.label.component>
    <fabric8.label.container>java</fabric8.label.container>
    <fabric8.label.group>quickstarts</fabric8.label.group>
    <fabric8.iconRef>camel</fabric8.iconRef>
  </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>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-cdi</artifactId>
    </dependency>

    <dependency>
      <groupId>org.apache.camel</groupId>
      <artifactId>camel-netty4-http</artifactId>
      <!-- TODO next release of fabric8 we can drop the version below -->
      <version>${camel.version}</version>
    </dependency>

    <!-- cdi api -->
    <dependency>
      <groupId>javax.enterprise</groupId>
      <artifactId>cdi-api</artifactId>
      <version>1.2</version>
      <scope>provided</scope>
    </dependency>

    <!-- need to use a CDI container such as JBoss Weld -->
    <!-- lets use weld for CDI -->
    <dependency>
      <groupId>org.jboss.weld.se</groupId>
      <artifactId>weld-se</artifactId>
    </dependency>
    <dependency>
      <groupId>org.jboss.weld</groupId>
      <artifactId>weld-core</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.deltaspike.cdictrl</groupId>
      <artifactId>deltaspike-cdictrl-weld</artifactId>
    </dependency>

    <dependency>
      <groupId>org.slf4j</groupId>
      <artifactId>slf4j-log4j12</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>

    <!-- testing -->
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.arquillian.junit</groupId>
      <artifactId>arquillian-junit-container</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>io.fabric8</groupId>
      <artifactId>fabric8-arquillian</artifactId>
      <scope>test</scope>
    </dependency>
    <dependency>
      <groupId>org.jboss.shrinkwrap.resolver</groupId>
      <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
      <scope>test</scope>
    </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.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven.surefire.plugin.version}</version>
        <inherited>true</inherited>
        <configuration>
          <skipTests>${skipTests}</skipTests>
          <excludes>
            <exclude>${integrationTestPattern}</exclude>
          </excludes>
        </configuration>
      </plugin>

      <plugin>
        <groupId>io.fabric8</groupId>
        <artifactId>fabric8-maven-plugin</artifactId>
        <version>${fabric8.version}</version>
        <executions>
          <execution>
            <id>json</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>json</goal>
            </goals>
          </execution>
          <execution>
            <id>attach</id>
            <phase>package</phase>
            <goals>
              <goal>attach</goal>
            </goals>
          </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>
                  <descriptorRef>${docker.assemblyDescriptorRef}</descriptorRef>
                </assembly>
                <env>
                  <MAIN>${docker.env.MAIN}</MAIN>
                </env>
              </build>
            </image>
          </images>
        </configuration>
      </plugin>

      <!-- allows the route to be ran via 'mvn exec:java' -->
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>1.2.1</version>
        <configuration>
          <mainClass>org.apache.camel.cdi.Main</mainClass>
          <includePluginDependencies>false</includePluginDependencies>
        </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>fabric8-snapshot</id>
      <properties>
        <fabric8.version>2.3-SNAPSHOT</fabric8.version>
      </properties>
    </profile>
    <profile>
      <id>ts.kube</id>
      <properties>
        <skipItests>false</skipItests>
      </properties>
    </profile>
  </profiles>

  <repositories>
    <repository>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>jboss.ea</id>
      <name>JBoss Community Early Access Release Repository</name>
      <url>http://origin-repository.jboss.org/nexus/content/groups/ea</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>jboss.ea</id>
      <name>JBoss Community Early Access Release Repository</name>
      <url>http://origin-repository.jboss.org/nexus/content/groups/ea</url>
    </pluginRepository>
  </pluginRepositories>
  
</project>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy