... until the collector arrives ...

This "blog" is really just a scratchpad of mine. There is not much of general interest here. Most of the content is scribbled down "live" as I discover things I want to remember. I rarely go back to correct mistakes in older entries. You have been warned :)

2006-01-24

WebLogic JWSC Ant Task

As I noted in a previous entry, the WebLogic JWSC task will not run unless the BEA JARs are in the classpath of the JVM that his hosting Ant.  Here is a way to make that happen in the context of an Ant script:

<path id="bea-classpath">
  <pathelement location="${bea-wls-home}/server/lib/weblogic.jar"/>
  <pathelement location="${bea-wls-home}/server/lib/webservices.jar"/>
</path>

<taskdef name="jwsc"
  classname="weblogic.wsee.tools.anttasks.JwscTask"
  classpathref="bea-classpath"
  />

<target name="~jwsc">
  <delete dir="build"/>
  <mkdir dir="build"/>
  <jwsc
    srcdir="src"
    destdir="build"
    classpathref="bea-classpath"
    verbose="true"
    >
    <jws file="test/TestServiceImpl.java"/>
  </jwsc>
</target>

<target name="jwsc">
  <java classname="org.apache.tools.ant.launch.Launcher" fork="true">
    <classpath>
      <pathelement path="${java.class.path}"/>
      <path refid="bea-classpath"/>
    </classpath>
    <sysproperty key="ant.home" value="${ant.home}"/>
    <arg value="-buildfile"/>
    <arg value="${ant.file}"/>
    <arg value="~jwsc"/>
  </java>
</target>

Blog Archive