Skip to main content



      Home
Home » Newcomers » Newcomers » Fixed cvs structure and multiple projects
Fixed cvs structure and multiple projects [message #76491] Fri, 10 June 2005 07:16 Go to next message
Eclipse UserFriend
Hi,
I have to work with a fixed cvs structure, something like this;

root
lib
lib2
Projects
p1
build
resources
src
p2
p3

I want to be able to create separate projects for lib, lib2, build, resoures
and src. These would be simple projects accept for src which would be a Java
project.

Is this possible? I mean .. can Eclipse create projects from an existing
structure with out changing that structure?

thank you
Re: Fixed cvs structure and multiple projects [message #76695 is a reply to message #76491] Fri, 10 June 2005 13:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Martin Holmes wrote:
> Hi,
> I have to work with a fixed cvs structure, something like this;
>
> root
> lib
> lib2
> Projects
> p1
> build
> resources
> src
> p2
> p3
>
> I want to be able to create separate projects for lib, lib2, build, resoures
> and src. These would be simple projects accept for src which would be a Java
> project.
>
> Is this possible? I mean .. can Eclipse create projects from an existing
> structure with out changing that structure?

You probably don't really want to have separate Projects for src, build,
and resources. Most Projects will have source, build, lib and other
directories, sometimes depending on other projects for some stuff; that
is what I recommend below...

Here's how I would structure the Eclipse Projects given my understanding
of the structure you have to work with.

Eclipse Project: Libs (create empty project first)
Check out CVS directories lib and lib2 into this Project

Eclipse Project: p1
Check out CVS directory p1 (using Check out as...) and create it as
a new Java Project. Specify "build" as the output directory and "src"
and "resources" as Source Locations, then specify the JARs in Libs
Project as required libraries for Project p1 (see project Properties >
Build Path).

Eclipse Projects p2, p3: Set up similar to p1


I also highly recommend going through the Java Development tutorial that
is included with Eclipse. It will familiarize you with how best to
structure Eclipse projects for Java development.

If you have specific questions after that, feel free to post them.

HTH,
Eric
Re: Fixed cvs structure and multiple projects [message #78179 is a reply to message #76695] Wed, 15 June 2005 12:07 Go to previous messageGo to next message
Eclipse UserFriend
Hi, I am sorry you feel that I am asking too many questions. But to be
honest I feel they are valid questions which I could not find the answers to
via the documentation. Perhaps I am writing to the wrong newsgroup?

When you mentioned Java Development Tutorial did you mean this one "Creating
a simple Java Application". I found no information on structuring projects
here.

Unfortunately the fixed project structure that I mentioned before is built
via Ant and uses a script that I cannot change. It also relies on the fixed
structure remaining unchanged. Therefore I am happy to break up this
structure in terms of projects but the real issue is doing it whilst
maintaining the original structure.

I agree that on one hand it makes sense that a project would contain
resources and Java source files, but on the other hand creating a Java
project that contains both of these means that when you open a resource file
it will open in the same perspective as your Java source files. I think it
makes more sense to open Java source files in a Java perspective and
resource files in the resource perspective.

thanks again for your valuable feedback

Martin





"Eric Rizzo" <eclipse@rizzoweb.com> wrote in message
news:d8cjhn$mrh$1@news.eclipse.org...
> Martin Holmes wrote:
> > Hi,
> > I have to work with a fixed cvs structure, something like this;
> >
> > root
> > lib
> > lib2
> > Projects
> > p1
> > build
> > resources
> > src
> > p2
> > p3
> >
> > I want to be able to create separate projects for lib, lib2, build,
resoures
> > and src. These would be simple projects accept for src which would be a
Java
> > project.
> >
> > Is this possible? I mean .. can Eclipse create projects from an existing
> > structure with out changing that structure?
>
> You probably don't really want to have separate Projects for src, build,
> and resources. Most Projects will have source, build, lib and other
> directories, sometimes depending on other projects for some stuff; that
> is what I recommend below...
>
> Here's how I would structure the Eclipse Projects given my understanding
> of the structure you have to work with.
>
> Eclipse Project: Libs (create empty project first)
> Check out CVS directories lib and lib2 into this Project
>
> Eclipse Project: p1
> Check out CVS directory p1 (using Check out as...) and create it as
> a new Java Project. Specify "build" as the output directory and "src"
> and "resources" as Source Locations, then specify the JARs in Libs
> Project as required libraries for Project p1 (see project Properties >
> Build Path).
>
> Eclipse Projects p2, p3: Set up similar to p1
>
>
> I also highly recommend going through the Java Development tutorial that
> is included with Eclipse. It will familiarize you with how best to
> structure Eclipse projects for Java development.
>
> If you have specific questions after that, feel free to post them.
>
> HTH,
> Eric
Re: Fixed cvs structure and multiple projects [message #78512 is a reply to message #78179] Thu, 16 June 2005 11:32 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.rizzoweb.com

Martin Holmes wrote:
> Hi, I am sorry you feel that I am asking too many questions. But to be
> honest I feel they are valid questions which I could not find the answers to
> via the documentation. Perhaps I am writing to the wrong newsgroup?

Did I say you were asking too many questions? Please go back and re-read
my post, because that is neither what I wrote nor what I intended to imply.

>
> When you mentioned Java Development Tutorial did you mean this one "Creating
> a simple Java Application". I found no information on structuring projects
> here.

No, that tutorial isn't the best. I was thinking of the Help topics
"Project configuration tutorial" and "Basic tutorial" (found under "Java
Development User Guide").

>
> Unfortunately the fixed project structure that I mentioned before is built
> via Ant and uses a script that I cannot change. It also relies on the fixed
> structure remaining unchanged. Therefore I am happy to break up this
> structure in terms of projects but the real issue is doing it whilst
> maintaining the original structure.

That was my assumption in the recommendation I made. I did not suggest
changing the underlying structure, just how to build Eclipse Projects
that work with it.


> I agree that on one hand it makes sense that a project would contain
> resources and Java source files, but on the other hand creating a Java
> project that contains both of these means that when you open a resource file
> it will open in the same perspective as your Java source files. I think it
> makes more sense to open Java source files in a Java perspective and
> resource files in the resource perspective.

I think you're placing too much emphasis on the perspectives in that
case. Here's why:
a) Each file type will open in its appropriate editor, which is usually
the major concern.
b) You can customize any of the perspectives, for example to create a
hybrid perspective if you commonly use views that are normally in
different perspectives.
c) The user controls which perspective is visible/active, and it is fast
and easy to flip between them.

To demonstrate those 3 points: my usual way of working involves 3
perspectives (each customized to my own preferences): Java Browsing,
Resource (Navigator), and Debug. When I need to find non-Java files, I
switch from Java Browsing to Resource and find the file. When I want to
debug, I switch to Debug. Actually, it's even less work that that; I
have customized Java Browsing to include the keyboard shortcuts for Open
Resource (Ctrl-Shift-R), that way I can easily open any file (Java or
non-Java) from the Java perspective (that is where I spend most of my
time). Also, I sometimes open the Navigator view in Java Browsing or
Debug perspectives and set it to be a Fast View so that I don't have to
change the perspective just to get the Navigator (which is the only part
of Resource perspective that I really use very often).

One more thing: make use of Working Sets to help limit what resources
are viewed, searched, etc. in various views when there are a lot of
files/Projects in your workspace. Help has lots of info on Working Sets.

I hope all this hopes you realize that you can operate on different
types of files regardless of what perspective is active, and that in
turn helps you realize how Projects should be structured to include all
related files.


> thanks again for your valuable feedback
>
> Martin

Glad to help. I'm sure the more you spend time in the environment the
more comfortable you'll become with these ideas.

Eric
Previous Topic:What a horrible steps for a ejb bean.
Next Topic:Is there a 'better' searchable archive?
Goto Forum:
  


Current Time: Tue May 13 19:00:07 EDT 2025

Powered by FUDForum. Page generated in 0.08100 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top