You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by sm...@apache.org on 2007/06/05 18:00:39 UTC

svn commit: r544529 - in /harmony/enhanced/buildtest/branches/2.0: buildtest.bat buildtest.sh

Author: smishura
Date: Tue Jun  5 09:00:38 2007
New Revision: 544529

URL: http://svn.apache.org/viewvc?view=rev&rev=544529
Log:
Fix from HARMONY-3501 for classpath in scripts

Modified:
    harmony/enhanced/buildtest/branches/2.0/buildtest.bat
    harmony/enhanced/buildtest/branches/2.0/buildtest.sh

Modified: harmony/enhanced/buildtest/branches/2.0/buildtest.bat
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/buildtest.bat?view=diff&rev=544529&r1=544528&r2=544529
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/buildtest.bat (original)
+++ harmony/enhanced/buildtest/branches/2.0/buildtest.bat Tue Jun  5 09:00:38 2007
@@ -6,7 +6,7 @@
 @set ANT_OPTS=-XX:MaxPermSize=512m -Xmx1000M -Dhttp.proxyHost=my.proxy.com -Dhttp.proxyPort=1111
 
 @set PATH=%SVN_HOME%\bin;%PATH%;%ANT_HOME%\bin
-@set CLASSPATH=%~dp0\build\classes
+@set CLASSPATH=.;%CD%\build\classes
 
 @call "%COMPILER_CFG_SCRIPT%"
 call ant %* 2>&1

Modified: harmony/enhanced/buildtest/branches/2.0/buildtest.sh
URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/buildtest.sh?view=diff&rev=544529&r1=544528&r2=544529
==============================================================================
--- harmony/enhanced/buildtest/branches/2.0/buildtest.sh (original)
+++ harmony/enhanced/buildtest/branches/2.0/buildtest.sh Tue Jun  5 09:00:38 2007
@@ -6,7 +6,7 @@
 export ANT_OPTS="-XX:MaxPermSize=512m -Xmx700M -Dhttp.proxyHost=my.proxy.com -Dhttp.proxyPort=1111"
 
 export PATH=$SVN_HOME/bin:$PATH:$ANT_HOME/bin
-export CLASSPATH=./build/classes
+export CLASSPATH=.:$PWD/build/classes
 
 $COMPILER_CFG_SCRIPT
 



Re: svn commit: r544529 - in /harmony/enhanced/buildtest/branches/2.0: buildtest.bat buildtest.sh

Posted by Nathan Beyer <nd...@apache.org>.
On 6/7/07, Alexander Kleymenov <kl...@gmail.com> wrote:
> On 6/7/07, Nathan Beyer <nd...@apache.org> wrote:
> > Okay, I see the difference. Wouldn't the '%~dp0' expansion be the most
> > flexible? It would allow proper setup if executed in a different
> > folder?
>
> I've no objection against ~dp (+1).
> But to be more correct here, we should place this path not into
> CLASSPATH, but into PATCHED_ANT_CLASSES and append it to ant launcher
> by means of -lib option.

So, if we do this, then we can remove setting the CLASSPATH in
environment altogether? This seems cleaner and less like magic, which
is always good.

-Nathan
>
> > Why does the current directory (".") need to be in the classpath?
> > I couldn't figure out what's being placed in there.
>
> Some child java processes are launched without -classpath option and
> expect the classes in their cwd (default JVM behaviour). This dot in
> CLASSPATH satisfies these expectations. If we will run ant without
> changes in CLASSPATH this dot won't be needed (as and "SET CLASSPATH"
> itself).
>
> Thanks,
> Alexander
>

Re: svn commit: r544529 - in /harmony/enhanced/buildtest/branches/2.0: buildtest.bat buildtest.sh

Posted by Alexander Kleymenov <kl...@gmail.com>.
On 6/7/07, Nathan Beyer <nd...@apache.org> wrote:
> Okay, I see the difference. Wouldn't the '%~dp0' expansion be the most
> flexible? It would allow proper setup if executed in a different
> folder?

I've no objection against ~dp (+1).
But to be more correct here, we should place this path not into
CLASSPATH, but into PATCHED_ANT_CLASSES and append it to ant launcher
by means of -lib option.

> Why does the current directory (".") need to be in the classpath?
> I couldn't figure out what's being placed in there.

Some child java processes are launched without -classpath option and
expect the classes in their cwd (default JVM behaviour). This dot in
CLASSPATH satisfies these expectations. If we will run ant without
changes in CLASSPATH this dot won't be needed (as and "SET CLASSPATH"
itself).

Thanks,
Alexander

Re: svn commit: r544529 - in /harmony/enhanced/buildtest/branches/2.0: buildtest.bat buildtest.sh

Posted by Nathan Beyer <nd...@apache.org>.
Okay, I see the difference. Wouldn't the '%~dp0' expansion be the most
flexible? It would allow proper setup if executed in a different
folder?

Why does the current directory (".") need to be in the classpath? I
couldn't figure out what's being placed in there. Shouldn't we move
whatever it is to be in the "build/classes" folder or a "build/lib"
folder to keep everything clean.

-Nathan

On 6/6/07, Alexander Kleymenov <kl...@gmail.com> wrote:
> Hi,
>
> On 6/6/07, Nathan Beyer <nd...@apache.org> wrote:
> > Hey, I don't understand this change in the 'buildtest.bat' file below.
> >
> > Why change the '%~dp0' to '.;%CD%'? Was this an over-zealous patch? I
> > added the '%~dp0' myself because the CD is an environment variable
> > that's no set anywhere and '%~dp0' is the expansion for getting the
> > current directory.
>
> %CD% is a dynamic environment variable. It expands to the current
> directory (SET /?) while %~dp0 expands to where the bat file is
> placed. So these notions are almost the same excepting the possibility
> to preset CD variable before .bat execution. I think here this
> difference is not important and if you like %~dp0 you can revert the
> change (but don't forget about dot please).
>
> Thanks,
> Alexander
>

Re: svn commit: r544529 - in /harmony/enhanced/buildtest/branches/2.0: buildtest.bat buildtest.sh

Posted by Alexander Kleymenov <kl...@gmail.com>.
Hi,

On 6/6/07, Nathan Beyer <nd...@apache.org> wrote:
> Hey, I don't understand this change in the 'buildtest.bat' file below.
>
> Why change the '%~dp0' to '.;%CD%'? Was this an over-zealous patch? I
> added the '%~dp0' myself because the CD is an environment variable
> that's no set anywhere and '%~dp0' is the expansion for getting the
> current directory.

%CD% is a dynamic environment variable. It expands to the current
directory (SET /?) while %~dp0 expands to where the bat file is
placed. So these notions are almost the same excepting the possibility
to preset CD variable before .bat execution. I think here this
difference is not important and if you like %~dp0 you can revert the
change (but don't forget about dot please).

Thanks,
Alexander

Re: svn commit: r544529 - in /harmony/enhanced/buildtest/branches/2.0: buildtest.bat buildtest.sh

Posted by Nathan Beyer <nd...@apache.org>.
Hey, I don't understand this change in the 'buildtest.bat' file below.

Why change the '%~dp0' to '.;%CD%'? Was this an over-zealous patch? I
added the '%~dp0' myself because the CD is an environment variable
that's no set anywhere and '%~dp0' is the expansion for getting the
current directory.

-Nathan


On 6/5/07, smishura@apache.org <sm...@apache.org> wrote:
> Author: smishura
> Date: Tue Jun  5 09:00:38 2007
> New Revision: 544529
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=544529
> Log:
> Fix from HARMONY-3501 for classpath in scripts
>
> Modified:
>     harmony/enhanced/buildtest/branches/2.0/buildtest.bat
>     harmony/enhanced/buildtest/branches/2.0/buildtest.sh
>
> Modified: harmony/enhanced/buildtest/branches/2.0/buildtest.bat
> URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/buildtest.bat?view=diff&rev=544529&r1=544528&r2=544529
> ==============================================================================
> --- harmony/enhanced/buildtest/branches/2.0/buildtest.bat (original)
> +++ harmony/enhanced/buildtest/branches/2.0/buildtest.bat Tue Jun  5 09:00:38 2007
> @@ -6,7 +6,7 @@
>  @set ANT_OPTS=-XX:MaxPermSize=512m -Xmx1000M -Dhttp.proxyHost=my.proxy.com -Dhttp.proxyPort=1111
>
>  @set PATH=%SVN_HOME%\bin;%PATH%;%ANT_HOME%\bin
> -@set CLASSPATH=%~dp0\build\classes
> +@set CLASSPATH=.;%CD%\build\classes
>
>  @call "%COMPILER_CFG_SCRIPT%"
>  call ant %* 2>&1
>
> Modified: harmony/enhanced/buildtest/branches/2.0/buildtest.sh
> URL: http://svn.apache.org/viewvc/harmony/enhanced/buildtest/branches/2.0/buildtest.sh?view=diff&rev=544529&r1=544528&r2=544529
> ==============================================================================
> --- harmony/enhanced/buildtest/branches/2.0/buildtest.sh (original)
> +++ harmony/enhanced/buildtest/branches/2.0/buildtest.sh Tue Jun  5 09:00:38 2007
> @@ -6,7 +6,7 @@
>  export ANT_OPTS="-XX:MaxPermSize=512m -Xmx700M -Dhttp.proxyHost=my.proxy.com -Dhttp.proxyPort=1111"
>
>  export PATH=$SVN_HOME/bin:$PATH:$ANT_HOME/bin
> -export CLASSPATH=./build/classes
> +export CLASSPATH=.:$PWD/build/classes
>
>  $COMPILER_CFG_SCRIPT
>
>
>
>