• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Problem in adding jar files to the building war file using ant

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello

I am creating a web service using jaxws.

I am writing build.xm to make war file.But whe build.xml is creating war file it is not containing jar file which jws file is using.

Please suggest.Below is the my build.xml

<?xml version="1.0" encoding="windows-1252" ?>
<project name="Automation Service" default="all">
<property file="build.properties"/>



<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
<classpath>
<path id="weblogic.classpath" >
<pathelement path="WEBLOGIC_HOME"/>
<fileset dir="${weblogic.jar.classpath}">
<include name="weblogic.jar"/>
</fileset>
</path>
</classpath>
</taskdef>



<target name="init">
<tstamp/>
<mkdir dir="${build.dir}"/>
</target>




<target name="build-service" depends="init">

<copy todir="${ear-dir}/">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
</copy>
<jwsc
srcdir="src"
destdir="${ear-dir}">
<jws file="com/RunBaseAction.java"
type="JAXWS">
</jws>
<classpath>
<fileset dir="${lib.dir}">
<include name="*.jar"/>
</fileset>
</classpath>
</jwsc>
</target>



</project>


after running ant build-service
it is creating war file but my JWS file which is RunBaseAction.java is using some library which is under lib folder. But ware file does not contain this lib.

Please suggest

-Bhupendra
 
bhupendra Singh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The sub-element zipfileset in jwsc task can pack the file into target war.

Here is a snippet:

<jwsc ...>
<jws ...>
<zipfileset dir="." prefix="WEB-INF/lib">
<include name="your.jar"/>
</zipfileset>
</jws>
</jwsc>


-Bhupendra
 
Eliminate 95% of the weeds in your lawn by mowing 3 inches or higher. Then plant tiny ads:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic