Index: runtime-osgi/pom.xml
===================================================================
--- runtime-osgi/pom.xml	(revision 9317)
+++ runtime-osgi/pom.xml	(working copy)
@@ -27,9 +27,27 @@
 
 	<build>
 		<plugins>
+			<plugin>
+				<artifactId>maven-antrun-plugin</artifactId>
+				<executions>
+					<execution>
+						<phase>validate</phase>
+						<configuration>
+							<tasks>
+								<mkdir dir="target/services/META-INF/services"/>
+								<ant antfile="../build.xml" target="create-service-files" dir="${basedir}" />
+							</tasks>
+						</configuration>
+						<goals>
+							<goal>run</goal>
+						</goals>
+					</execution>
+				</executions>
+			</plugin>
 			<plugin>   
 				<groupId>org.apache.felix</groupId>
 				<artifactId>maven-bundle-plugin</artifactId>
+				<version>2.0.0</version>
 				<extensions>true</extensions>
 				<configuration>
 					<instructions>
@@ -40,7 +58,11 @@
 							org.apache.*;resolution:=optional,
 							org.springframework.*;resolution:=optional,
 							*
-						</Import-Package>						
+						</Import-Package>
+						<Include-Resource>
+							{maven-resources},
+							META-INF/services=target/services/META-INF/services
+						</Include-Resource>	
 					</instructions>
 				</configuration>
 			</plugin>
Index: build.xml
===================================================================
--- build.xml	(revision 9317)
+++ build.xml	(working copy)
@@ -46,10 +46,8 @@
 			<arg line="-N clean site" />
 		</exec>
 	</target>
-
-	<target name="override-onejar-services">
-		<xmlproperty file="pom.xml" />
-
+	
+	<target name="create-service-files">
 		<antcall target="concat-service-file">
 			<param name="service" value="org.openrdf.query.algebra.evaluation.function.Function"/>
 		</antcall>
@@ -80,17 +78,21 @@
 		<antcall target="concat-service-file">
 			<param name="service" value="org.openrdf.sail.config.SailFactory"/>
 		</antcall>
+	</target>
 
+	<target name="override-onejar-services" depends="create-service-files">
+		<xmlproperty file="pom.xml" />
 		<zip destfile="target/openrdf-sesame-${project.version}-onejar.jar" update="true">
 			<fileset dir="target/services"/>
 		</zip>
 	</target>
 
 	<target name="concat-service-file">
+		<dirname property="antfile.dir" file="${ant.file}"/>
 		<echo message="META-INF/services/${service}"/>
 
 		<concat destfile="target/services/META-INF/services/${service}" fixlastline="yes">
-			<fileset dir="." includes="**/src/main/resources/META-INF/services/${service}"/>
+			<fileset dir="${antfile.dir}" includes="**/src/main/resources/META-INF/services/${service}"/>
 		</concat>
 	</target>
 

