another tip, it is not pretty.
in windows when paths have spaces, you can try using windows short names
if you only have 1 dir that starts with "c:\Program"
then the short name for "Program Files" is "progra~1"
set JAVA_HOME="C:/progra~1/Java/jdk.1.6.0_23"
the "dir /x c:\" can give you the sh
When using fileset, I sometimes need to programmatically set my includes at
build time. Therefore, I use the includes attribute on fileset allowing me to
build up a list of includes separated by commas into an ANT property and then
use it. I need to do something similar for javadoc with my lin
You might try to compute the dir and hand that value to javac...
For example:
Not sure that will fix it...but it may :)
On Mon, 22 Aug 2011, Ego wrote:
I bet basename will yield src?
Exactly. I typed in the following lines, as suggested:
dir = [${basedir.dir}]
base =
> I bet basename will yield src?
Exactly. I typed in the following lines, as suggested:
dir = [${basedir.dir}]
base = [${basedir.basename}]
Side notes:
- versose output contains the line
Project base dir set to: D:\Workspaces\Java
- source code for project's main class begins
I bet basename will yield src?
On Mon, 22 Aug 2011, Ego wrote:
Good news:
yields:
D:\Workspaces\Java\projects\modules
instead of the expected:
D:\Workspaces\Java\projects\modules\src
Surely something's going wrong when processing the includes="" property (or the
nested elements, it's
Good news:
yields:
D:\Workspaces\Java\projects\modules
instead of the expected:
D:\Workspaces\Java\projects\modules\src
Surely something's going wrong when processing the includes="" property (or the
nested elements, it's the same).
Brian,
you can try this as well
C:\Users\Brian>cd C:\AntTest
C:\AntTest>set JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23
C:\AntTest>set ANT_HOME=C:\Ant
C:\AntTest>set path=%JAVA_HOME%\bin
C:\AntTest>java -classpath "%ANT_HOME%\lib\ant-launcher.jar"
-Dant.home=c:\ant org.apache.tools.ant.launch.L
Brian FitzGerald wrote on 22/08/2011 15:42:29:
> When I wrap the variable and value with quotes as Parag suggested it
runs
> the build but still looks for Java in the jre directory.
>
What I do is have a build.bat file that contains something like the
following.
I don't have any spaces in pat
D'oh, I should have guessed the src.dir would emit as it did ;)
How about taking the dirname task on src.dir and echoing that?
If memory serves, when I kick off my its usually from a "root"
directory and not a relative one.
On Mon, 22 Aug 2011, Ego wrote:
Woah, thanks Scot! That's a F
When I wrap the variable and value with quotes as Parag suggested it runs
the build but still looks for Java in the jre directory.
I commented out the echo off line as suggested and this was the output (hope
it's not too annoying that I post the whole thing):
C:\Users\Brian>cd C:\AntTest
C:\AntT
Woah, thanks Scot! That's a FAST reply, and a good one I think.
If nothing else, it helped me to rule out some possible causes of error.
To answer your question, I intend to collect my buildfiles in a separate
folder, sibling to the projects root, and that's the current dir when I fire
"ant".
The right syntax to include a value with spaces for batch files / cmd.exe is:
set "variable=value with spaces"
So, you should have used
set "JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23"
Not sure if this might help you original issue though. Did you try to
comment the echo off line (precede with "
How about putting quotes only around the part with the space?
Alternately, is there an escape for the space? (in some form so Unix "\
" works).
On 8/22/11 9:57 AM, Brian FitzGerald wrote:
Thanks for the help guys... this is what I got:
WITH QUOTES:
C:\Users\Brian>cd C:\AntTest
C:\AntTest>set
Thanks for the help guys... this is what I got:
WITH QUOTES:
C:\Users\Brian>cd C:\AntTest
C:\AntTest>set JAVA_HOME="C:\Program Files\Java\jdk.1.6.0_23"
C:\AntTest>set ANT_HOME="C:\Ant"
C:\AntTest>%ANT_HOME%\bin\ant
The syntax of the command is incorrect.
WITHOUT QUOTES:
C:\Users\Brian>cd C:\AntTe
Santanu Basu wrote on 22/08/2011 14:07:02:
> Have you done this?
>
> C:\Users\Brian>cd C:\AntTest
> C:\AntTest>set JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23
> C:\AntTest>set ANT_HOME=C:\Program Files\Apache Software
> Foundation\apache-ant-1.8.2
> C:\AntTest>%ANT_HOME%\bin\ant
>
> The above
Have you done this?
C:\Users\Brian>cd C:\AntTest
C:\AntTest>set JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23
C:\AntTest>set ANT_HOME=C:\Program Files\Apache Software
Foundation\apache-ant-1.8.2
C:\AntTest>%ANT_HOME%\bin\ant
The above should work. Which version of Ant you are using?
Thanks,
Sant
Thank you for the response, Santanu.
> Do you have the build.xml in the directory from where you are running ant?
> How you are calling ant?
I didn't before, but since you mentioned it I grabbed a simple hello world
build file and put that in a directory called C:\AntTest -- I am calling
Ant fro
Do you have the build.xml in the directory from where you are running ant?
How you are calling ant?
You can create a script and set the java_home just before calling
%ANT_HOME%/bin/ant.
set JAVA_HOME=C:\Program Files\Java\jdk.1.6.0_23
set ANT_HOME=C:\Program Files\Apache Software Foundation\apac
I have set JAVA_HOME and ANT_HOME environment variables as well as adding
%JAVA_HOME%\bin and %ANT_HOME\bin to the PATH environment variable.
When I echo JAVA_HOME, I get the value I expect:
C:\Program Files\Java\jdk.1.6.0_23
When I echo ANT_HOME I get the value I expect:
C:\Program Files\Apache
19 matches
Mail list logo