ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ciramella, EJ" <ECirame...@emptoris.com>
Subject RE: Websphere (WAS) doesn't like my EAR file from ANT
Date Wed, 03 Sep 2003 14:56:21 GMT
Actually, looking at the examples included with the websphere installation
and comparing that to the DD generated for any of our WL deployments,
they're pretty close.  Has anyone tried using the DDInit task from WL for a
DD for WAS?

-----Original Message-----
From: Ciramella, EJ [mailto:ECiramella@emptoris.com]
Sent: Wednesday, September 03, 2003 10:44 AM
To: 'Ant Users List'
Subject: RE: Websphere (WAS) doesn't like my EAR file from ANT


Could anyone email me directly a copy of their application.xml file?  We've
pretty much been a Weblogic shop, but now need to support Websphere too.
Weblogic had a built in way to generate the application.xml file
(weblogic.ant.taskdefs.ear.DDInit in case no one knew).  Until we work all
the Weblogic code out of our product, I can't do much of anything as far as
adding in WebSphere functionality to our build scripts.  With a copy of
someone's application.xml file, I can at least tell how different they are.

-----Original Message-----
From: Mattos, John [mailto:jmattos@Indemand.com]
Sent: Wednesday, September 03, 2003 9:07 AM
To: 'Ant Users List'
Subject: RE: Websphere (WAS) doesn't like my EAR file from ANT


Hey

To be honest, I've never tried the EAR task. I tried this one first, and it
worked. I feel like it allows a greater degree of control...


John 


-----Original Message-----
From: Nick Neuberger [mailto:Nick.Neuberger@sncc.com] 
Sent: Tuesday, September 02, 2003 5:14 PM
To: 'Ant Users List'
Subject: RE: Websphere (WAS) doesn't like my EAR file from ANT

Did you have to use the "jar" task instead of the "ear" task because of the
problem with websphere?

Or did you experience the same problem as I am with trying to deploy an EAR
file that was built in ant with the "ear" task.

If so, I'll try doing the same as you.  If I can remember, they are
basically the same "ear" and "jar" tasks, except the "ear" task has the
added attributes to add the appxml file, etc.

Thanks, Nick Neuberger


-----Original Message-----
From: Mattos, John [mailto:jmattos@Indemand.com]
Sent: Tuesday, September 02, 2003 3:48 PM
To: 'Ant Users List'
Subject: RE: Websphere (WAS) doesn't like my EAR file from ANT


Oh but as a side now, I've been very successful generating EAR files that
are deployable to WebSphere 4.0.3. I'm happy to share how I did it.


Essentially, I just use the JAR task to create the EAR file


John


Here is a snippet...

	<!-- Initialize -->
	<target name="init">
   	 	<buildnumber/>
   		<!-- Create the build directory structure used by compile
-->
    	<mkdir dir="${src}"/>
    	<tstamp>
      		<format property="backup.dateTime" pattern="MMMM-dd-yyyy
hh-mm-ss aa"/>
    	</tstamp>
  	</target>
	
	<!-- Get code from CVS -->
	<target name="cvsByTag" description="get a specific tag from CVS" >

		<copy file="./build.number" tofile="./build.details"/>
		<replace file="build.details" 
  			token="build.number=" 
  			value="Tag= ${indab.label}; build.number="/>
		<echo message="Using cvsRoot	=${cvsRoot}"/>
		<echo message="Using cvsRsh		=${cvsRsh}"/>
		<echo message="Using Dest		=${src}"/>
		<echo message="Using passFile	=${passFile}"/>
		<echo message="Using Label		=${indab.label}"/>
     	<cvs command="checkout -N" cvsRoot="${cvsRoot}" cvsRsh="${cvsRsh}"
compressionlevel="9" tag="${indab.label}"
     		passfile="${passFile}" package="indabWeb" dest="${src}"/>
     	<cvs command="checkout -N" cvsRoot="${cvsRoot}" cvsRsh="${cvsRsh}"
compressionlevel="9" tag="${indab.label}"
     		passfile="${passFile}" package="indab" dest="${src}"/>
  	</target>
  
  	<!-- Compile -->
  	<target name="compile">
    	<mkdir dir="${build}"/>
    	<echo message="Classpath is :${classpath}"/>
    	<javac srcdir="${cvssrc}" destdir="${build}" 
    			classpath="${classpath}" failonerror="true"
compiler="modern" debug="on"/>
     	<copy file="${cvssrc}/log4j.lcf" todir="${WEB-INF}/classes"/>
     	<copy
file="${cvssrc}/com/indemand/indab/ApplicationResources.properties"
todir="${WEB-INF}/classes/com/indemand/indab"/>
  	</target>

	<!-- Jar -->
	<target name="jar">
		<jar destfile="${WEB-INF}/lib/indab.jar" 
	    	basedir="${src}/indabWeb/webApplication/WEB-INF/classes/" 
	    	excludes="**/ApplicationResources.properties,**/log4j.lcf"/>
		<delete>
	    	<fileset dir="${WEB-INF}/classes">
	       	<include name="**/*.class"/>
	      	</fileset>
	    </delete>
	</target>
  
	<!-- War -->	
	<target name="war">
    	<mkdir dir="${dist}"/>
    
    	<!-- Place the classes in a jar in the lib directory -->
    	<antcall target="jar"/>
    
    	<jar destfile="${dist}/indabWeb.war" 
    		basedir="${src}/indabWeb/webApplication" 
 
manifest="${src}/indabWeb/webApplication/META-INF/manifest.mf"
 
excludes="**/websphere.jar,**/webcontainer.jar,**/j2ee.jar,**/ivjejb35.jar"/
>
  	</target>
  
  	<!-- Ear -->
  	<target name="ear">
    <!-- Copy the xmi files -->
    	<mkdir dir="${eartemp}/applicationResources/"/>
    	<mkdir dir="${eartemp}/applicationResources/META-INF"/>
    	<move todir="${eartemp}/applicationResources/META-INF">
      		<fileset dir="${meta-inf}">
        		<include name="application.xml"/>
      			<include name="*.xmi"/>
      			<include name=".modulemaps"/>
      		</fileset>
      		<fileset dir=".">
        		<include name="build.details"/>
      		</fileset>
    	</move>
    
    	<!-- copy other files in the EAR file -->
    	<move todir="${eartemp}/applicationResources/">
      		<fileset dir="${src}/indab/">
      			<include name=".serverPreference"/>
      			<include name=".vcm_meta"/>
      		</fileset>
    	</move>	
    
    	<copy file="${dist}/indabWeb.war"
todir="${eartemp}/applicationResources/"/>
    
    	<!-- Perform the jar (ear) command -->
    	<jar destfile="${dist}/indabEar.ear"
basedir="${eartemp}/applicationResources/"/>
    
    	<!-- Delete the stuff we used to create it, may comment this out to
see the contents of the ear-->
   	 	<delete dir="${eartemp}"/>
    
  	</target>
-----Original Message-----
From: Lopez, William [mailto:william.lopez@eds.com] 
Sent: Tuesday, September 02, 2003 4:24 PM
To: Ant Users List
Subject: RE: Websphere (WAS) doesn't like my EAR file from ANT

Nick:

If you want to go offline with this I'd be glad to share what we do, a hack
sort-of, to get around this...supposedly, this incompatibility will be
corrected in version 5 of WAS.

-Will

-----Original Message-----
From: Nick Neuberger [mailto:Nick.Neuberger@sncc.com] 
Sent: Tuesday, September 02, 2003 2:54 PM
To: 'user@ant.apache.org'
Subject: Websphere (WAS) doesn't like my EAR file from ANT


For some reason, when I "install" an EAR file generated from ANT, websphere
Advanced Edition v4.0.3 doesn't like it when its installed.
com.ibm.ejs.sm.exception.OpException: cannot save the ear file.

Has anyone else experienced problems creating an EAR file from ANT and
installing it into WebSphere?

I found a support article at ibm.com that said the websphere application
assembly tool (AAT) is about the only way to properly generate an EAR file.
This would not be good.  PQ53148: J2EE EAR FILE DEPLOYMENT FAILURE

My EAR file consists of the standard stuff.  (about 28 jar files, and 1
*.war file).  If we generate the EAR file via AAT, then Websphere installs
the EAR just fine.


Any thoughts?

Thanks,

Nick Neuberger
Programmer / Analyst
IS Department
Safety National Casualty Corporation



- - - - - - 
This e-mail message is intended only for the use of the individual or entity
identified in the alias address of this message and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution of this e-mail message is strictly prohibited. If you have
received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message from your system. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


- - - - - - 
This e-mail message is intended only for the use of the individual or entity
identified in the alias address of this message and may contain confidential
and privileged information. Any unauthorized review, use, disclosure or
distribution of this e-mail message is strictly prohibited. If you have
received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message from your system. Thank you.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message