costin      2002/09/25 12:32:17

  Added:       naming   build.xml
  Log:
  Initial build file, with a bit of test and a target to lauch the example
  browser.
  
  Revision  Changes    Path
  1.1                  jakarta-tomcat-connectors/naming/build.xml
  
  Index: build.xml
  ===================================================================
  <project name="jtc-naming" default="main" basedir=".">
  
      <!-- ===================== Initialize Property Values ================ -->
      <property file="build.properties"/>
      <property file="${user.home}/build.properties"/>
      <property file="${user.home}/.build.properties"/>
  
      <!-- ====================  ==================== -->
      <property name="naming.build.dir" location="target" />
          
      <property name="commons.src" location="../../jakarta-commons" />
  
      <property name="jndi.home" location="${base.path}/jndi1.2.1" />
      <property name="commons-logging.jar" 
location="${commons.src}/logging/dist/commons-logging.jar" />
      <property name="tomcat-util.jar" location="../util/build/lib/tomcat-util.jar" />
      <property name="commons-collections.jar" 
location="${commons.src}/collections/dist/commons-collections.jar" />
  
      <path id="build-main.classpath">
          <pathelement location="${commons-logging.jar}"/>
          <pathelement location="${commons-collections.jar}"/>
          <pathelement location="${tomcat-util.jar}"/>
          <pathelement location="${naming.build.dir}/classes"/>
  
          <pathelement location="${jndi.home}/lib/dns.jar"/>
          <pathelement location="${jndi.home}/lib/dsml.jar"/>
          <pathelement location="${jndi.home}/lib/fscontext.jar"/>
          <pathelement location="${jndi.home}/lib/cosnaming.jar"/>
          <pathelement location="${jndi.home}/lib/providerutil.jar"/>
          <pathelement location="${jndi.home}/lib/ldap.jar"/>
          <pathelement location="${jndi.home}/lib/ldapbp.jar"/>
          <pathelement location="${jndi.home}/lib/ldapsec.jar"/>
  
          <pathelement location="${jndi.home}/lib/jndibrowser.jar"/>
      </path>
  
      <systemPath pathRef="build-main.classpath" />
      <taskdef name="jndiSet" classname="org.apache.naming.ant.JndiSet"/>
      <taskdef name="jndiProperties" classname="org.apache.naming.ant.JndiProperties"/>
      <taskdef name="jndiFileCtx" classname="org.apache.naming.file.FileDirContext"/>
  
      <jndiProperties/>
   
      <target name="main"  >
          <mkdir dir="${naming.build.dir}/classes"/>
          <javac srcdir="src"
                 destdir="${naming.build.dir}/classes"
                 deprecation="off"
                 debug="${debug}"
                 optimize="${optimize}"
                 verbose="off" >
              <exclude name="org/apache/ajp/tomcat4/**" unless="tomcat40.detect"/>
            <classpath refid="build-main.classpath"/>
        </javac>
          <copy todir="${naming.build.dir}/classes" >
              <fileset dir="src" includes="**/*.properties"/>
          </copy>
      </target>
  
    <target name="test"  >
      <jndiSet context="/foo" value="bar" />
  
      <jndiFileCtx docBase="/tmp" id="docBaseId" />
  
      <jndiSet context="/test" refId="docBaseId" />
  
      <echo message="Value: ${jndi:/foo}"/>
      <echo message="Value: ${jndi:/test/test}"/>
      <echo message="Value: ${jndi:fs:/tmp/test}"/>
    </target>
  
  
    <target name="browser">
      <java classpathref="build-main.classpath" 
            classname="examples.browser.Browser" fork="true">
        <sysproperty key="java.naming.dns.url" value="dns://129.150.254.2/wyn.org"/>
        
        <!-- LABEL|java.naming.factory.initial|java.naming.provider.url|root|auth( 
none, simple, etc ) |princ|pass -->
        <arg 
value="LDAP|com.sun.jndi.ldap.LdapCtxFactory|ldap://localhost:389|dc=wyn,dc=org|simple|cn=Manager,dc=wyn,dc=org|secret"
 />
        <!-- arg value="File|com.sun.jndi.fscontext.RefFSContextFactory|file:/" /-->
        <arg value="DSML|com.sun.jndi.dsml.DsmlCtxFactory|file:/tmp/test.dsml.xml" />
        <arg value="DNS|com.sun.jndi.dns.DnsContextFactory|dns://127.0.0.1/localhost" 
/>
        <arg value="FS|org.apache.naming.fs.fsURLContextFactory|fs:/" />
        <arg value="Mem|org.apache.naming.memory.memoryURLContextFactory|memory:/" />
      </java>
    </target>
  
  </project>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to