archetype-resources.pom.xml.versionsBackup Maven / Gradle / Ivy
<!-- Copyright 2005-2015 Red Hat, Inc. Red Hat 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> <parent> <groupId>io.fabric8.quickstarts</groupId> <artifactId>karaf</artifactId> <version>2.2.95-SNAPSHOT</version> </parent> <artifactId>karaf-camel-amq</artifactId> <version>2.2.95-SNAPSHOT</version> <packaging>bundle</packaging> <name>Fabric8 :: Quickstarts :: Karaf :: Camel and ActiveMQ</name> <description>Camel route using ActiveMQ in Karaf container</description> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <version.maven-bundle-plugin>2.3.7</version.maven-bundle-plugin> <!-- fabric8 version --> <fabric8.version>2.2.88</fabric8.version> <docker.maven.plugin.version>0.13.8</docker.maven.plugin.version> <!-- configure the versions you want to use here --> <activemq.version>5.12.1</activemq.version> <camel.version>2.16.1</camel.version> <karaf.version>2.4.3</karaf.version> <karaf.plugin.version>4.0.3</karaf.plugin.version> <docker.from>fabric8/s2i-karaf:1.2</docker.from> <fabric8.dockerUser>fabric8/</fabric8.dockerUser> <docker.image>${fabric8.dockerUser}${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.FABRIC8MQ_SERVICE_NAME>FABRIC8MQ</fabric8.env.FABRIC8MQ_SERVICE_NAME> <fabric8.label.component>${project.artifactId}</fabric8.label.component> <fabric8.label.container>karaf</fabric8.label.container> <fabric8.label.group>quickstarts</fabric8.label.group> <fabric8.iconRef>camel</fabric8.iconRef> </properties> <dependencyManagement> <dependencies> <!-- import fabric8 platfrom bom first --> <dependency> <groupId>io.fabric8</groupId> <artifactId>fabric8-project-bom-with-platform-deps</artifactId> <version>${fabric8.version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-parent</artifactId> <version>${camel.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- camel --> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-blueprint</artifactId> <scope>provided</scope> </dependency> <!-- Karaf microcontainer dependencies --> <dependency> <!-- scope is compile so all features (there is only one) are installed into startup.properties, and the feature repo itself is not added in etc/org.apache.karaf.features.cfg file --> <groupId>org.apache.karaf.features</groupId> <artifactId>static</artifactId> <version>${karaf.plugin.version}</version> <type>kar</type> <!-- no need to download kar dependencies --> <exclusions> <exclusion> <groupId>*</groupId> <artifactId>*</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.apache.karaf.assemblies.features</groupId> <artifactId>standard</artifactId> <version>${karaf.version}</version> <classifier>features</classifier> <type>xml</type> </dependency> <dependency> <groupId>org.apache.karaf.assemblies.features</groupId> <artifactId>spring</artifactId> <version>${karaf.version}</version> <classifier>features</classifier> <type>xml</type> </dependency> <dependency> <groupId>org.apache.camel.karaf</groupId> <artifactId>apache-camel</artifactId> <version>${camel.version}</version> <classifier>features</classifier> <type>xml</type> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-karaf</artifactId> <version>${activemq.version}</version> <classifier>features</classifier> <type>xml</type> </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>3.3</version> <configuration> <source>1.7</source> <target>1.7</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> <version>2.7</version> <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> <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 goals have to be executed in order --> <!-- 1. install the bundle --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-install-plugin</artifactId> <version>2.5.2</version> <executions> <execution> <id>install-bundle</id> <goals> <goal>install</goal> </goals> </execution> </executions> </plugin> <!-- 2. create karaf assembly --> <!-- karaf-maven-plugin creates custom microservice distribution --> <plugin> <groupId>org.apache.karaf.tooling</groupId> <artifactId>karaf-maven-plugin</artifactId> <version>${karaf.plugin.version}</version> <extensions>true</extensions> <executions> <execution> <id>karaf-assembly</id> <goals> <goal>assembly</goal> </goals> <phase>install</phase> </execution> <execution> <id>karaf-archive</id> <goals> <goal>archive</goal> </goals> <phase>install</phase> </execution> </executions> <configuration> <karafVersion>v4x</karafVersion> <useReferenceUrls>true</useReferenceUrls> <!-- do not include build output directory --> <includeBuildOutputDirectory>false</includeBuildOutputDirectory> <!-- no startupFeatures --> <startupFeatures> <feature>karaf-framework</feature> <feature>shell</feature> <feature>scr</feature> <feature>jaas</feature> <feature>aries-blueprint</feature> <feature>camel-blueprint</feature> <feature>camel-jms</feature> <feature>activemq-client</feature> </startupFeatures> <startupBundles> <bundle>mvn:io.fabric8.mq/camel-amq/${fabric8.version}</bundle> <bundle>mvn:io.fabric8.mq/mq-client/${fabric8.version}</bundle> <bundle>mvn:io.fabric8/fabric8-utils/${fabric8.version}</bundle> <bundle>mvn:org.apache.activemq/activemq-camel/${activemq.version}</bundle> <bundle>mvn:org.apache.activemq/activemq-osgi/${activemq.version}</bundle> <bundle>mvn:${project.groupId}/${project.artifactId}/${project.version}</bundle> </startupBundles> <blacklistedBundles> <bundle>mvn:org.ops4j.pax.logging/pax-logging-api/1.8.4</bundle> <bundle>mvn:org.ops4j.pax.logging/pax-logging-service/1.8.4</bundle> </blacklistedBundles> <libraries> <library> mvn:org.apache.karaf.jaas/org.apache.karaf.jaas.boot/${karaf.version};type:=boot;export:=true;delegate:=true </library> </libraries> </configuration> </plugin> <!-- 3. create docker image --> <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> <basedir>/deployments</basedir> <user>jboss:jboss:jboss</user> <inline xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd"> <id>${project.artifactId}</id> <files> <!-- copy karaf archive --> <file> <source>${project.build.directory}/${project.artifactId}-${project.version}.tar.gz</source> <outputDirectory>/</outputDirectory> </file> </files> </inline> </assembly> <cmd> <shell>/deployments/deploy-and-run.sh</shell> </cmd> </build> </image> </images> </configuration> </plugin> </plugins> </build> <!-- Default sample commands: mvn -Pf8-build ... build Docker images and create OpenShift deployment configs mvn -Pf8-deploy ... f8-build + push to Docker registry + applying deployment config to OpenShift mvn -Pf8-local-deploy ... deployment for a single node setup without pushing to a registry For individual goal usage please consult the fabric8 documentation --> <profiles> <profile> <id>f8-build</id> <build> <defaultGoal>clean install docker:build fabric8:json</defaultGoal> </build> </profile> <profile> <id>f8-deploy</id> <properties> <fabric8.imagePullPolicySnapshot>Always</fabric8.imagePullPolicySnapshot> <fabric8.recreate>true</fabric8.recreate> </properties> <build> <defaultGoal>clean install docker:build docker:push fabric8:json fabric8:apply</defaultGoal> </build> </profile> <profile> <id>f8-local-deploy</id> <properties> <fabric8.recreate>true</fabric8.recreate> </properties> <build> <defaultGoal>clean install docker:build fabric8:json fabric8:apply</defaultGoal> </build> </profile> </profiles> </project>
© 2015 - 2025 Weber Informatics LLC | Privacy Policy