blob: 49fd8b7d514ce473bffb51d631e4a9cc85c50ea3 [file] [log] [blame]
Guillaume Nodet916f28a2009-09-22 09:11:12 +00001<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">
Guillaume Nodet91fab3b2009-04-27 10:01:58 +00002
3 <!--
4
5 Licensed to the Apache Software Foundation (ASF) under one or more
6 contributor license agreements. See the NOTICE file distributed with
7 this work for additional information regarding copyright ownership.
8 The ASF licenses this file to You under the Apache License, Version 2.0
9 (the "License"); you may not use this file except in compliance with
10 the License. You may obtain a copy of the License at
11
12 http://www.apache.org/licenses/LICENSE-2.0
13
14 Unless required by applicable law or agreed to in writing, software
15 distributed under the License is distributed on an "AS IS" BASIS,
16 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17 See the License for the specific language governing permissions and
18 limitations under the License.
19 -->
20
21 <modelVersion>4.0.0</modelVersion>
22
23 <parent>
Guillaume Nodet91a52c02009-09-18 20:14:54 +000024 <groupId>org.apache.felix.karaf.shell</groupId>
25 <artifactId>shell</artifactId>
Guillaume Nodet916f28a2009-09-22 09:11:12 +000026 <version>1.0.0</version>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000027 </parent>
28
Guillaume Nodet91a52c02009-09-18 20:14:54 +000029 <groupId>org.apache.felix.karaf.shell</groupId>
30 <artifactId>org.apache.felix.karaf.shell.admin</artifactId>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000031 <packaging>bundle</packaging>
Guillaume Nodet916f28a2009-09-22 09:11:12 +000032 <version>1.0.0</version>
Guillaume Nodet91a52c02009-09-18 20:14:54 +000033 <name>Apache Felix Karaf :: Shell Admin</name>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000034
35 <description>
36 Provides administration commands
37 </description>
38
Guillaume Nodetc0d97722009-09-18 20:25:06 +000039 <properties>
40 <appendedResourcesDirectory>${basedir}/../../etc/appended-resources</appendedResourcesDirectory>
41 </properties>
42
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000043 <dependencies>
44 <dependency>
Guillaume Nodet91a52c02009-09-18 20:14:54 +000045 <groupId>org.apache.felix.karaf.shell</groupId>
46 <artifactId>org.apache.felix.karaf.shell.console</artifactId>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000047 </dependency>
48
49 <dependency>
50 <groupId>org.apache.felix</groupId>
51 <artifactId>org.osgi.core</artifactId>
52 <scope>provided</scope>
53 </dependency>
54
55 <dependency>
56 <groupId>org.apache.felix</groupId>
57 <artifactId>org.osgi.compendium</artifactId>
58 <scope>provided</scope>
59 </dependency>
60
61 <dependency>
Guillaume Nodet5cd03792009-09-08 18:37:13 +000062 <groupId>org.ops4j.pax.logging</groupId>
63 <artifactId>pax-logging-api</artifactId>
64 <scope>test</scope>
65 </dependency>
66
67 <dependency>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000068 <groupId>org.apache.servicemix.bundles</groupId>
69 <artifactId>org.apache.servicemix.bundles.junit</artifactId>
70 <scope>test</scope>
71 </dependency>
Guillaume Nodet5cd03792009-09-08 18:37:13 +000072
73 <dependency>
74 <groupId>org.easymock</groupId>
75 <artifactId>easymockclassextension</artifactId>
76 <version>${easymock.version}</version>
77 <scope>test</scope>
78 </dependency>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000079 </dependencies>
80
81 <build>
82 <resources>
83 <resource>
84 <directory>${pom.basedir}/src/main/resources</directory>
85 <includes>
86 <include>**/*</include>
87 </includes>
88 </resource>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +000089 <!--
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000090 <resource>
91 <directory>${pom.basedir}/src/main/filtered-resources</directory>
92 <filtering>true</filtering>
93 <includes>
94 <include>**/*</include>
95 </includes>
96 </resource>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +000097 -->
Guillaume Nodet91fab3b2009-04-27 10:01:58 +000098 </resources>
Guillaume Nodetd9936152009-09-08 09:32:55 +000099 <filters>
100 <filter>target/filter.txt</filter>
101 </filters>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000102 <plugins>
103 <plugin>
104 <groupId>org.apache.maven.plugins</groupId>
Guillaume Nodetd9936152009-09-08 09:32:55 +0000105 <artifactId>maven-antrun-plugin</artifactId>
Guillaume Nodetd9936152009-09-08 09:32:55 +0000106 <executions>
107 <execution>
108 <id>create-prop</id>
109 <phase>initialize</phase>
110 <configuration>
111 <tasks>
Guillaume Nodet916f28a2009-09-22 09:11:12 +0000112 <taskdef resource="net/sf/antcontrib/antcontrib.properties" classpathref="maven.plugin.classpath" />
113 <property name="ant.regexp.regexpimpl" value="org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp" />
114 <property name="mv" value="${project.version}" />
115 <echo message="Maven version: ${mv}" />
116 <propertyregex property="ov.p1" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace="\1" defaultValue="0" />
117 <propertyregex property="ov.p2" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\2" defaultValue=".0" />
118 <propertyregex property="ov.p3" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\3" defaultValue=".0" />
119 <propertyregex property="ov.p4" input="${mv}" regexp="(\d+)(?:\.(\d+)(?:\.(\d+))?)?(?:[^a-zA-Z0-9](.*))?" replace=".\4" defaultValue="" />
120 <propertyregex property="ov.p1a" input="${ov.p1}" regexp="(.+)" replace="\1" defaultValue="0" />
121 <propertyregex property="ov.p2a" input="${ov.p2}" regexp="(\..+)" replace="\1" defaultValue=".0" />
122 <propertyregex property="ov.p3a" input="${ov.p3}" regexp="(\..+)" replace="\1" defaultValue=".0" />
123 <propertyregex property="ov.p4a" input="${ov.p4}" regexp="(\..+)" replace="\1" defaultValue="" />
124 <property name="ov" value="${ov.p1a}${ov.p2a}${ov.p3a}${ov.p4a}" />
125 <echo message="OSGi version: ${ov}" />
126 <mkdir dir="target" />
127 <echo message="karaf.osgi.version = ${ov}" file="target/filter.txt" />
Guillaume Nodetd9936152009-09-08 09:32:55 +0000128 </tasks>
129 </configuration>
130 <goals>
131 <goal>run</goal>
132 </goals>
133 </execution>
134 </executions>
Guillaume Nodetd9936152009-09-08 09:32:55 +0000135 </plugin>
136 <plugin>
137 <groupId>org.apache.maven.plugins</groupId>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000138 <artifactId>maven-resources-plugin</artifactId>
139 <executions>
140 <execution>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +0000141 <id>copy-config-properties</id>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000142 <!-- here the phase you need -->
143 <phase>compile</phase>
144 <goals>
145 <goal>copy-resources</goal>
146 </goals>
147 <configuration>
Guillaume Nodet91a52c02009-09-18 20:14:54 +0000148 <outputDirectory>${basedir}/target/classes/org/apache/felix/karaf/shell/admin/etc</outputDirectory>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +0000149 <resources>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000150 <resource>
Guillaume Nodet077bac52009-07-09 08:29:14 +0000151 <directory>../../assembly/src/main/distribution/text/etc/</directory>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000152 <includes>
Guillaume Nodet077bac52009-07-09 08:29:14 +0000153 <include>*.properties</include>
154 <include>*.cfg</include>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000155 </includes>
Guillaume Nodet077bac52009-07-09 08:29:14 +0000156 <excludes>
157 <exclude>org.apache.felix.karaf.shell.cfg</exclude>
158 <exclude>org.ops4j.pax.url.mvn.cfg</exclude>
159 <exclude>system.properties</exclude>
160 </excludes>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000161 </resource>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +0000162 </resources>
163 </configuration>
164 </execution>
165 <execution>
166 <id>copy-filtered</id>
167 <!-- here the phase you need -->
168 <phase>compile</phase>
169 <goals>
170 <goal>copy-resources</goal>
171 </goals>
172 <configuration>
Guillaume Nodet91a52c02009-09-18 20:14:54 +0000173 <outputDirectory>${basedir}/target/classes/org/apache/felix/karaf/shell/admin/etc</outputDirectory>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +0000174 <resources>
175 <resource>
Guillaume Nodet077bac52009-07-09 08:29:14 +0000176 <directory>../../assembly/src/main/filtered-resources/etc</directory>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +0000177 <filtering>true</filtering>
178 <includes>
Guillaume Nodet077bac52009-07-09 08:29:14 +0000179 <include>*.properties</include>
180 <include>*.cfg</include>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +0000181 </includes>
182 </resource>
183 </resources>
184 </configuration>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000185 </execution>
186 </executions>
187 </plugin>
188 <plugin>
189 <groupId>org.codehaus.mojo</groupId>
190 <artifactId>exec-maven-plugin</artifactId>
191 <configuration>
192 <mainClass>Main</mainClass>
193 </configuration>
194 </plugin>
195 <plugin>
196 <groupId>org.apache.felix</groupId>
197 <artifactId>maven-bundle-plugin</artifactId>
198 <configuration>
199 <instructions>
200 <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +0000201 <Export-Package>${pom.artifactId}*;version=${project.version}</Export-Package>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000202 <Import-Package>
Guillaume Nodetc0d97722009-09-18 20:25:06 +0000203 !${pom.artifactId}*,
Guillaume Nodet077bac52009-07-09 08:29:14 +0000204 org.osgi.service.command,
205 org.apache.felix.gogo.commands,
Guillaume Nodet91a52c02009-09-18 20:14:54 +0000206 org.apache.felix.karaf.shell.console,
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000207 *
208 </Import-Package>
Guillaume Nodet4713c732009-05-04 07:02:13 +0000209 <Private-Package>org.apache.felix.karaf.jpm.*</Private-Package>
Guillaume Nodet3e9a4282009-05-04 16:30:02 +0000210 <_versionpolicy>${bnd.version.policy}</_versionpolicy>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000211 </instructions>
212 </configuration>
213 </plugin>
Gert Vanthienenc3f669d2009-06-16 11:58:10 +0000214 <plugin>
215 <groupId>org.apache.maven.plugins</groupId>
216 <artifactId>maven-surefire-plugin</artifactId>
217 <configuration>
218 <excludes>
219 <!-- this is not a unit test but an application used for testing -->
220 <exclude>**/MainTest.java</exclude>
221 </excludes>
222 </configuration>
223 </plugin>
Guillaume Nodet91fab3b2009-04-27 10:01:58 +0000224 </plugins>
225 </build>
226</project>