Guillaume Nodet | a446ec2 | 2010-02-03 12:23:27 +0000 | [diff] [blame] | 1 | <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"> |
| 2 | <!-- |
| 3 | |
| 4 | Licensed to the Apache Software Foundation (ASF) under one or more |
| 5 | contributor license agreements. See the NOTICE file distributed with |
| 6 | this work for additional information regarding copyright ownership. |
| 7 | The ASF licenses this file to You under the Apache License, Version 2.0 |
| 8 | (the "License"); you may not use this file except in compliance with |
| 9 | the License. You may obtain a copy of the License at |
| 10 | |
| 11 | http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | |
| 13 | Unless required by applicable law or agreed to in writing, software |
| 14 | distributed under the License is distributed on an "AS IS" BASIS, |
| 15 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 16 | See the License for the specific language governing permissions and |
| 17 | limitations under the License. |
| 18 | --> |
| 19 | <modelVersion>4.0.0</modelVersion> |
| 20 | |
| 21 | <parent> |
| 22 | <groupId>org.apache.felix.karaf.tooling</groupId> |
| 23 | <artifactId>tooling</artifactId> |
Chris Custine | f6a85b3 | 2010-02-19 07:50:10 +0000 | [diff] [blame] | 24 | <version>1.5.0-SNAPSHOT</version> |
Guillaume Nodet | a446ec2 | 2010-02-03 12:23:27 +0000 | [diff] [blame] | 25 | </parent> |
| 26 | |
| 27 | <groupId>org.apache.felix.karaf.tooling</groupId> |
| 28 | <artifactId>org.apache.felix.karaf.tooling.testing</artifactId> |
| 29 | <packaging>bundle</packaging> |
Chris Custine | f6a85b3 | 2010-02-19 07:50:10 +0000 | [diff] [blame] | 30 | <version>1.5.0-SNAPSHOT</version> |
Guillaume Nodet | a446ec2 | 2010-02-03 12:23:27 +0000 | [diff] [blame] | 31 | <name>Apache Felix Karaf :: Testing environment</name> |
| 32 | |
| 33 | <description> |
| 34 | A bundle to help using Pax-Exam and Karaf. |
| 35 | </description> |
| 36 | |
| 37 | <properties> |
| 38 | <appendedResourcesDirectory>${basedir}/../../etc/appended-resources</appendedResourcesDirectory> |
| 39 | </properties> |
| 40 | |
| 41 | <dependencies> |
Guillaume Nodet | 7341aab | 2010-02-03 15:18:50 +0000 | [diff] [blame] | 42 | <!-- The assembly and all the dependencies --> |
| 43 | <dependency> |
| 44 | <groupId>org.apache.felix.karaf</groupId> |
| 45 | <artifactId>apache-felix-karaf</artifactId> |
| 46 | <type>xml</type> |
| 47 | <classifier>features</classifier> |
| 48 | </dependency> |
Guillaume Nodet | a446ec2 | 2010-02-03 12:23:27 +0000 | [diff] [blame] | 49 | <!-- Pax EXAM --> |
| 50 | <dependency> |
| 51 | <groupId>org.ops4j.pax.exam</groupId> |
| 52 | <artifactId>pax-exam</artifactId> |
| 53 | </dependency> |
| 54 | <dependency> |
| 55 | <groupId>org.ops4j.pax.exam</groupId> |
| 56 | <artifactId>pax-exam-junit</artifactId> |
| 57 | </dependency> |
| 58 | <dependency> |
| 59 | <groupId>org.ops4j.pax.exam</groupId> |
| 60 | <artifactId>pax-exam-container-default</artifactId> |
| 61 | </dependency> |
| 62 | <dependency> |
| 63 | <groupId>org.ops4j.pax.exam</groupId> |
| 64 | <artifactId>pax-exam-junit-extender-impl</artifactId> |
| 65 | </dependency> |
| 66 | <dependency> |
Guillaume Nodet | 7341aab | 2010-02-03 15:18:50 +0000 | [diff] [blame] | 67 | <groupId>org.apache.servicemix.bundles</groupId> |
| 68 | <artifactId>org.apache.servicemix.bundles.junit</artifactId> |
Guillaume Nodet | a446ec2 | 2010-02-03 12:23:27 +0000 | [diff] [blame] | 69 | </dependency> |
| 70 | </dependencies> |
| 71 | |
| 72 | <build> |
| 73 | <resources> |
| 74 | <resource> |
| 75 | <directory>${pom.basedir}/src/main/resources</directory> |
| 76 | <includes> |
| 77 | <include>**/*</include> |
| 78 | </includes> |
| 79 | </resource> |
| 80 | </resources> |
| 81 | <filters> |
| 82 | <filter>target/filter.txt</filter> |
| 83 | </filters> |
| 84 | <plugins> |
| 85 | <plugin> |
| 86 | <groupId>org.apache.maven.plugins</groupId> |
| 87 | <artifactId>maven-antrun-plugin</artifactId> |
| 88 | <executions> |
| 89 | <execution> |
| 90 | <id>create-prop</id> |
| 91 | <phase>initialize</phase> |
| 92 | <configuration> |
| 93 | <tasks> |
| 94 | <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" /> |
| 95 | <property name="ant.regexp.regexpimpl" value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" /> |
| 96 | <property name="mv" value="${project.version}" /> |
| 97 | <echo message="Maven version: ${mv}" /> |
| 98 | <propertyregex property="ov.p1" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace="\1" defaultValue="0" /> |
| 99 | <propertyregex property="ov.p2" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\2" defaultValue=".0" /> |
| 100 | <propertyregex property="ov.p3" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\3" defaultValue=".0" /> |
| 101 | <propertyregex property="ov.p4" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\4" defaultValue="" /> |
| 102 | <propertyregex property="ov.p1a" input="${ov.p1}" regexp="(.+)" replace="\1" defaultValue="0" /> |
| 103 | <propertyregex property="ov.p2a" input="${ov.p2}" regexp="(\..+)" replace="\1" defaultValue=".0" /> |
| 104 | <propertyregex property="ov.p3a" input="${ov.p3}" regexp="(\..+)" replace="\1" defaultValue=".0" /> |
| 105 | <propertyregex property="ov.p4a" input="${ov.p4}" regexp="(\..+)" replace="\1" defaultValue="" /> |
| 106 | <property name="ov" value="${ov.p1a}${ov.p2a}${ov.p3a}${ov.p4a}" /> |
| 107 | <echo message="OSGi version: ${ov}" /> |
| 108 | <mkdir dir="target" /> |
| 109 | <echo message="karaf.osgi.version = ${ov}" file="target/filter.txt" /> |
| 110 | </tasks> |
| 111 | </configuration> |
| 112 | <goals> |
| 113 | <goal>run</goal> |
| 114 | </goals> |
| 115 | </execution> |
| 116 | </executions> |
| 117 | </plugin> |
| 118 | <plugin> |
| 119 | <groupId>org.apache.maven.plugins</groupId> |
| 120 | <artifactId>maven-resources-plugin</artifactId> |
| 121 | <executions> |
| 122 | <execution> |
| 123 | <id>copy-filtered</id> |
| 124 | <!-- here the phase you need --> |
| 125 | <phase>compile</phase> |
| 126 | <goals> |
| 127 | <goal>copy-resources</goal> |
| 128 | </goals> |
| 129 | <configuration> |
| 130 | <outputDirectory>${basedir}/target/classes/</outputDirectory> |
| 131 | <resources> |
| 132 | <resource> |
| 133 | <directory>../../assembly/src/main/filtered-resources/etc</directory> |
| 134 | <filtering>true</filtering> |
| 135 | <includes> |
| 136 | <include>config.properties</include> |
| 137 | <include>startup.properties</include> |
| 138 | </includes> |
| 139 | </resource> |
| 140 | </resources> |
| 141 | </configuration> |
| 142 | </execution> |
| 143 | </executions> |
| 144 | </plugin> |
| 145 | <!-- generate dependencies versions --> |
| 146 | <plugin> |
| 147 | <groupId>org.apache.servicemix.tooling</groupId> |
| 148 | <artifactId>depends-maven-plugin</artifactId> |
| 149 | <version>1.1</version> |
| 150 | <executions> |
| 151 | <execution> |
| 152 | <id>generate-depends-file</id> |
| 153 | <goals> |
| 154 | <goal>generate-depends-file</goal> |
| 155 | </goals> |
| 156 | </execution> |
| 157 | </executions> |
| 158 | </plugin> |
| 159 | <plugin> |
| 160 | <groupId>org.apache.felix</groupId> |
| 161 | <artifactId>maven-bundle-plugin</artifactId> |
| 162 | <configuration> |
| 163 | <instructions> |
| 164 | <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName> |
| 165 | <Export-Package>org.apache.felix.karaf.testing;version=${pom.version}</Export-Package> |
| 166 | <Import-Package> |
| 167 | !org.apache.felix.karaf.testing*, |
| 168 | * |
| 169 | </Import-Package> |
| 170 | <Include-Resource> |
| 171 | {maven-resources}, |
| 172 | org/apache/felix/karaf/testing/config.properties=target/classes/config.properties, |
| 173 | org/apache/felix/karaf/testing/startup.properties=target/classes/startup.properties |
| 174 | </Include-Resource> |
| 175 | <_versionpolicy>${bnd.version.policy}</_versionpolicy> |
| 176 | </instructions> |
| 177 | </configuration> |
| 178 | </plugin> |
| 179 | </plugins> |
| 180 | </build> |
| 181 | |
| 182 | </project> |