title: Wildfly cannot delete deployements files
body: <p>im working with wildfly 14.0 with Netbeans. When i deploy my ear the first time to wildfly  everithing runs ok. But when i try to redeploy it im getting this error:</p>
  
  <pre><code>Initial deploying MetacontratasV4-ear to D:\Wildfly\wildfly-14.0.0.Final\standalone\deployments\MetacontratasV4-ear-1.0.ear Error during incremental deploy: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot delete file MetacontratasV4-web-1.0.war in D:/Wildfly/wildfly-14.0.0.Final/standalone/deployments/MetacontratasV4-ear-1.0.ear.
  </code></pre>
  
  <p>If i remove the files manually it works, but to do so first i have to restart wildfly which its time consuming.
  Its any other way to redeploy an ear without restarting</p>
  
  <p>Im making the deploys throught netbeans interface.</p>
  
  <p>IF you need any configuration file in order to provide more accurate answer feel free to request me it.</p>
  
  <p>UPDATE
  I tryed to deploy the ear using the command line and still getting a similar error
  <a href="https://i.stack.imgur.com/OXSwB.jpg" rel="nofollow noreferrer">error log</a>
  So i tryed adding the --force option which outputs me the following</p>
  
  <pre><code>10:26:26,104 ERROR [org.jboss.as.repository] (management-handler-thread - 1) WFLYDR0010: Couldn't delete content D:\Wildfly\wildfly-14.0.0.Final\standalone\data\content\fa\2a2cb037ddd7d2e0066b475c484505caf64cbb: java.nio.file.DirectoryNotEmptyException: D:\Wildfly\wildfly-14.0.0.Final\standalone\data\content\fa\2a2cb037ddd7d2e0066b475c484505caf64cbb
  at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:266)
  at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
  at java.nio.file.Files.deleteIfExists(Files.java:1165)
  at org.jboss.as.repository.ContentRepositoryImpl.removeContent(ContentRepositoryImpl.java:315)
  at org.jboss.as.server.deployment.DeploymentFullReplaceHandler$1.handleResult(DeploymentFullReplaceHandler.java:190)
  at org.jboss.as.server.deployment.DeploymentHandlerUtils$2.handleResult(DeploymentHandlerUtils.java:165)
  at org.jboss.as.controller.AbstractOperationContext$Step.invokeResultHandler(AbstractOperationContext.java:1533)
  at org.jboss.as.controller.AbstractOperationContext$Step.handleResult(AbstractOperationContext.java:1515)
  at org.jboss.as.controller.AbstractOperationContext$Step.finalizeInternal(AbstractOperationContext.java:1472)
  at org.jboss.as.controller.AbstractOperationContext$Step.finalizeStep(AbstractOperationContext.java:1455)
  at org.jboss.as.controller.AbstractOperationContext$Step.access$400(AbstractOperationContext.java:1319)
  at org.jboss.as.controller.AbstractOperationContext.executeResultHandlerPhase(AbstractOperationContext.java:876)
  at org.jboss.as.controller.AbstractOperationContext.processStages(AbstractOperationContext.java:756)
  at org.jboss.as.controller.AbstractOperationContext.executeOperation(AbstractOperationContext.java:467)
  at org.jboss.as.controller.OperationContextImpl.executeOperation(OperationContextImpl.java:1411)
  at org.jboss.as.controller.ModelControllerImpl.internalExecute(ModelControllerImpl.java:423)
  at org.jboss.as.controller.ModelControllerImpl.lambda$execute$1(ModelControllerImpl.java:243)
  at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:265)
  at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:231)
  at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:243)
  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.doExecute(ModelControllerClientOperationHandler.java:240)
  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler.access$400(ModelControllerClientOperationHandler.java:138)
  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:162)
  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1$1.run(ModelControllerClientOperationHandler.java:158)
  at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:289)
  at org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:246)
  at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
  at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
  at org.jboss.as.controller.remote.ModelControllerClientOperationHandler$ExecuteRequestHandler$1.execute(ModelControllerClientOperationHandler.java:158)
  at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$1.doExecute(ManagementRequestContextImpl.java:70)
  at org.jboss.as.protocol.mgmt.ManagementRequestContextImpl$AsyncTaskRunner.run(ManagementRequestContextImpl.java:160)
  at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
  at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
  at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
  at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
  at java.lang.Thread.run(Thread.java:748)
  at org.jboss.threads.JBossThread.run(JBossThread.java:485)
  </code></pre>
  
  <p>10:26:26,131 INFO  [org.jboss.as.repository] (management-handler-thread - 1) WFLYDR0002: Content removed from location D:\Wildfly\wildfly-14.0.0.Final\standalone\data\content\fa\2a2cb037ddd7d2e0066b475c484505caf64cbb\content</p>