Command line building with antRunner and "external" in bundle-classpath [message #334062] |
Fri, 16 January 2009 20:09  |
Eclipse User |
|
|
|
Hi all,
I have an Ant command line build for my plugins using the
org.eclipse.ant.core.antRunner application. Everything was working great
until now. I had to create a plugin that has code that depends on jars
specified by using the "external" keyword in the MANIFEST.MF
Bundle-ClassPath entry. Additionally, the location of the jars is
specified by a variable:
Bundle-ClassPath: external:$jar.location$/jarA.jar,
external:$jar.location$/jarB.jar,
external:$jar.location$/jarC.jar
The first problem is the scarcity of documentation on the "external"
keyword, which almost seems to be intentional since it probably should be
used as a last resort. The second problem is that I can't find any
documentation about how to do a build with antRunner when plugins use
"external" in the MANIFEST.MF
I can get the build to work if I replace $jar.location$ with the actual
location (i.e., c:/jar/location). But I can't figure out how to get it
work with the variable. The build fails when it finds something that
references classes in the jar files.
I've tried from the command line, calling java using the
-Djar.location=... vm arg, and I've tried various things in my Ant build
script (using <java> to launch, <sysproperty> or <jvmarg> or <arg> to set
the value). No luck.
Any ideas?
Thanks,
Nadeem
|
|
|
Re: Command line building with antRunner and "external" in bundle-classpath [message #334089 is a reply to message #334062] |
Mon, 19 January 2009 19:16   |
Eclipse User |
|
|
|
I was able to get my build working by temporarily copying a MANIFEST.MF
with the variable expanded into the plugin, running the build, and then
restoring the MANIFEST.MF with the variable.
While this works, it isn't exactly a clean solution. Any help?
Thanks,
Nadeem
Nadeem wrote:
> Hi all,
> I have an Ant command line build for my plugins using the
> org.eclipse.ant.core.antRunner application. Everything was working great
> until now. I had to create a plugin that has code that depends on jars
> specified by using the "external" keyword in the MANIFEST.MF
> Bundle-ClassPath entry. Additionally, the location of the jars is
> specified by a variable:
> Bundle-ClassPath: external:$jar.location$/jarA.jar,
> external:$jar.location$/jarB.jar,
> external:$jar.location$/jarC.jar
> The first problem is the scarcity of documentation on the "external"
> keyword, which almost seems to be intentional since it probably should be
> used as a last resort. The second problem is that I can't find any
> documentation about how to do a build with antRunner when plugins use
> "external" in the MANIFEST.MF
> I can get the build to work if I replace $jar.location$ with the actual
> location (i.e., c:/jar/location). But I can't figure out how to get it
> work with the variable. The build fails when it finds something that
> references classes in the jar files.
> I've tried from the command line, calling java using the
> -Djar.location=... vm arg, and I've tried various things in my Ant build
> script (using <java> to launch, <sysproperty> or <jvmarg> or <arg> to set
> the value). No luck.
> Any ideas?
> Thanks,
> Nadeem
|
|
|
Re: Command line building with antRunner and "external" in bundle-classpath [message #493541 is a reply to message #334062] |
Mon, 26 October 2009 13:46  |
Eclipse User |
|
|
|
I have run into a similar situation. My goal is to refer to resource file and not jar file. Our RCP application is feature based deployment. Features jars up everything, the source and resource files have to be in the plugin jar. After deployment we would like to modify some of our resource files like logs, etc. The only solution so far i could come up with is to use "external:" in Bundle-Classpath.
Ideally i would like my deployment folder to look like this:
/plugins
/features
/configuration
index.jnlp
The keyword "external:" works fine when the application is run from PDE. I am able to read resource files from external folder outside of plugin. But it fails when we do a command line build using Ant and deploy it and run the app using java webstart.
I bet the "external" doesnt work with Ant build scripts very well.
Has anyone used a different approach that works with the resource files and Ant.
Any thoughts..
Regards
Priyanka
|
|
|
Powered by
FUDForum. Page generated in 0.02940 seconds