ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Weird problem with setting variables
Date Tue, 22 Feb 2005 16:07:28 GMT
The name for "variables" in Ant is "property".
Properties are immutable - once set their value doesnt change.
The value can be set
a) via command line
   ant -Dname=value
   ant -Dsrc=C:/j2eetutorial14/examples/jaxrpc/src
b) in an external properties file (standard java prop-format) which is
loaded 
   by Ant via the instruction
   <property file="filename"/>

   <property file="build.properties"/>
d) inside the build file
   <property name="j2ee.home" value=".."/>
  

I think there should be a documentation inside your J2EE-Tutorial how to
setup
your build environment. I think you have to provide a build.properties file
containing same base information.
...
But I don´t know that tutorial, so I can´t say anything more about that.


Jan


> -----Ursprüngliche Nachricht-----
> Von: Frank [mailto:fgeck@optonline.net]
> Gesendet am: Dienstag, 22. Februar 2005 14:51
> An: Ant Users List
> Betreff: Weird problem with setting variables
> 
> Just starting to use ant/asant to build examples for web 
> services from 
> sun tutorial. Running into a problem when I run the "asant build" get 
> the following error: 
> 
> compile-client:
>     [echo] Compiling the client source code....
>     [echo] src=src destdir=build
>    [javac] Compiling 1 source file to 
> C:\j2eetutorial14\examples\jaxrpc\statics
> tub\build
> 
> BUILD FAILED
> file:C:/j2eetutorial14/examples/jaxrpc/common/targets.xml:119: C:\lib 
> not found.
> 
> 
> I' running this on XP. The problem appears too be the c:\lib 
> is not the 
> correct path too anything. I think it's suppose too be the classpath. 
> Well in the targets.xml line 119 is the javac line below.
> 
> <target name="compile-client" depends="prepare"
>      description="Compiles the client-side source code"  >
>      <echo message="Compiling the client source code...."/>
>      <echo message="src=${src}    destdir=${build} "/>
>    <javac srcdir="${src}" destdir="${build}">
>        <include name="**/*.java" />
>     <classpath refid="jaxrpc.classpath"/>
>     <classpath path="${build}" />
>    </javac>
>  </target>
> 
> jaxrpc.classpath is set above as follows:
> <path id="jaxrpc.classpath">
>    <fileset dir="${j2ee.home}/lib">
>      <include name="*.jar"/>
>    </fileset>
>  </path>
> 
> But how in the world does j2ee.home get set?  I was told the 
> build.properties file is the place too set this.  Tried that and no 
> effect not he out come.
> 
> I tried changing the targets.xml directly and put in the path 
> too to the 
> JDK installed i.e.
>   <path id="jaxrpc.classpath">
>     <fileset dir="j2sdk1.4_06/lib">
>       <include name="*.jar"/>
>     </fileset>
>   </path>
> 
> 
> Now look at the out put from the compile.  What is going on here? I'm 
> totally confused!!!!
> compile-client:
>      [echo] Compiling the client source code....
>      [echo] src=src destdir=build
>     [javac] Compiling 1 source file to 
> C:\j2eetutorial14\examples\jaxrpc\statics
> tub\build
> 
> BUILD FAILED
> file:C:/j2eetutorial14/examples/jaxrpc/common/targets.xml:119: 
> C:\j2eetutorial14
> \examples\jaxrpc\staticstub\j2sdk1.4_06\lib not found.
> 
> Why now does all this other patch stuff show up? Is this some type of 
> screwy relative path?
> 
> 
> Thanks,
> 
> Frank
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message