]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.osgiboot/src/main/ant/osgiboot.xml
Add license headers
[gpl/argeo-slc.git] / runtime / org.argeo.slc.osgiboot / src / main / ant / osgiboot.xml
index ea7b6a4b0b322e37ca753ba019e60a9b335f7161..f9a06ac8b41b8039ab142a3c86344c39b75875e8 100644 (file)
@@ -1,4 +1,23 @@
+<!--
+
+    Copyright (C) 2010 Mathieu Baudier <mbaudier@argeo.org>
+
+    Licensed 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 default="launch">
+       <dirname property="baseDir" file="${ant.file}" />
        <dirname property="equinoxDir" file="${ant.file}" />
        <property name="equinoxJar" location="${equinoxDir}/org.eclipse.osgi.jar" />
        <property name="equinoxArgs" value="-console -clean -noExit" />
        <property name="configurationDir" location="${equinoxDir}/configuration" />
        <property name="configurationFile" location="${configurationDir}/config.ini" />
 
-       <target name="launch" depends="writeConfiguration,start">
+       <path id="slc.osgi.locations.raw.default">
+               <fileset dir="${baseDir}/lib">
+                       <include name="*.jar" />
+               </fileset>
+       </path>
+
+       <target name="launch" description="Launch Equinox" depends="prepareDefault,writeConfiguration,start">
+
+       </target>
+
+       <target name="prepareDefault" unless="slc.osgi.locations">
+               <pathconvert dirsep="/" property="slc.osgi.locations" refid="slc.osgi.locations.raw.default" />
 
+               <property name="slc.osgi.start" value="org.springframework.osgi.extender" />
        </target>
 
        <target name="writeConfiguration" description="Generate configuration based on properties">
                <echo message="equinoxJar=${equinoxJar}" />
                <echo message="configurationDir=${configurationDir}" />
-               <mkdir dir="${configurationDir}"/>
+               <mkdir dir="${configurationDir}" />
                <echo message="osgiBootBundle=${osgiBootBundle}" />
                <echo file="${configurationFile}">
                        <![CDATA[
@@ -23,6 +54,7 @@ osgi.bundles=reference:file:${osgiBootBundle}@start
 
                <addProperty name="slc.osgi.locations" />
                <addProperty name="slc.osgi.start" />
+               <addProperty name="slc.osgi.bundles" />
                <addProperty name="slc.osgi.devBases" />
                <addProperty name="slc.osgi.devPatterns" />
                <addProperty name="slc.maven.dependencyFile" />
@@ -62,9 +94,9 @@ osgi.bundles=reference:file:${osgiBootBundle}@start
                <property name="javaCommand" value="java" />
                <property name="vmlauncher" value="true" />
 
-               <echo message="commandArgs=${commandArgs}"/>
-               <echo message="${javaCommand} ${commandArgs}" file="${equinoxDir}/launch.bat"/>
-               <echo message="${javaCommand} ${commandArgs}" file="${equinoxDir}/launch.sh"/>
+               <echo message="commandArgs=${commandArgs}" />
+               <echo message="${javaCommand} ${commandArgs}" file="${equinoxDir}/launch.bat" />
+               <echo message="${javaCommand} ${commandArgs}" file="${equinoxDir}/launch.sh" />
                <exec executable="${starter}" dir="${equinoxDir}" vmlauncher="${vmlauncher}">
                        <arg line="${starterArgs}" />
                        <arg line="${javaCommand}" />
@@ -78,7 +110,8 @@ osgi.bundles=reference:file:${osgiBootBundle}@start
                        <property name="@{name}" value="" />
                        <echo message="@{name}=${@{name}}" />
                        <echo file="${configurationFile}" append="true">
-<![CDATA[@{name}=${@{name}}]]></echo>
+                               <![CDATA[@{name}=${@{name}}]]>
+                       </echo>
                </sequential>
        </macrodef>
 </project>
\ No newline at end of file