Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Eclipse Clean build removing hidden files
Eclipse Clean build removing hidden files [message #176675] Thu, 26 October 2006 09:49 Go to next message
Eclipse UserFriend
Originally posted by: rydtoft.hotmail.com

Hi group,

I use Eclipse and svn. Eclipse builds into a /classes folder which is also
in the svn repository and as such has a .svn sub folder in /classes/.svn

When I use the Clean build option in Eclipse (i.e. Project -> Clean) it
COMPLETELY wipes my /classes folder INCLUDING removing the .svn folder.
This is a problem as the .svn folder should never be deleted.

Is there a way to tell Eclipse to ignore certain folders and/or files when
using the Project -> Clean command?

Cheers Michael
Re: Eclipse Clean build removing hidden files [message #176964 is a reply to message #176675] Fri, 27 October 2006 11:38 Go to previous messageGo to next message
Henrik Wahlberg is currently offline Henrik WahlbergFriend
Messages: 6
Registered: July 2009
Junior Member
Hi Michael
Michael Rydtoft wrote:

> Hi group,

> I use Eclipse and svn. Eclipse builds into a /classes folder which is also
> in the svn repository and as such has a .svn sub folder in /classes/.svn
If it's by coincidence this clashes, I'd move the output folder in the
Eclipse project.

If it's intentional the you plan to store the compiled classes in your
repository, i have no answer, (aprat from rethinking your strategy)

I don't see any reason to store the compiled classes in the repo.
If other persons (users) need access the compiled classes, then you could
consider to let eclipse generate a jar (rightclick project and shoose
export) and deploy it on a shared drive instead.

Other developer would IMO not get access, as their project update would
clean and update the class files instantly :-)
If that did'nt happen, it would be highly possible that the class files
were inconsistent with their source and other class files a assume.

> When I use the Clean build option in Eclipse (i.e. Project -> Clean) it
> COMPLETELY wipes my /classes folder INCLUDING removing the .svn folder.
Yup, IMO highly intentional and should not be changed. :-)

> This is a problem as the .svn folder should never be deleted.

> Is there a way to tell Eclipse to ignore certain folders and/or files when
> using the Project -> Clean command?

> Cheers Michael
Re: Eclipse Clean build removing hidden files [message #177410 is a reply to message #176675] Mon, 30 October 2006 15:02 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse4.rizzoweb.com

Michael Rydtoft wrote:
> Hi group,
>
> I use Eclipse and svn. Eclipse builds into a /classes folder which is
> also in the svn repository and as such has a .svn sub folder in
> /classes/.svn
>
> When I use the Clean build option in Eclipse (i.e. Project -> Clean) it
> COMPLETELY wipes my /classes folder INCLUDING removing the .svn folder.
> This is a problem as the .svn folder should never be deleted.
>
> Is there a way to tell Eclipse to ignore certain folders and/or files
> when using the Project -> Clean command?

I agree with the earlier response that it is not generally a good idea
to include derived content (such as .class files) in the repository. It
goes against what is a widely accepted "best practice" of the
Configuration Management/SCM world.

Having said that, you can probably get things set up to leave the files
alone. There is a Preference setting (under Java > Compiler > Building)
to disable the cleaning of the output directory, which you could use.
The ramification of doing so is that a "clean" build is no longer such -
it will leave behind old files.
You could also set up Eclipse to build into a different directory and
then use a small Ant script to copy the .class files into the directory
that is checked in to SVN.

Still, I would re-think the idea of having the compile output location
be checked in, unless there is some peculiar, specific reason your
project needs it that way.

Hope this helps,
Eric
Previous Topic:Entering Code
Next Topic:Can't unzip eclipse-SDK-3.2.1-win32.zip!
Goto Forum:
  


Current Time: Fri Apr 19 23:11:54 GMT 2024

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

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

Back to the top