Thanks for your reply, Rick. I changed my build.xml as shown in the
attached file and still no luck yet :(

Mamta

On 8/29/08, Rick Hillegas <[EMAIL PROTECTED]> wrote:
> Hi Mamta,
>
> Here's a target from java/demo/build.xml which compiles some classes with
> the 1.5 compiler. This may work better for you:
>
>  <target name="compile-vtidemo">
>   <javac
>     source="1.5"
>     target="1.5"
>     bootclasspath="${empty}"
>     nowarn="on"
>     debug="${debug}"
>     depend="${depend}"
>     deprecation="${deprecation}"
>     optimize="${optimize}"
>     proceed="${proceed}"
>     verbose="${verbose}"
>     srcdir="${derby.demo.src.dir}/vtis/java"
>     destdir="${out.dir}">
>     <classpath>
>       <pathelement path="${java15compile.classpath}"/>
>     </classpath>
>      <!-- <compilerarg value="-Xlint:unchecked"/> -->
>   </javac>
>  </target>
>
> Hope this helps,
> -Rick
>
>
> Mamta Satoor wrote:
> > Hi,
> >
> > I am adding an import of
> java.util.concurrent.ThreadPoolExecutor in
> > org.apache.derby.iapi.sql.dictionary.DataDictionary and
> when I compile
> > it without any changes to build.xml, I ofcourse get errors for that
> > import because it is only available in jdk1.5 and higher.
> >
> > In order to fix this, I have made changes to
> > org.apache.derby.iapi.sql.build.xml (attached to this
> mail) so that
> > DataDictionary is excluded from compile with jdk1.4 and will be
> > compiled with jdk1.6 But that is not fixing the problem. I was
> > wondering if someone more familiar with build.xml can help me on this?
> > This is my first time trying to add a new target and my attempt at
> > changes in this build.xml are based on other build.xmls in the Derby
> > engine code.
> >
> > thanks,
> > Mamta
> > ps this is a temporary thing to put something jdk1.5 specific in
> > DataDictionary. I later plan subclass it and then jdk1.5 specific
> > stuff will go into that new class. But I will have to go through the
> > same exercise of changing build,xml for that new file and hence this
> > exercise of changing the build.xml will be useful later.
> >
> >
>
>
<?xml version="1.0"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to you under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->

<project default="compile" basedir="../../../../../../..">

<!-- Set Properties -->
  <!-- User settings -->
  <property file="${user.home}/ant.properties"/>
  <!-- Set property lib dir -->
  <property name="properties.dir" value="tools/ant/properties"/>
  <!-- Significant dirs -->
  <property file="${properties.dir}/dirs.properties"/>
  <!-- Compiler settings -->
<property file="${properties.dir}/defaultcompiler.properties"/> 
  <property file="${properties.dir}/${build.compiler}.properties"/>
  <!-- Compile-time classpath properties files -->
  <property file="${properties.dir}/extrapath.properties"/>
  <property file="${properties.dir}/compilepath.properties"/>

<!-- Targets -->

  <target name="compile" depends="compile_iapi_sql_jdbc2, compile_jdk15"/>

  <target name="compile_iapi_sql_jsr169">
    <javac
      source="1.4"
      target="1.4"
      bootclasspath="${empty}"
      nowarn="on"
      debug="${debug}"
      depend="${depend}"
      deprecation="${deprecation}"
      optimize="${optimize}"
      proceed="${proceed}"
      verbose="${verbose}"
      srcdir="${derby.engine.src.dir}"
      destdir="${out.dir}">
      <classpath>
        <pathelement path="${compile.classpath}"/>
      </classpath>
      <include name="${derby.dir}/iapi/sql/**"/>
	  <exclude name="${derby.dir}/iapi/sql/DataDictionary.java"/>    
    </javac>
  </target>

  <target name="compile_iapi_sql_jdbc2" depends="compile_iapi_sql_jsr169">
  </target>


  <target name="compile_jdk15">
      <javac
          source="1.5"
          target="1.5"
          bootclasspath="${empty}"
          nowarn="on"
          debug="${debug}"
          depend="${depend}"
          deprecation="${deprecation}"
          optimize="${optimize}"
          proceed="${proceed}"
          verbose="${verbose}"
          srcdir="${derby.engine.src.dir}"
          destdir="${out.dir}">
          <classpath>
              <pathelement path="${java15compile.classpath}"/>
          </classpath>
          <include name="${derby.dir}/iapi/sql/DataDictionary.java"/>
          <!-- <compilerarg value="-Xlint:unchecked"/> -->
      </javac>
  </target>
</project>

Reply via email to