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 » Create a Bar file using MAVEN

Post new topic  Reply to topic
 Create a Bar file using MAVEN « View previous topic :: View next topic » 
Author Message
ramzi
PostPosted: Thu Aug 17, 2006 8:23 am    Post subject: Create a Bar file using MAVEN Reply with quote

Novice

Joined: 16 Aug 2004
Posts: 19
Location: France

Hi there,

has anyone have ever created bar file using the mqsicreatebar command inside Maven?

Any tips apprecieted, and even a maven plugin!!! :p



Ramzi


Last edited by ramzi on Thu Aug 17, 2006 12:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 17, 2006 9:31 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Maven can run ant tasks.

Ant can run external programs, like mqsicreatebar.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ramzi
PostPosted: Thu Aug 17, 2006 12:54 pm    Post subject: Reply with quote

Novice

Joined: 16 Aug 2004
Posts: 19
Location: France

jefflowrey wrote:
Maven can run ant tasks.

Ant can run external programs, like mqsicreatebar.


Thanks for your answer Jeff, that's what we are thinking to do!

I guess that it would be supported by IBM since we create the bar using the provided tool (mqsicreatebar)
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Thu Aug 17, 2006 1:09 pm    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

It would be interesting if you can post your Maven and Ant scripts.

Everytime I have looked at Maven, it has always seemed way too focused on building stuff for Java to be suitable for other things - like Broker or say Perl or etc.

But maybe that is just me.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
ramzi
PostPosted: Tue Aug 29, 2006 1:25 am    Post subject: Reply with quote

Novice

Joined: 16 Aug 2004
Posts: 19
Location: France

Hi Jeff,

we're going to start working on the solution.
Here's an ant script that calls mqsicreatebar
Now, we need to get the runtimes dependencies from maven and add them to the bar.

Quote:

<project default="CreateBar">
<target name="CreateBar">
<echo message="Génération d'un bar"/>
<exec dir="." executable="C:\Program Files\Rational\SDP\6.0\eclipse\mqsicreatebar.exe" output="antbar.txt">
<arg line="-data c:\workspace"/>
<arg line="-b antbar.bar"/>
<arg line="-p TestDependence"/>
<arg line="-o TestDependence\TestDependence.msgflow"/>
</exec>
<echo message="Bar généré"/>
</target>
</project>
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Tue Aug 29, 2006 2:43 am    Post subject: Reply with quote

Grand High Poobah

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

Remember that one of your dependencies is sourcing mqsiprofile. Probably before you even call the maven task?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
ramzi
PostPosted: Mon Sep 04, 2006 6:49 am    Post subject: Reply with quote

Novice

Joined: 16 Aug 2004
Posts: 19
Location: France

Hi there,

I've updated the script. Now it generates the bar, get the JCN's runtime dependencies from the MAVEN repository and add them to the BAR.

Cheers,

Quote:
<project default="CreateBar" xmlns:artifact="antlib:org.apache.maven.artifact.ant">

<target name="CreateBar">
<echo message="Génération d'un bar" />
<exec dir="." executable="C:\Program Files\Rational\SDP\6.0\eclipse\mqsicreatebar.exe" output="antbar.txt">
<arg line="-data ../.." />
<arg line="-b antbar.bar" />
<arg line="-p DependencyFlow" />
<arg line="-p DependencyJCN" />
<arg line="-o DependencyFlow\DependencyFlow.msgflow" />
</exec>
<echo message="Bar temporaire généré" />

<artifact:pom file="pom.xml" id="maven.project" />

<echo message="Récupération des dependances Maven: ">${maven.project.groupId}</echo>

<artifact:dependencies filesetId="my.dependency.fileset" verbose="true" useScope="runtime">
<pom refid="maven.project" />
</artifact:dependencies>

<copy todir="lib">
<fileset refid="my.dependency.fileset" />
<mapper type="flatten" />
</copy>

<echo message="Ajout des dependances Maven au bar" />
<mkdir dir="./tozip" />
<unzip src="./antbar.bar" dest="./tozip" />
<copy todir="./tozip">
<fileset dir="./lib">
<include name="**/*.jar" />
</fileset>
</copy>
<zip destfile="./antbar.bar" basedir="./tozip" />
<delete dir="./tozip" />
<delete dir="./lib" />
<echo message="Bar généré!!" />
</target>

</project>
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Create a Bar file using MAVEN
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.