hi,
i have an ant-based buckminster action and i want to execute a java class in this action. the bundle defining the action resides in the workspace and requires other bundles, some in the workspace some in the target-platform. to execute the java class i need the complete classpath for this bundle; but i didn't find a proper solution
as a workaround i defined the referenced bundles in the prerequisites of the action.
the attribute "bdv.data" points to the bin-folder of the current bundle, admin.services to the jar of the referenced bundle (in workspace). the commented bundles reside in the target platform which is added to the classpath in the action's ant-script:
<prerequisites alias="input">
<attribute alias="bdv.data" name="eclipse.build"/>
<attribute alias="admin.services" name="bundle.jar" component="ch.rtc.bdv.admin.services.interfaces"/>
<!--attribute alias="jabas.core" name="bundle.jar" component="ch.rtc.jabas.core"/-->
<!--attribute alias="jabas.types" name="bundle.jar" component="ch.rtc.jabas.types"/-->
</prerequisites>
the action's ant-script:
<!-- add bundles and complete target platform to classpath -->
<path id="export.classpath.id">
<pathelement path="${sp:bdv.data}"/>
<buckminster.valuefileset value="${fs:admin.services}"/>
<!--pathelement path="${sp:jabas.core}"/-->
<!--pathelement path="${sp:jabas.types}"/-->
<fileset dir="${target.location}/plugins">
<include name="*.jar" />
</fileset>
</path>
please note the different handling of "bdv.data" and "admin.services".
this workaround runs as expected, but i hope there's a better, more intuitive way to do it !
thanks
jakob
[Updated on: Fri, 27 January 2012 12:38]
Report message to a moderator