Author |
Message
|
sdmq |
Posted: Thu May 02, 2013 1:48 pm Post subject: set eclipse classpath variable in ant for mqsicreatebar |
|
|
Newbie
Joined: 02 May 2013 Posts: 4
|
Has anyone managed to set eclipse classpath variable for mqsicreatebar?
I'm setting up Hudson server for automation build and some java projects have classpath variables inside .classpath file. such as
<classpathentry exported="true" kind="var" path="WMB7_INSTALLDIR/classes/ConfigManagerProxy.jar"/>
In my ant scripts, I generate build.xml for one flow project and copy project and its dependencies to a new workspace(without .metadata). The problem is: how can I setup the eclipse classpath variable without opening toolkit? |
|
Back to top |
|
 |
mqjeff |
Posted: Fri May 03, 2013 7:57 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'm not sure what, exactly, you mean by "without opening Eclipse".
The mqsicreatebar command should run without needing additional shell setup configured before hand, to the best of my knowledge.
That is, your ant script should just be able to issue an exec for mqsicreatebar and it should just run.
mqsicreatebar, however, always runs eclipse in a headless mode. It's a Toolkit command, you have to run it on a machine that has Toolkit fully and properly installed and patched. |
|
Back to top |
|
 |
sdmq |
Posted: Mon May 06, 2013 11:32 am Post subject: |
|
|
Newbie
Joined: 02 May 2013 Posts: 4
|
well, I'm running hudson server on the same working pc. so the toolkit is fine. If I opened toolkit on the new workspace generated by ant and add a java classpath variable, then exit toolkit and re-run ant, it's ok. But I've no clue how to generate the classpath variable for java projects(java compute node) in headless mode. |
|
Back to top |
|
 |
mqjeff |
Posted: Mon May 06, 2013 11:35 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
So what you're saying is that you're not saving the .classpath file in your source code repository, so it's not there when you retrieve it?
Or you're saying that the WMB7_INSTALLDIR environment variable is not being set in the shell running mqsicreatebar? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Mon May 06, 2013 11:57 am Post subject: Re: set eclipse classpath variable in ant for mqsicreatebar |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
sdmq wrote: |
how can I setup the eclipse classpath variable without opening toolkit? |
Use a properties file that the Ant build script reads. This file is unique to each WS instance. _________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
sdmq |
Posted: Wed May 08, 2013 9:48 am Post subject: |
|
|
Newbie
Joined: 02 May 2013 Posts: 4
|
it seems to me that the environment classpath variables are ignored by eclipse. I can replace the variable with the physical location. But again, since I'm using an ant script to generate build.xml and build the project afterward, I'm wondering if anyone else has tried something similar? |
|
Back to top |
|
 |
lancelotlinc |
Posted: Wed May 08, 2013 12:40 pm Post subject: Re: set eclipse classpath variable in ant for mqsicreatebar |
|
|
 Jedi Knight
Joined: 22 Mar 2010 Posts: 4941 Location: Bloomington, IL USA
|
I'm wondering if anyone else has tried something similar?
lancelotlinc wrote: |
sdmq wrote: |
how can I setup the eclipse classpath variable without opening toolkit? |
Use a properties file that the Ant build script reads. This file is unique to each WS instance. |
_________________ http://leanpub.com/IIB_Tips_and_Tricks
Save $20: Coupon Code: MQSERIES_READER |
|
Back to top |
|
 |
sdmq |
Posted: Thu May 16, 2013 12:46 pm Post subject: |
|
|
Newbie
Joined: 02 May 2013 Posts: 4
|
Thanks for all the replies. I managed to make it works by replace the variable in .classpath file with real path. |
|
Back to top |
|
 |
|