| Author | 
		  Message
		 | 
		
		  | ramzi | 
		  
		    
			  
				 Posted: Thu Aug 17, 2006 8:23 am    Post subject: Create a Bar file using MAVEN | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu Aug 17, 2006 9:31 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ramzi | 
		  
		    
			  
				 Posted: Thu Aug 17, 2006 12:54 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu Aug 17, 2006 1:09 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ramzi | 
		  
		    
			  
				 Posted: Tue Aug 29, 2006 1:25 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | fjb_saper | 
		  
		    
			  
				 Posted: Tue Aug 29, 2006 2:43 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 18 Nov 2003 Posts: 20768 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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | ramzi | 
		  
		    
			  
				 Posted: Mon Sep 04, 2006 6:49 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    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 | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |