Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

build osgi jars

  • Loading branch information...
commit 89acabc3815c7cc87857604909a545d9e1f42a30 1 parent 5aefa69
VincentJian VincentJian authored
8 build.prop.xml
@@ -73,4 +73,10 @@ Copyright (C) 2002 Potix Corporation. All Rights Reserved.
73 73 <property name="version.tag.uid" value="version-uid&gt;${zk.version}&lt;/version-uid"/>
74 74 <property name="version.java.uid" value='UID = &quot;${zk.version}&quot;;$'/>
75 75 <property name="version.java.release" value='RELEASE = &quot;${zk.version}&quot;;'/>
76   -<property name="version.java.release.freshly" value='RELEASE = &quot;${zk.version}-FL&quot;;'/>
  76 +<property name="version.java.release.freshly" value='RELEASE = &quot;${zk.version}-FL&quot;;'/>
  77 +
  78 +<!-- OSGi -->
  79 +<property name="bnd.lib.jar" value="${dist.lib.ext.dir}/bnd.jar"/>
  80 +<property name="bnd.config.name" value="${project.name}.bnd"/>
  81 +<property name="bnd2.config.name" value="${project.name}.nosrc.bnd"/>
  82 +<property name="dist.osgi.dir" value="${dist.lib.dir}/osgi"/>
31 build.target.xml
@@ -93,7 +93,14 @@ depends="config.build, stop.service, deploy.tomcat.files, start.service"
93 93 if="deploy.tomcat.required">
94 94 </target>
95 95
96   -<target name="deploy" depends="deploy.lib, deploy.tomcat">
  96 +<target name="deploy.osgi" if="deploy.lib.required">
  97 + <move overwrite="true" todir="${dist.osgi.dir}" >
  98 + <fileset dir="${dist.osgi.dir}" includes="*.bar" />
  99 + <mapper type="glob" from="*.bar" to="*.osgi.jar" />
  100 + </move>
  101 +</target>
  102 +
  103 +<target name="deploy" depends="deploy.lib, deploy.osgi, deploy.tomcat">
97 104 </target>
98 105
99 106 <!-- ===== -->
@@ -197,8 +204,27 @@ if="deploy.tomcat.required">
197 204 </ear>
198 205 </target>
199 206
  207 +<target name="build.osgi1" depends="build.jar" if="build.jar.required">
  208 + <mkdir dir="${dist.osgi.dir}"/>
  209 + <echo file="${dist.osgi.dir}/${bnd.config.name}" message="Bundle-Version:${project.version}"/>
  210 +</target>
  211 +
  212 +<target name="build.osgi2" depends="build.jar2" if="build.jar2.required">
  213 + <echo file="${dist.osgi.dir}/${bnd2.config.name}" message="Bundle-Version:${project.version}"/>
  214 +</target>
  215 +
  216 +<target name="build.osgi" depends="build.osgi1, build.osgi2" if="build.jar.required">
  217 + <taskdef resource="aQute/bnd/ant/taskdef.properties" classpath="${bnd.lib.jar}"/>
  218 + <bndwrap output="${dist.osgi.dir}" definitions="${dist.osgi.dir}">
  219 + <fileset dir="${out.dir}" includes="${jar.name}, ${jar2.name}"/>
  220 + </bndwrap>
  221 + <delete quiet="true">
  222 + <fileset dir="${dist.osgi.dir}" includes="${bnd.config.name}, ${bnd2.config.name}"/>
  223 + </delete>
  224 +</target>
  225 +
200 226 <target name="build"
201   - depends="config.build, build.war, build.jar, build.jar2, build.ear, deploy">
  227 + depends="config.build, build.war, build.jar, build.jar2, build.ear, build.osgi, deploy">
202 228 </target>
203 229
204 230 <!-- ===== -->
@@ -213,6 +239,7 @@ if="deploy.tomcat.required">
213 239 <fileset dir="${dist.lib.dir}" includes="${xar.name}"/>
214 240 <!--fileset dir="${tomcat.lib.dir}" includes="${xar.name}"/-->
215 241 <fileset dir="${tomcat.webapps.dir}" includes="${xar.name}"/>
  242 + <fileset dir="${dist.osgi.dir}" includes="${xar.name}"/>
216 243 </delete>
217 244 </target>
218 245
BIN  dist/lib/ext/bnd.jar
Binary file not shown

0 comments on commit 89acabc

Please sign in to comment.
Something went wrong with that request. Please try again.