ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erwin.de....@belgacom.be
Subject RE: copying files
Date Tue, 03 Jun 2003 15:13:23 GMT
OK, time to re-cap:


- you have a src dir
- in there, you have packages nl.fuse.gui and nl.fuse.base

then, do you have the following src code for gui1?

-------------
package nl.fuse.gui;

import nl.fuse.base.base1;

public class gui1 {
...

	base1 aBase1Object = new base1();
...
}
-------------

and similar for the other dependencies?

The classpath entry is not needed here. 
Or do you also use other classes/symbols that are not in your own source
code, but in some jars?
If not, this should work straight away.

You should try eclipse (www.eclipse.org) or some other good IDE. 
It will show immediately in your code where the problems are, and it will
propose quick fixes.

Then you can use ANT to automate your releases and testing.

CHeers

Erwin

-----Original Message-----
From: Bertjan Broeksema [mailto:b.broeksema@home.nl]
Sent: 03 June 2003 16:56
To: Ant Users List
Subject: Re: copying files


I did also the imports, and this is my buildfile now:

<project default="compile" name="Wijkwerk" basedir=".">
	<description>
		FuSE LogoXP BuildFile.
		
		Written by: B. Broeksema
	</description>
	
	<property name="src.dir" value="src"/>
	<property name="classes.dir" value="build"/>

	<target name="compile">
		<javac  srcdir="${src.dir}" 
			destdir="${classes.dir}"
			classpath="{src.dir}/nl"/>
	</target>
</project>

I added the classpath option but is doesn't help anything.

On Tuesday 03 June 2003 16:45, erwin.de.ley@belgacom.be wrote:
> Bertjan,
>
> Did you use an IDE (e.g. eclipse)? It would indicate symbol resolution
> problems directly in your editor (and create the necessary import
> statements to resolve them).
>
> I suspect  you need to add an import statement in your source code, e.g.
in
> gui1.java
>
> package gui;
>
> import base.base1;
>
> public class gui1 {
> ...
> }
>
> and likewise in your other classes with similar dependencies.
>
> Cheers
>
> Erwin
>
> -----Original Message-----
> From: Bertjan Broeksema [mailto:b.broeksema@home.nl]
> Sent: 03 June 2003 16:34
> To: Ant Users List
> Subject: Re: copying files
>
>
> Hehe this is all nice and well. But i did forget an problem that's back
> now.
>
> I've a couple of files in difrent packages that are two way dependence.
And
> that keeps giving me problems.
>
> i now have:
> |- nl
> |
>    |- fuse
>    |
>       |- gui
> 	 |
> 	 |- gui1.java
> 	 |- gui2.java
> 	 |
>       |- base
> 	 |
> 	 |- base1.java
> 	 |- base2.java
>
> In the java files, i writed the package syntax (gui1.java => package
> nl.fuse.gui). But the gui1.java creates an instance of base1.java and vice
> versa. So when i try to compile i get very much "cannot resolve symbol"
> errors. What to do now?
>
> grtz,
>
> Bertjan
>
> On Tuesday 03 June 2003 15:49, Tharp, Joshua L, SOLGV wrote:
> > > A until now i just worked with directory's, but maybe it's a pretty
> >
> > good
> >
> > > idea to make it a package. Can u give me an example on how to handle
> >
> > if it
> >
> > > is a package?
> >
> > Sure.
> >
> > SUN recommends that you package things based on the URL of your company.
> > This policy helps to prevent name collisions if the package will end up
> > somewhere public. If your software is just for internal consumption, or
> > will never be built on in a public sort of way, then you can disregard
> > that. However, it is still useful to have a top-level package. Let's say
> > that you have three components that you are working on, model, view, and
> > controller. You should have a directory structure like this:
> > src
> >
> >   |- nl
> >   |
> >      |- home
> >      |
> >         |- model
> >         |- view
> >         |- controller
> >
> > Now any source that you put in the model directory should have a package
> > statement in the file (first non-comment line is pretty standard).
> > package nl.home.model;
> > Likewise any source you put in the view directory would have the package
> > statement:
> > package nl.home.view;
> >
> > I see that Jan has just replied as well, so you can use his build.xml
> > snippit.
> >
> > The compiler will then create the output directories that look just like
> > the ones in the source tree.
> >
> > Josh
> >
> >
> > ---------------------------------------------------------------------
> > 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
>
> **** DISCLAIMER ****
> "This e-mail and any attachments thereto may contain information
> which is confidential and/or protected by intellectual property
> rights and are intended for the sole use of the recipient(s) named above.
> Any use of the information contained herein (including, but not limited
to,
> total or partial reproduction, communication or distribution in any form)
> by persons other than the designated recipient(s) is prohibited.
> If you have received this e-mail in error, please notify the sender either
> by telephone or by e-mail and delete the material from any computer.
> Thank you for your cooperation."
>
>
> ---------------------------------------------------------------------
> 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

**** DISCLAIMER **** 
"This e-mail and any attachments thereto may contain information 
which is confidential and/or protected by intellectual property 
rights and are intended for the sole use of the recipient(s) named above. 
Any use of the information contained herein (including, but not limited to, 
total or partial reproduction, communication or distribution in any form) 
by persons other than the designated recipient(s) is prohibited. 
If you have received this e-mail in error, please notify the sender either 
by telephone or by e-mail and delete the material from any computer. 
Thank you for your cooperation."


Mime
View raw message