You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Mark Salter <ma...@talktalk.net> on 2008/12/18 19:59:31 UTC
Re: Ant Junit issues - CLASSPATH
Marshall_Daniel@emc.com wrote:
> Sure I can give you some of it. It looks like its dropping my source
> paths but I don't know why.
It is dropping directories called:-
C:\Build\build\src\com\emc\elms\keygen
C:\Build\build\src\com\emc\elms\test
C:\Build\build\src\com\emc\elms\keygen
C:\Build\build\src\com\emc\elms\test
C:\Build\build\src\com\emc\elms\keygen
C:\Build\build\src\com\emc\elms\test
C:\Build\build\src\com\emc\elms\keygen
C:\Build\build\src\com\emc\elms\test
as they do not exist? You are compiling your src files into
c:\Build\build\classes, so you may find that c:\Build\build\src does not
exist on your machine?
I think your classpath for junit need only be :-
<classpath>
<pathelement location="${classes.dir}"/>
</classpath>
as that is where javac is placing your class files? I assuming you are
compiling the EMCLmcryptKeyGeneratorTest.java into classes.dir?
If a class is called com.emc.elms.test.EMCLmcryptKeyGeneratorTest
then this class file might be found somewhere like:-
c:\Build
\build
\classes
\com
\emc
\elms
\test\EMCEMCLmcryptKeyGeneratorTest.class
To find this class, the java classpath would be :-
<classpath>
<pathelement location="c:\Build\build\classes"/>
</classpath>
So in summary...
- you are specifying too deep a level of directory.
Do a search for +java +classpath, I got :-
http://en.wikipedia.org/wiki/Classpath_(Java)
Which also decribes class file placement relative to the
classpath folder
- you are specifying src directories when perhaps only the classes ones
are needed.
--
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Ant Junit issues - CLASSPATH
Posted by Mark Salter <ma...@talktalk.net>.
Marshall_Daniel@emc.com wrote:
> Thank you Mark I will take a look. I caught and fixed the folder issue
> but It still is not finding the class.
Did you change the classpath specification to remove the extra levels
into the junit task as well?
> If a class is called com.emc.elms.test.EMCLmcryptKeyGeneratorTest
>
> then this class file might be found somewhere like:-
>
> c:\Build
> \build
> \classes
> \com
> \emc
> \elms
> \test\EMCEMCLmcryptKeyGeneratorTest.class
>
> To find this class, the java classpath would be :-
>
> <classpath>
> <pathelement location="c:\Build\build\classes"/>
> </classpath>
>
> So in summary...
>
> - you are specifying too deep a level of directory.
> Do a search for +java +classpath, I got :-
> http://en.wikipedia.org/wiki/Classpath_(Java)
> Which also decribes class file placement relative to the
> classpath folder
> - you are specifying src directories when perhaps only the classes ones
> are needed.
>
--
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Ant Junit issues - CLASSPATH
Posted by Ma...@emc.com.
Thank you Mark I will take a look. I caught and fixed the folder issue
but It still is not finding the class.
-Dan
-----Original Message-----
From: Mark Salter [mailto:marksalter@talktalk.net]
Sent: Thursday, December 18, 2008 2:00 PM
To: Ant Users List
Subject: Re: Ant Junit issues - CLASSPATH
Marshall_Daniel@emc.com wrote:
> Sure I can give you some of it. It looks like its dropping my source
> paths but I don't know why.
It is dropping directories called:-
C:\Build\build\src\com\emc\elms\keygen
C:\Build\build\src\com\emc\elms\test
C:\Build\build\src\com\emc\elms\keygen
C:\Build\build\src\com\emc\elms\test
C:\Build\build\src\com\emc\elms\keygen
C:\Build\build\src\com\emc\elms\test
C:\Build\build\src\com\emc\elms\keygen
C:\Build\build\src\com\emc\elms\test
as they do not exist? You are compiling your src files into
c:\Build\build\classes, so you may find that c:\Build\build\src does not
exist on your machine?
I think your classpath for junit need only be :-
<classpath>
<pathelement location="${classes.dir}"/>
</classpath>
as that is where javac is placing your class files? I assuming you are
compiling the EMCLmcryptKeyGeneratorTest.java into classes.dir?
If a class is called com.emc.elms.test.EMCLmcryptKeyGeneratorTest
then this class file might be found somewhere like:-
c:\Build
\build
\classes
\com
\emc
\elms
\test\EMCEMCLmcryptKeyGeneratorTest.class
To find this class, the java classpath would be :-
<classpath>
<pathelement location="c:\Build\build\classes"/>
</classpath>
So in summary...
- you are specifying too deep a level of directory.
Do a search for +java +classpath, I got :-
http://en.wikipedia.org/wiki/Classpath_(Java)
Which also decribes class file placement relative to the
classpath folder
- you are specifying src directories when perhaps only the classes ones
are needed.
--
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org