ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From One Way <oneway_...@yahoo.com>
Subject Re: <javac> compiles files with no changes
Date Tue, 06 Feb 2001 23:42:13 GMT
1) I replaced all backslashes with forward slash prior to posting this
message
2) W2K command prompt = %SystemRoot%/system32/cmd.exe
3) Yes, for all cmscontroller*.java files the very first line is a
'package ....' statement
4) the build file and output are as follows

------------------------------------------------------------------------<?xml
version="1.0"?>

<!--
=======================================================================
-->
<!-- Cms build file                                                    
 -->
<!--
=======================================================================
-->

<project name="Cms" default="main" basedir=".">

  <!-- Give user a chance to override without editing this file
       (and without typing -D each time it compiles it) -->
  <property file="${user.home}/.cms.properties" />

  <property name="java.home.dir" value="${java.home}"/>
  <property name="j2ee.home.dir" value="d:/Apps/j2sdkee1.21"/>
  <property name="wls.home.dir" value="d:/Apps/wls60"/>
  <property name="wls.app.dir"
value="${wls.home.dir}/config/mydomain/applications"/>

  <property name="Name" value="Cms"/>
  <property name="name" value="cms"/>
  <property name="version" value="4.0"/>

  <property name="cms.home.dir" value="d:/dev/cms"/>
  <property name="cms.java.dir" value="${cms.home.dir}/java"/>
  <property name="cms.web.dir" value="${cms.home.dir}/web"/>
  <property name="cms.doc.dir" value="${cms.home.dir}/doc"/>
  <property name="cms.dist.dir" value="${wls.app.dir}"/>

  <property name="build.compiler" value="modern"/>
  <property name="build.compiler.emacs" value="on"/>

  <property name="build.home.dir" value="${cms.home.dir}/build"/>
  <property name="build.ejb.dir" value="${build.home.dir}/ejb/"/>
  <property name="build.ejb.metainf.dir"
value="${build.ejb.dir}/META-INF" />
  <property name="build.web.dir" value="${build.home.dir}/web/cms"/>
  <property name="build.web.webinf.dir"
value="${build.web.dir}/WEB-INF"/>
  <property name="build.javadoc.dir"
value="${build.home.dir}/javadoc"/>

  <path id="build.classpath.ejbc">
        <pathelement path="${java.home.dir}/lib/tools.jar" />
        <pathelement path="${j2ee.home.dir}/lib/j2ee.jar" />
	<pathelement path="${wls.home.dir}/lib/weblogic_sp.jar" />
	<pathelement path="${wls.home.dir}/lib/weblogic.jar" />
  </path>
  <property name="build.classpath.ejbc" refid="build.classpath.ejbc"/>

  <path id="cms.classpath.javac">
        <pathelement path="${java.home.dir}/lib/tools.jar" />
        <pathelement path="${j2ee.home.dir}/lib/j2ee.jar" />
	<pathelement path="${wls.home.dir}/lib/weblogic_sp.jar" />
	<pathelement path="${wls.home.dir}/lib/weblogic.jar" />
        <pathelement path="${build.ejb.dir}" />
  </path>
  <property name="cms.classpath.javac" refid="cms.classpath.javac"/>

  <property name="packages" value="org.apache.tools.*"/>

  <!--
=================================================================== -->
  <!-- Define a global set of patterns that can be referenced by       
   -->
  <!-- its id attribute                                                
   -->
  <!--
=================================================================== -->
<!--<patternset id="src.patterns">
    <include name="**/cms/java" />
  </patternset>
-->

  <!--
=================================================================== -->
  <!-- Check to see what optional dependencies are available           
   -->
  <!--
=================================================================== -->
  <target name="check_for_optional_packages">
    <available property="jdk1.3+" classname="java.lang.StrictMath" />
    <available property="ejb.wls.present" classname="weblogic.Server"
classpath="${cms.classpath.javac}"/>
    <available property="ejb.ejbc.present" classname="weblogic.ejbc"
classpath="${cms.classpath.javac}"/>

    <available property="junit.present"
classname="junit.framework.TestCase" />
    <available property="ftp.present"
classname="com.oroinc.net.ftp.FTPClient" />
  </target>

  <!--
=================================================================== -->
  <!-- Prepares the build directory                                    
   -->
  <!--
=================================================================== -->
  <target name="prepare">
	<mkdir dir="${build.home.dir}"/>
	<mkdir dir="${build.ejb.dir}"/>
    <tstamp/>
  </target>

  <!--
=================================================================== -->
  <!-- Compiles the source code                                        
   -->
  <!--
=================================================================== -->
  <target name="test1" depends="prepare,check_for_optional_packages">
    <javac srcdir="${cms.java.dir}/com/comp/cms/cmscontroller"
           destdir="${build.ejb.dir}"
           debug="on"
           deprecation="off"
           optimize="on" >
      <classpath refid="cms.classpath.javac" />
      <include name="*.java"/>
    </javac>
  </target>

  <target name="test2">
    <javac srcdir="${cms.java.dir}/com/comp/cms/cmscontroller"
           destdir="${build.ejb.dir}"
           debug="on"
           deprecation="off"
           optimize="on" >
      <classpath refid="cms.classpath.javac" />
      <include name="*.java"/>
    </javac>
  </target>

  <target name="test3" depends="test1,test2">
	<echo> message="test1 and test2 done"</echo>
  </target>
</project>

------------------------------------------------------------------------D:/Dev/CMS>ant
-verbose -buildfile cms_build_new.xml test3
security properties not found. using defaults.
Ant version 1.2 compiled on October 24 2000

Buildfile: cms_build_new.xml
Detected Java Version: 1.3
Detected OS: Windows 2000
Project base dir set to: D:/Dev/CMS
 [property] Loading C:/Documents and Settings/USER/.cms.properties
 [property] Unable to find C:/Documents and
Settings/USER/.cms.properties
Build sequence for target `test3' is [prepare,
check_for_optional_packages, test1, test2, test3]
Complete build sequence is [prepare, check_for_optional_packages,
test1, test2, test3]
can't open D:/Apps/jdk1.3/lib/tzmappings.
[available] java.lang.ClassNotFoundException: junit.framework.TestCase
[available] java.lang.ClassNotFoundException:
com.oroinc.net.ftp.FTPClient
    [javac] Compiling 3 source files to D:/dev/cms/build/ejb
    [javac] Using modern compiler
    [javac] Compilation args: -d D:/dev/cms/build/ejb -classpath
D:/dev/cms/build/ejb;D:/Apps/jdk1.3/lib/tools.jar;D:/Ap
ps/j2sdkee1.21/lib/j2ee.jar;D:/Apps/wls60/lib/weblogic_sp.jar;D:/Apps/wls60/lib/weblogic.jar;D:/Apps/ant/lib/ant.jar;D:/
Apps/ant/lib/jaxp.jar;D:/Apps/ant/lib/parser.jar -sourcepath
D:/dev/cms/java/com/comp/cms/cmscontroller -g -O
    [javac] Files to be compiled:
    D:/dev/cms/java/com/comp/cms/cmscontroller/CmsController.java
    D:/dev/cms/java/com/comp/cms/cmscontroller/CmsControllerEJB.java
    D:/dev/cms/java/com/comp/cms/cmscontroller/CmsControllerHome.java

    [javac] Compiling 3 source files to D:/dev/cms/build/ejb
    [javac] Using modern compiler
    [javac] Compilation args: -d D:/dev/cms/build/ejb -classpath
D:/dev/cms/build/ejb;D:/Apps/jdk1.3/lib/tools.jar;D:/Ap
ps/j2sdkee1.21/lib/j2ee.jar;D:/Apps/wls60/lib/weblogic_sp.jar;D:/Apps/wls60/lib/weblogic.jar;D:/Apps/ant/lib/ant.jar;D:/
Apps/ant/lib/jaxp.jar;D:/Apps/ant/lib/parser.jar -sourcepath
D:/dev/cms/java/com/comp/cms/cmscontroller -g -O
    [javac] Files to be compiled:
    D:/dev/cms/java/com/comp/cms/cmscontroller/CmsController.java
    D:/dev/cms/java/com/comp/cms/cmscontroller/CmsControllerEJB.java
    D:/dev/cms/java/com/comp/cms/cmscontroller/CmsControllerHome.java

 message="test1 and test2 done"

BUILD SUCCESSFUL


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

Mime
View raw message