Hello Kasim,

you are defining a fileset, but you are not referencing it afterwards. To be able to reference the fileset in your <java/> invocation,
you would need to give an id to the fileset, like this

<fileset id="foo" dir="somedir">
  <include name="*/*.jar"/>
</fileset>

<java classname ...

   <classpath>
       <fileset refid="foo"/>
   </classpath>

</java>

Anyway, when you start tomcat, the bootstrap.jar by default picks up all the libs which are in $CATALINA_HOME/lib as far as I know. Not sure about shared/lib.

Regards,

Antoine


kasim ahmed wrote:
Hi,

I have target which start-up Tomcat server, I have some external jar(which I
shouldnot keep in common/lib) which need to lookup while server startup. I
have added property also fileset for jar lookup, but it is not referring the
jar where I have specified the location.

my target is:


<target name="tomcat-start" description="Start Tomcat Server"
depends="copy.bfconf,check.
javaagent">
        <require-property property="bf.tomcat.dir"
                          error-suffix="Please ensure tomcat's location is
set in build.${environment}.properties"/>
        <property name="catalina.home" location="${bf.tomcat.dir}"/>
        <property name="catalina.base"
location="${target.root}/Build/target/tomcat/"/>
        <property name="bf.server.conf.location" value="BFConf/"/>
        <property name="BFconfigLocation"
location="${bf.server.conf.location}"/>
        <property name="log4j.location"
value="file:/${bf.server.conf.location}conf/bankfusion.log4j.conf"/>
        <echo message="${log4j.location}"/>
        <property name="xdebug" value=""/>
        <property name="xrunjdwp" value=""/>
        <property name="xjpda" value=""/>
       <!-- Here is the changes I have done -->
* <property name="db2jcc.jar"
location="${target.root}/Build/target/Tomcat/shared/lib/db2jcc.jar"/>
        <property name="db2jcc_javax"
location="${target.root}/Build/target/Tomcat/shared/lib/db2jcc_javax"/>
        <property name="db2jcc_license_cu"
location="${target.root}/Build/target/Tomcat/shared/lib/db2jcc_license_cu"/>
        <fileset dir="${target.root}/Build/target/Tomcat/shared/lib" >
            <patternset>
                <include name="**/*.jar"/>
            </patternset>
        </fileset>
    *
        <java jar="${bf.tomcat.dir}/bin/bootstrap.jar" fork="true"
logerror="true" taskname="tomcat">
            <jvmarg value="-Dcatalina.home=${catalina.home}"/>
            <jvmarg value="-Dcatalina.base=${catalina.base}"/>
            <jvmarg value="-DBFconfigLocation=${BFconfigLocation}\"/>
            <jvmarg value="-DCE=on"/>

            <jvmarg
value="-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"/>
            <jvmarg
value="-Djava.util.logging.config.file=tomcatLogs/conf/logging.properties"/>

            <jvmarg
value="-Dorg.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl"/>
            <jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger"/>
            <jvmarg value="-Dlog4j.configuration=${log4j.location}"/>
            <!--<jvmarg
value="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger"/>-->

            <!--<jvmarg
value="-Dlog4j.configuration=file:/C:/BF/tools/logs/server/log4j.xml"/>-->
            <jvmarg
value="-Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
            <jvmarg value="-Xms128m"/>
            <jvmarg value="-Xmx768m"/>
            <jvmarg value="-Xrs"/>
            <jvmarg value="${xdebug}"/>
            <jvmarg value="${xrunjdwp}"/>
            <jvmarg value="${xjpda}"/>
            <jvmarg
value="-javaagent:${systemtestbase.jar}=${tomcat-wait-port},${tomcat-shutdown-port}"/>
        </java>
    </target>




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

Reply via email to