Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Publish deletes read-only files
Publish deletes read-only files [message #227552] Mon, 09 February 2009 00:53 Go to next message
Eclipse User
Originally posted by: nowhere.a.com

My web app creates XML files within the WEB-INF directory
structure.This is on a Windows machine.

When I make a change to the source code, WPT updates the web app files
within the Tomcat directory structure. This includes deleting
extraneaous files. Basically a mirror is being done. This is as it
should be.

But, if I set a file as read-only after it is created, then I do want
that file to survive a publish. I want the file to be there the next
time my web app runs.

However WPT still deletes the file. It must be deliberate as the
initial delete must fail, and the file must be then set by WPT as
writeable before it is deleted.

So this is a defined behaviour. Why?

--
Wojtek :-)
Re: Publish deletes read-only files [message #227553 is a reply to message #227552] Mon, 09 February 2009 02:28 Go to previous messageGo to next message
Eclipse User
Originally posted by: nowhere.a.com

Wojtek wrote :
> I want the file to be there the next time my web app runs.

Ok, I found a work-around. I created a batch file which copies the
files from the Tomcat directory to the source directory, then set I the
batch file up as a builder. I then made it the first builder.

So now the batch file runs and the files are copied, THEN the project
gets built and published.

--
Wojtek :-)
Re: Publish deletes read-only files [message #227559 is a reply to message #227552] Mon, 09 February 2009 13:15 Go to previous messageGo to next message
Larry Isaacs is currently offline Larry Isaacs
Messages: 1308
Registered: July 2009
Senior Member
Wojtek wrote:
> My web app creates XML files within the WEB-INF directory structure.This
> is on a Windows machine.
>
> When I make a change to the source code, WPT updates the web app files
> within the Tomcat directory structure. This includes deleting
> extraneaous files. Basically a mirror is being done. This is as it
> should be.
>
> But, if I set a file as read-only after it is created, then I do want
> that file to survive a publish. I want the file to be there the next
> time my web app runs.
>
> However WPT still deletes the file. It must be deliberate as the initial
> delete must fail, and the file must be then set by WPT as writeable
> before it is deleted.
>
> So this is a defined behaviour. Why?
>

With respect to projects, its publishing's task to synchronize the
published content with the project. If there is something in the
published content that doesn't exist in the project, it is assumed to
have been deleted from the project and needs to be deleted from the
published content.

Cheers,
Larry
Re: Publish deletes read-only files [message #227569 is a reply to message #227559] Mon, 09 February 2009 15:59 Go to previous message
Eclipse User
Originally posted by: nowhere.a.com

Larry Isaacs wrote :
> Wojtek wrote:
>> So this is a defined behaviour. Why?
>>
>
> With respect to projects, its publishing's task to synchronize the published
> content with the project. If there is something in the published content
> that doesn't exist in the project, it is assumed to have been deleted from
> the project and needs to be deleted from the published content.

Ok, I can see that. Though a file marked as read only could be
considered a deliberate, user created exception to the rule.

Anyway I have a workable solution.

Thanks

--
Wojtek :-)
Previous Topic:getting webcontent folder from IDataModel is not consistent
Next Topic:Trying to incorporate WST XML editor into RCP application and open for a disk file
Goto Forum:
  


Current Time: Wed Oct 22 12:20:41 GMT 2014

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

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