3 Replies Latest reply: Dec 7, 2012 4:30 PM by user3671220 RSS

    Include jar in the war generated by jwsc

    715924
      Hello,


      How can i add jar's in the war archive generated by jwsc ?

      Regards,
      Fabrice
        • 1. Re: Include jar in the war generated by jwsc
          Kevin Wang
          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>

          HTH,
          -kevin
          • 2. Re: Include jar in the war generated by jwsc
            Kalyan Pasupuleti-Oracle
            HI,

            Code given by the Kaven is absolutely correctly you can try that particular script it will work.

            Regards,
            Kal.
            • 3. Re: Include jar in the war generated by jwsc
              user3671220
              Weblogic 9.2 does not support zip need to add sepate task like below
              <project name="webservices-complex" default="build-service">
                   
              <path id="dependencyfinder">
              <pathelement location="C:/bea/weblogic92/server/lib/weblogic.jar"/>

              </path>

                   <taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask">
                        <classpath refid="dependencyfinder"/>
                   </taskdef>

                   <target name="build-service">
                        <jwsc srcdir="src"
                             destdir="." keepGenerated="true" verbose="on" debug="true"
                             debuglevel="lines,vars,source"
                             listfiles="true" classpathref="dependencyfinder">
                             <classpath>
                             <pathelement path="${java.class.path}" />
                             <pathelement path="c:/CustInfo.jar" />
                             </classpath>               
                             <jws file="ServiceConsumer.java" >
                   
                             </jws>
                        </jwsc>
                        <zip destfile="ServiceConsumer.war" update="true">
                             <zipfileset dir="src" prefix="docs/user-guide"/>
                             <zipfileset dir="build" prefix="build"/>
                             <zipfileset dir="Webcontent/WEB-INF/lib" includes="CustInfo.jar" fullpath="WEB-INF/lib/CustInfo.jar"/>
                        </zip>
                        
                   </target>
              </project>