[jbosstools-issues] [JBoss JIRA] (JBIDE-23872) Tools clear war deployed files

Rob Stryker (JIRA) issues at jboss.org
Thu Mar 9 11:54:00 EST 2017


    [ https://issues.jboss.org/browse/JBIDE-23872?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13375546#comment-13375546 ] 

Rob Stryker commented on JBIDE-23872:
-------------------------------------

Found the error :D   (I'll wait for the cheering to stop... ... oka... no really oka... no you can stop cheeri...  :: waits longer ::  ... ok thanks.)

So the root cause is a bit weird, but, when workspace restarts with this archetype, somehow the maven tools are sending resource change events to the 3 child projects and NOT the root ear project. 

Then... some kinda buggy code in wtp says, hey, this resource has changed... so let's mark its module as having changed also! WTP then sets the module publish states for these child modules to 'incremental', on only the child modules, not the parent. 

So we get 4 publish requests:
ear:  full publish
child 1: incremental
child 2: incremental
child 3: incremental

Like a dummy, we take the full publish request on the ear literally, and delete the entire file tree. Then, we get an incremental publish request on the children, so we only update those files marked as changed, which is only a subset of what should be there (but we wiped out the directory). 

The fix in teh attached PR is that, when we wipe a folder, we should 100% mark the child modules as now requiring a full publish. 

I will also consider sending an upstream patch as well, since I think their behavior is a bit wrong. (It sets the module to requiring an incremental publish when previous state was 'unknown', but 'unknown' could actually mean the module needs a full publish, so setting it down to incremental is not safe). 

I added a unit test too :D  

https://github.com/jbosstools/jbosstools-server/pull/474
https://github.com/jbosstools/jbosstools-server/pull/475

> Tools clear war deployed files
> ------------------------------
>
>                 Key: JBIDE-23872
>                 URL: https://issues.jboss.org/browse/JBIDE-23872
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 4.4.2.Final
>         Environment: Windows 7 64
> JDK 8
> Eclipse Neon 1
> JBoss Tools 4.4
> WildFly 10.1
>            Reporter: Claudio Weiler
>            Assignee: Rob Stryker
>             Fix For: 4.4.4.AM1
>
>         Attachments: publish.log
>
>
> After an Eclipse start war deployed files are deleted and not republished.
> I have created a system lock to one of the html resources to try to dig more infos, but the exception shown refers to another resource:
> "Error renaming D:\Aplic\wildfly-10.1.0\standalone\tmp\tmp7250132485298982117.MF to D:\Aplic\wildfly-10.1.0\standalone\deployments\testing-ear.ear\META-INF\MANIFEST.MF."



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbosstools-issues mailing list