Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » how to supress unwanted deletion of files on publishing?
how to supress unwanted deletion of files on publishing? [message #997673] Tue, 08 January 2013 14:29 Go to next message
Tilo Thiele is currently offline Tilo ThieleFriend
Messages: 14
Registered: March 2010
Junior Member
Our webapp creates files during startup and running which are not part of the eclipse project. These files are highly dynamic and therefor they can't be integrated
into the project.

During (auto)publish these files get deleted in tomcat and our app runs into inconsistencies.

I can't imagine there is no way to avoid this - but I can't find it either.

However, is this possible?
Re: how to supress unwanted deletion of files on publishing? [message #998355 is a reply to message #997673] Wed, 09 January 2013 21:24 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry IsaacsFriend
Messages: 1354
Registered: July 2009
Senior Member
On 1/8/2013 9:29 AM, Tilo Thiele wrote:
> Our webapp creates files during startup and running which are not part
> of the eclipse project. These files are highly dynamic and therefor they
> can't be integrated
> into the project.
>
> During (auto)publish these files get deleted in tomcat and our app runs
> into inconsistencies.
>
> I can't imagine there is no way to avoid this - but I can't find it either.
>
> However, is this possible?

Publishing is responsible synchronizing the published webapp with what
is in your project. If a file exists in the published webapp, it is
assumed that it existed in your project and was deleted. Therefore, it
needs to be deleted from the published webapp. I don't know any
practical way around this required behavior.

However, it might work to enable Tomcat's "anti-resource locking"
feature. I think this works by making a separate copy of the webapp and
serves the copy to avoid locking files in the original webapp. If this
is accurate, it would prevent publishing from seeing your dynamically
created files. It does imply that if a change is made in the project,
the webapp will have to be reloaded or Tomcat restarted before any
published change will be copied to the separate copy that gets served.

Cheers,
Larry
Re: how to supress unwanted deletion of files on publishing? [message #1005404 is a reply to message #997673] Fri, 25 January 2013 09:41 Go to previous message
Wojtek  is currently offline Wojtek Friend
Messages: 47
Registered: August 2011
Member
Tilo Thiele wrote :
> Our webapp creates files during startup and running which are not part of the
> eclipse project. These files are highly dynamic and therefor they can't be
> integrated
> into the project.
>
> During (auto)publish these files get deleted in tomcat and our app runs into
> inconsistencies.
>
> I can't imagine there is no way to avoid this - but I can't find it either.
>
> However, is this possible?

I created a batch file which copied the "live" files into the
appropriate "development" directory. I then added the batch file to the
projects properties/builders, and made sure it ran before the publish

So the sequence of events is:
- copy the files
- publish deletes the files
- publish "sees" the files and then copies them over

Yes, it is redundant, but it gets around the issue

--
Wojtek :-)
Previous Topic:No JSP Editor
Next Topic:Variable
Goto Forum:
  


Current Time: Thu Apr 25 09:37:09 GMT 2024

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

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

Back to the top