ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » mqsipackagebar archive dependent java lib twice

Post new topic  Reply to topic
 mqsipackagebar archive dependent java lib twice « View previous topic :: View next topic » 
Author Message
junzi88
PostPosted: Fri May 22, 2015 7:43 am    Post subject: mqsipackagebar archive dependent java lib twice Reply with quote

Novice

Joined: 25 Sep 2013
Posts: 16

We use ant to build bar file in Jenkins. First the ant script call mqsicreatebar to compile application project with compileOnly. This project reference another java project. We put all apache dependent jars inside java project lib directory. The second step calls mqsipackagebar which use com.ibm.broker.config.appdev.FlowRendererBar". The second step does jar the java project as jar with those apache dependent jars inside. However, insider final bar file and inside .appzip, those dependent jars are archived again along with java project jar file at same level. I tried to use -d -y apachedxxx.jar. It does not work. The bar is not generated. With duplicated apache jar file inside the bar, the bar file works on broker but when we use toolkit to build bar file, the apache jars are not duplicated, they are in java project lib directory. Anyone has idea how to use mqsipackagebar to package bar same as Toolkit does? How to use -d option correctly?
Back to top
View user's profile Send private message
mqjeff
PostPosted: Fri May 22, 2015 8:01 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Is toolkit build set to use mqsicreatebar or mqsipackagebar ?
Back to top
View user's profile Send private message
junzi88
PostPosted: Fri May 22, 2015 12:44 pm    Post subject: Reply with quote

Novice

Joined: 25 Sep 2013
Posts: 16

How can I know which command my toolkit used when I used New Bar file in pop menu. Project->Build for msqipackagebar says bar has been created. I am guessing it is using msqipackagebar.
The bar that my script created with duplicate dependant jars does not really work. Some function is fine some not. I still need find the solution to use script to build.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 26, 2015 5:16 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

junzi88 wrote:
How can I know which command my toolkit used when I used New Bar file in pop menu. Project->Build for msqipackagebar says bar has been created. I am guessing it is using msqipackagebar.
The bar that my script created with duplicate dependant jars does not really work. Some function is fine some not. I still need find the solution to use script to build.


The Toolkit will show you the exact command at the bottom of the Bar File Editor - if you're on the right tab.
Back to top
View user's profile Send private message
junzi88
PostPosted: Tue May 26, 2015 7:28 am    Post subject: Reply with quote

Novice

Joined: 25 Sep 2013
Posts: 16

On the Manage tab, after expended Command for packaging the BAR contents, it shows mqsipackagebar -a <barName> -w <rootLocaion> -k myApp. However, when I just used this command to build whole appliation, the bar does NOT contain the java project which is supposed to build as a jar file. The bar does contains the thid party jars, like apache jars and other refrenced projects as .libzip. I know it only package the bar, not build the whole thing. Then I came back to my old approach to use mqsicreatebar. Instead of just using -compileOnly, I added -b option to have it create bar file. Finally it built a bar as I expected. Thank you so much Jeff for your hint.
Back to top
View user's profile Send private message
mqjeff
PostPosted: Tue May 26, 2015 7:37 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You will have to add the java projects to the command.

Also make sure that they exist in the workspace you are building from...
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 26, 2015 8:25 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Would'nt the compile-only create the jar files? Then the dependency for the project should add them in..., at least that's the theory
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
junzi88
PostPosted: Tue May 26, 2015 8:58 am    Post subject: Reply with quote

Novice

Joined: 25 Sep 2013
Posts: 16

It appears -compileOnly did not really work. The bar file I created earlier with -compileOnly and -b has .cmf files. The java project is created as jar file. When I tried to deploy the bar, I got errors. The esql files could not be found. Then I removed -compileOnly, the result is same. The java code was recompiled but it still created .cmf file. After I used -deployAsSource, not -compileOnly, It created the bar file that is working after I deployed on broker server.

Jeff, I put java project, application, other 3 lib projects at same level. So the final bar has all of them. Now I can use maven to automatically build it in Jenkins. Thanks!
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue May 26, 2015 3:36 pm    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Have you tried using -deployAsSource and -compileOnly together when running mqsicreatebar ?
You should then be able to run mqsipackagebar
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
junzi88
PostPosted: Wed May 27, 2015 5:26 am    Post subject: Reply with quote

Novice

Joined: 25 Sep 2013
Posts: 16

mqsipackagebar archive the same jar twice as I described earlier. Maybe it is default behavior and no negative impact during runtime. But it is not same Toolkit does.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Wed May 27, 2015 5:33 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

junzi88 wrote:
mqsipackagebar archive the same jar twice as I described earlier. Maybe it is default behavior and no negative impact during runtime. But it is not same Toolkit does.

Don't see this behavior in IIB 9001
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » mqsipackagebar archive dependent java lib twice
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.