Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Command line building with antRunner and "external" in bundle-classpath
Command line building with antRunner and "external" in bundle-classpath [message #334062] Sat, 17 January 2009 01:09 Go to next message
Nadeem Aboobaker is currently offline Nadeem AboobakerFriend
Messages: 20
Registered: July 2009
Junior Member
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] Tue, 20 January 2009 00:16 Go to previous messageGo to next message
Nadeem Aboobaker is currently offline Nadeem AboobakerFriend
Messages: 20
Registered: July 2009
Junior Member
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 17:46 Go to previous message
PM  is currently offline PM Friend
Messages: 14
Registered: July 2009
Junior Member
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
Previous Topic:Fire IncrementalProjectBuilder on Eclipse launch
Next Topic:Integrated with Team
Goto Forum:
  


Current Time: Fri Dec 27 14:57:02 GMT 2024

Powered by FUDForum. Page generated in 0.03983 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top