Author |
Message
|
sandios |
Posted: Wed Nov 23, 2016 7:11 am Post subject: BAR generated without new changes |
|
|
Apprentice
Joined: 13 Jun 2016 Posts: 27
|
I have a problem with generating the BAR files.
I have an ANT script that uses mqsicreatebar to generate the BAR files.
In some cases, the generated BAR file is not compiled with any changes that have been made to the code. Raising the BAR file generates well.
That could be happening?
Code: |
[echo] [2016/11/23 14:15:17.970] BAR: barFile.bar
[exec] [2016/11/23/14:15:36] [INFO] CommandProcessor: parseArgs { Adding file to compile list: flow.msgflow }
[exec] [2016/11/23/14:15:36] [INFO] CommandProcessor: process { mqsicreatebar arguments: }
[exec] [2016/11/23/14:15:36] [INFO] CommandProcessor: process { [-trace, -skipWSErrorCheck, -b, barFile.bar, -p, Project1, Project2, Project3, -o, Project1/flow.msgflow, -wmbtData] }
[exec] [2016/11/23/14:15:36] [INFO] CommandProcessor: process { Disable auto-build before opening the projects }
[exec] [2016/11/23/14:15:36] [INFO] CommandProcessor: openWorkspace { }
[exec] [2016/11/23/14:15:36] [INFO] CommandProcessor: openWorkspace { List of projects to be processed: Project1 ,Project2 ,Project3 }
[exec] [2016/11/23/14:15:37] [INFO] CommandProcessor: process { Enable auto-build after the projects are opened }
[exec] [2016/11/23/14:15:37] [INFO] CommandProcessor: waitForBuildsToComplete { Waiting for build to complete }
[exec] [2016/11/23/14:15:54] [INFO] CommandProcessor: process { Skip the workspace error check }
[exec] [2016/11/23/14:15:54] [INFO] CommandProcessor: doCompile { }
[exec] [2016/11/23/14:15:54] [INFO] AddToBARFileOperation: barGeneratorDelegate { Adding Project1/flow.msgflow to broker archive file }
[exec] [2016/11/23/14:15:55] [INFO] AddToBARFileOperation: barGeneratorDelegate { Adding Project1/.classpath to broker archive file }
[exec] [2016/11/23/14:15:56] [INFO] CommandProcessor: saveBar { }
[exec] BIP0986I Command completed successfully.
|
Thank you. |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 23, 2016 8:30 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
Can you be more specific with your problem?
You did not specify the parameters being passed to your build process...
Have you tried using -cleanBuild in all cases?
Are you sure you are using the latest source, when you run mqsicreatebar?
 _________________ MQ & Broker admin |
|
Back to top |
|
 |
sandios |
Posted: Wed Nov 23, 2016 8:35 am Post subject: |
|
|
Apprentice
Joined: 13 Jun 2016 Posts: 27
|
Parameters
Code: |
<exec executable="${toolkit.home}\mqsicreatebar.exe" spawn="false" vmlauncher="false" failonerror="true" logError="true">
<arg value="-trace" />
<arg value="${vcleanBuild}" />
<!--arg value="-skipWSErrorCheck" /-->
<arg value="-data" />
<arg value="${dirBase}" />
<arg value="-b" />
<arg value="${NameBAR}" />
<!-- List all the message flow projects -->
<arg value="-p" />
<arg line="${depProjs}" />
<!-- List all the files to be included in the archive -->
<arg value="-o" />
<arg line="${msgFlows}" />
</exec>
|
-cleanBuild is very slow... i cant cleanBuild.
First BAR file have old changes..... Second BAR file have new changes...
This is random, 5% of the deployments
workspace problem random?... metadata is new.
Thanks. |
|
Back to top |
|
 |
mqjeff |
Posted: Wed Nov 23, 2016 8:43 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
I'm sure that the -trace slows things down quite a lot.
You could run mqsicreatebar with -compileonly, and then run it normally (or mqsipackagebar).
But it sounds like your process isn't pulling in changes from your source control properly. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
fjb_saper |
Posted: Wed Nov 23, 2016 12:31 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sandios wrote: |
Parameters
Code: |
<exec executable="${toolkit.home}\mqsicreatebar.exe" spawn="false" vmlauncher="false" failonerror="true" logError="true">
<arg value="-trace" />
<arg value="${vcleanBuild}" />
<!--arg value="-skipWSErrorCheck" /-->
<arg value="-data" />
<arg value="${dirBase}" />
<arg value="-b" />
<arg value="${NameBAR}" />
<!-- List all the message flow projects -->
<arg value="-p" />
<arg line="${depProjs}" />
<!-- List all the files to be included in the archive -->
<arg value="-o" />
<arg line="${msgFlows}" />
</exec>
|
-cleanBuild is very slow... i cant cleanBuild.
First BAR file have old changes..... Second BAR file have new changes...
This is random, 5% of the deployments
workspace problem random?... metadata is new.
Thanks. |
It's not cleanBuild that's slowing you down. It is however keeping all that .metaData around. In my ant script, I has a part that deleted the .metaData before any build. So that only the metadata necessary for the build was rebuilt...  _________________ MQ & Broker admin |
|
Back to top |
|
 |
timber |
Posted: Wed Nov 23, 2016 2:38 pm Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
I would add that mqsipackagebar is a *lot* simpler and faster than mqsicreatebar. It does not load up an entire headless Eclipse instance in order to do the compilation. On the downside, this means that the projects do not get re-validated as a side-effect of building the BAR file. But arguably, if you are committing code into your version control system when it does not compile then you have bigger problems than your choice of command-line build tool
In order to use mqsipackagebar, everything in the project must be 'deployable'. So message sets, Java and user-defined subflows must be built using mqsicreatebar before running mqsipackagebar.
http://www.ibm.com/support/knowledgecenter/en/SSMKHH_10.0.0/com.ibm.etools.mft.doc/bc31730_.htm |
|
Back to top |
|
 |
sandios |
Posted: Thu Nov 24, 2016 1:46 am Post subject: |
|
|
Apprentice
Joined: 13 Jun 2016 Posts: 27
|
Thanks,
Quote: |
It's not cleanBuild that's slowing you down. It is however keeping all that .metaData around. In my ant script, I has a part that deleted the .metaData before any build. So that only the metadata necessary for the build was rebuilt...
|
How do you delete the metadata in the ant script? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Nov 24, 2016 10:25 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
sandios wrote: |
Thanks,
Quote: |
It's not cleanBuild that's slowing you down. It is however keeping all that .metaData around. In my ant script, I has a part that deleted the .metaData before any build. So that only the metadata necessary for the build was rebuilt...
|
How do you delete the metadata in the ant script? |
Simple Ant delete task... look it up on google and the Ant doc.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
sandios |
Posted: Tue Nov 29, 2016 1:23 am Post subject: |
|
|
Apprentice
Joined: 13 Jun 2016 Posts: 27
|
Thanks...
Is it possible that this error is for generating the patches with a different version of javahl that uses the toolkit? |
|
Back to top |
|
 |
sandios |
Posted: Tue Nov 29, 2016 3:34 am Post subject: |
|
|
Apprentice
Joined: 13 Jun 2016 Posts: 27
|
If I compare the two BAR files generated. The first file occupies less than the second file (the one that is well created with the new changes)
Thanks. |
|
Back to top |
|
 |
sandios |
Posted: Tue Dec 13, 2016 8:36 am Post subject: |
|
|
Apprentice
Joined: 13 Jun 2016 Posts: 27
|
Do you have any idea why the first BAR occupies less space? I think the first BAR is generated with old code, but the patches have been correctly applied in the deployment.
This error occurs in 10% of the deployments. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 13, 2016 8:43 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
What are you using to supply source to mqsicreatebar? _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
sandios |
Posted: Tue Dec 13, 2016 9:26 am Post subject: |
|
|
Apprentice
Joined: 13 Jun 2016 Posts: 27
|
I do not know if I understood you correctly ...
The deployment is performed with ANT, the flows to be deployed and their dependencies are indicated and executed as indicated above. |
|
Back to top |
|
 |
mqjeff |
Posted: Tue Dec 13, 2016 9:42 am Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 17447
|
sandios wrote: |
I do not know if I understood you correctly ...
The deployment is performed with ANT, the flows to be deployed and their dependencies are indicated and executed as indicated above. |
Where does the workspace containing the flows and dependencies come from?
This is the place to look for why the bar files are different - because the code available to Ant is not fully there. _________________ chmod -R ugo-wx / |
|
Back to top |
|
 |
sandios |
Posted: Tue Dec 13, 2016 9:50 am Post subject: |
|
|
Apprentice
Joined: 13 Jun 2016 Posts: 27
|
The workspace that is indicated to ANT is the complete workspace with the code. The code should be patched with the latest modifications (SVN). |
|
Back to top |
|
 |
|