Author |
Message
|
tank_n_spank |
Posted: Wed Sep 10, 2014 2:43 am Post subject: MQSICreateBAR, adding Application to the BAR file. |
|
|
Apprentice
Joined: 02 Sep 2014 Posts: 37
|
Hello,
I have previously posted about generating a bar file, which is no longer the issue anymore. Now I need to add an application to the bar file.
I essentially want to have something like
Code: |
mqsicreatebar -data C:\Workspace -b myflow.bar -a Application1 -trace |
but getting the files from a bitbucket repository.
Can I amend this ant script:
Code: |
<target name="run_mqsipackagebar" description="--> runs mqsipackagbar from an ant task">
<java classname="com.ibm.broker.config.appdev.FlowRendererBAR"
failonerror="true"
fork="true">
<arg line="-a MyBAR.bar"/>
<arg line="-k MyApplication"/>
<classpath>
<fileset dir="${MQSI_JARPATH}">
<include name="*.jar"/>
</fileset>
</classpath>
</java>
</target> |
Or just edit the com.rsb.wmb.createbar plugin, and how can I deploy it afterwards?
As it is open source, it contains the java files, so would be easier to just amend the file as:
Code: |
Commandline cmdline = new Commandline();
cmdline.setExecutable(mqsicreatebarLocation);
(cmdline.createArg()).setValue("-data");
(cmdline.createArg()).setValue(workspace.getPath());
(cmdline.createArg()).setValue("-b");
(cmdline.createArg()).setValue(getName());
(cmdline.createArg()).setValue("-cleanBuild");
(cmdline.createArg()).setValue("-a");
(cmdline.createArg()).setValue(mainProject); |
I am quite puzzled on this one, so any help will be really welcomed. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Sep 10, 2014 4:03 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Don't forget to setup for running a headless eclipse session...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
tank_n_spank |
Posted: Wed Sep 10, 2014 4:20 am Post subject: |
|
|
Apprentice
Joined: 02 Sep 2014 Posts: 37
|
Right, I will have to google that one then . But any view on which approach is better? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Sep 10, 2014 4:30 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
No, you should always run the command line from ant and etc.
Whatever you think you're accomplishing with that Java is really not going to work very well.
There's otherwise a basic difference between mqsicreatebar and mqsipackagebar. One compiles resources and one doesn't. |
|
Back to top |
|
 |
tank_n_spank |
Posted: Wed Sep 10, 2014 4:37 am Post subject: |
|
|
Apprentice
Joined: 02 Sep 2014 Posts: 37
|
Thank you for the response.
I thought it would be beneficial to create a plugin that just executes mqsicreatebar and adds an application to the bar file.
As running the command from Ant, is there any documentation on how to include a connection to my bitbucket repository? Is it similar to Maven?
Code: |
<scm>
<connection>scm:git:git@bitbucket.org:test/tesst-test-test.git</connection>
<developerConnection>scm:git:git@bitbucket.org:test/test-test-tesst.git</developerConnection>
<tag>HEAD</tag>
</scm> |
|
|
Back to top |
|
 |
mqjeff |
Posted: Wed Sep 10, 2014 4:49 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
mqsicreatebar and mqsipackagebar work with an eclipse workspace on a filesystem.
When working with a source control system of any kind, one usually runs a separate step to extract files from source control into an eclipse workspace (or at least a directory on the file system that can become an eclipse workspace) , and then points mqsicreatebar/packagebar at that workspace.
If you're writing your own ant plugin, then never mind what I said. I just didn't recognize that. Most of the time it's not worth the trouble.
When you get around to working with runtime commands, you need to remember that mqsiprofile has to be applied in the running shell - and with Ant it's easiest to do this by applying it to the shell running Ant, rather than trying to make an individual task apply the shell before running exec. |
|
Back to top |
|
 |
tank_n_spank |
Posted: Wed Sep 10, 2014 5:16 am Post subject: |
|
|
Apprentice
Joined: 02 Sep 2014 Posts: 37
|
I definitely agree that it is not worth the trouble, I am just kinda being forced to do so.
However, as you said, using an Ant script could actually be better. Is there something I can read about adding this extra step to extract files from source control into an eclipse workspace and then fire up the mqsicreatebar?
Thanks for the detailed answer. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Sep 10, 2014 5:21 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
the extra step is usually just another exec that calls whatever commandline your source control system uses, to retrieve the relevant resources into a new folder/workspace.
I don't know anything about bitbucket, so I don't know how to do that with bitbucket. |
|
Back to top |
|
 |
tank_n_spank |
Posted: Wed Sep 10, 2014 6:01 am Post subject: |
|
|
Apprentice
Joined: 02 Sep 2014 Posts: 37
|
I am not sure how exactly to initiate it. Have you got an example with Github or something similar I can use as guidance? |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Sep 10, 2014 6:03 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
tank_n_spank wrote: |
I am not sure how exactly to initiate it. Have you got an example with Github or something similar I can use as guidance? |
nope. |
|
Back to top |
|
 |
|