[jbosstools-issues] [JBoss JIRA] Commented: (JBIDE-6024) JBoss AS adapter deploys only recently changed files and removes everithing else

Denis Golovin (JIRA) jira-events at lists.jboss.org
Tue Mar 9 20:05:59 EST 2010


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

Denis Golovin commented on JBIDE-6024:
--------------------------------------

I have fixed this issue or part of it locally. Problem was in EAR, EJB and WAR modules "publish state". For some reason when EAR gets "full publish event"  and changes state to "fullpublish" from WTP EJB or WAR modules might be in "incremental publish" state. That forces JstPublisher nuke everything in ear-deploy folder and publish all ear content again. Ear content is resources and modules. Resources seems to be published correctly because they have the same publish state as ear but EJB and WAR could be in "Incremental publish" state and that mean only last changes are deployed.

The fix for this is simple:

JstPublisher class should not just blindly call full or incremental publish depending on module publish state but verify if deployment folder exists. If it is then do incremental publish if is not do full publish.

Index: jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
--- jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java	(revision 20695)
+++ jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java	(working copy)
@@ -92,7 +92,11 @@
 				if (publishType == FULL_PUBLISH ) {
 					status = fullPublish(module, module[module.length-1], monitor);	
 				} else if (publishType == INCREMENTAL_PUBLISH) {
-					status = incrementalPublish(module, module[module.length-1], monitor);
+					if(getDeployPath(module, this.server).toFile().isDirectory()) {
+						status = incrementalPublish(module, module[module.length-1], monitor);
+					} else {
+						status =fullPublish(module, module[module.length-1], monitor);
+					}
 				} 
 			}
 		}


> JBoss AS adapter deploys only recently changed files and removes everithing else 
> ---------------------------------------------------------------------------------
>
>                 Key: JBIDE-6024
>                 URL: https://jira.jboss.org/jira/browse/JBIDE-6024
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: JBossAS
>    Affects Versions: 3.1.0.CR2
>         Environment: JBoss Tools 3.1.0.GA candidate v201003050540R-H56-GA
>            Reporter: Denis Golovin
>            Assignee: Rob Stryker
>            Priority: Blocker
>             Fix For: 3.1.1
>
>
> The steps to replicate the issue are explained in this post http://community.jboss.org/message/526847#526847. 
> I cannot confirm yet but it looks like problem should be replicated for any project after couple hours of waiting.
> I was able to get the same problems after I tried to change ad deploy files after 4 hours. Now it happens every time even after restoring deployment with Full Publish action in Servers View

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jbosstools-issues mailing list