Skip to main content



      Home
Home » Newcomers » Newcomers » Questions about what files to source control/workspaces in general
Questions about what files to source control/workspaces in general [message #177728] Tue, 31 October 2006 15:02 Go to next message
Eclipse UserFriend
Originally posted by: lonewolf32us.yahoo.com

I am using Eclipse to start a new project. Once it is done, I need to
be able to source control everything necessary so that the entire
project can be built on another PC. No development needs to be done on
the other PC, just need to build class files from java files. In
addition I have a general question about workspaces.

- Should I bother with Eclipse on the build machine? It seems to me
that javac.exe is just as good... What would be the reason for me to
install Eclipse on the build machine, if any?

- If yes, then what files do I need to source control, other than my
..java files? I see these files like .project that Eclipse creates but I
am not sure to what extent their importance is, where they are stored, etc.

- Regarding the Eclipse "workspace". I am unsure to its intent. Should
I have ALL my work be in subfolders under this directory:
c:\workspace <workspace dir>
c:\workspace\proj1
c:\workspace\proj2

or do I want a seperate workspace for each of my projects, i.e. when I
open Eclipse I select the corresponding workspace of the project I want
to work on?
c:\proj1 <workspace dir>
c:\proj2 <another workspace dir>

Thanks!
Dave
Re: Questions about what files to source control/workspaces in general [message #177736 is a reply to message #177728] Tue, 31 October 2006 15:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wayne.beaton._NOSPAM_eclipse.org

Dave Ludwig wrote:
> I am using Eclipse to start a new project. Once it is done, I need to
> be able to source control everything necessary so that the entire
> project can be built on another PC. No development needs to be done on
> the other PC, just need to build class files from java files. In
> addition I have a general question about workspaces.
>
> - Should I bother with Eclipse on the build machine? It seems to me
> that javac.exe is just as good... What would be the reason for me to
> install Eclipse on the build machine, if any?

If you don't need Eclipse on the machine (i.e. you're not using any
features of Eclipse), you don't need it. I assume that the "build"
machine will be doing unattended automated builds and that you're
probably going to use something like Ant or Maven to do those builds. I
am further assuming that you're just building Java applications (i.e.
not Eclipse RCP applications or plug-ins). If all these assumptions are
true, you don't need Eclipse on the build machine.

> - If yes, then what files do I need to source control, other than my
> .java files? I see these files like .project that Eclipse creates but I
> am not sure to what extent their importance is, where they are stored, etc.

You should source control all the files in your Eclipse projects,
including the .project and .classpath. Set up your build to ignore these
files. Eclipse uses these files at development time and it will be a
pain in the rear to have to rebuild these if you move to a new machine
or have to rebuild the old one.

> - Regarding the Eclipse "workspace". I am unsure to its intent. Should
> I have ALL my work be in subfolders under this directory:
> c:\workspace <workspace dir>
> c:\workspace\proj1
> c:\workspace\proj2
>
> or do I want a seperate workspace for each of my projects, i.e. when I
> open Eclipse I select the corresponding workspace of the project I want
> to work on?
> c:\proj1 <workspace dir>
> c:\proj2 <another workspace dir>

Very often, an application is a composition of multiple projects. In
Java terms, you can think of a project as something that will package
into a JAR (while this isn't necessarily the case, it often is the case)
and a single workspace as a holder of all the projects that make up your
application. That is, you're probably well off with a single workspace.

I tend to use different workspaces for different tasks. I have, for
example, a number of sample applications that I have built. These are
all maintained together in a single workspace. I have another workspace
for website work that I do on the eclipse.org site. I have a third
workspace for personal stuff. I make new workspaces whenever I do a
demonstration. Of course, there's no reason why I couldn't just use a
single workspace for everything.

> Thanks!
> Dave

HTH

Wayne
Re: Questions about what files to source control/workspaces in general [message #177881 is a reply to message #177728] Wed, 01 November 2006 12:08 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

Dave Ludwig wrote:
> - Regarding the Eclipse "workspace". I am unsure to its intent. Should
> I have ALL my work be in subfolders under this directory:
> c:\workspace <workspace dir>
> c:\workspace\proj1
> c:\workspace\proj2
>
> or do I want a seperate workspace for each of my projects, i.e. when I
> open Eclipse I select the corresponding workspace of the project I want
> to work on?
> c:\proj1 <workspace dir>
> c:\proj2 <another workspace dir>

As you probably have noticed, you can do it either way (or other ways).
I used to keep all projects under the workspace directory, my thought
being that it was easier to be organized that way when I wanted/needed
to manipulate things from outside Eclipse.
Lately, however, I have changed to keeping project contents "where they
belong" on my file system, which often means outside the workspace
directory. For example, my currently open workspace has only one project
contained under it, although I have 4 other projects in that Workbench
that are located elsewhere.

Here's an example:

/
Java/
Eclipse/
3.2+WTP/
3.1/
extensions/
<third-party plugins live here>
workspaces/
3.2+WTP/
<might be some projects in here>
3.1/
<might be some projects in here>
sharedProjects/
<some projects that live in
multiple workspaces,
like Sandbox and ThirdPartySource>

Elsewhere on file system:
SomeProject/
<Non-Eclipse project-related files>
eclipse/
ProjectName/
.project
.classpath
<other Eclipse project files>

My workbench has several projects like SomeProject that live outside the
workspace directory. Whether I root a project in the workspace directory
or elsewhere depends on whether or not there are other files or
operations outside of Eclipse that I want to keep associated with that
Eclipse Project.

Hope his helps,
Eric
Previous Topic:How can I prevent warnings not to be written in th log file from eclipse Product
Next Topic:Update Manager
Goto Forum:
  


Current Time: Tue May 06 15:12:54 EDT 2025

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

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

Back to the top