JBoss Tools SVN: r31676 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-31 06:34:11 -0400 (Tue, 31 May 2011)
New Revision: 31676
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
Log:
[JBIDE-9023] extracted AS7 marker util methods to their own file (no deprecation - avoids even more mess - since this is a new API)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 10:26:11 UTC (rev 31675)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 10:34:11 UTC (rev 31676)
@@ -127,9 +127,8 @@
private IStatus removeDeployFailedMarker(IProgressMonitor monitor) {
try {
- IDeployableServer ds = ServerConverter.getDeployableServer(server);
if (DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server)) {
- return DeploymentMarkerUtils.removeDeployFailedMarkerIfExists(method, ds, module, monitor);
+ return DeploymentMarkerUtils.removeDeployFailedMarkerIfExists(method, server, module, monitor);
}
} catch(CoreException ce) {
return ce.getStatus();
@@ -139,10 +138,9 @@
private IStatus removeRemoteDeployment( IPath sourcePath,
IPath destFolder, String name, IProgressMonitor monitor) throws CoreException {
- IDeployableServer ds = ServerConverter.getDeployableServer(server);
try {
if( DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server))
- return DeploymentMarkerUtils.removeDeployedMarkerIfExists(method, ds, module, monitor);
+ return DeploymentMarkerUtils.removeDeployedMarkerIfExists(method, server, module, monitor);
return removeRemoteDeploymentFolder(sourcePath, destFolder, name, monitor);
} catch(CoreException ce) {
return ce.getStatus();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2011-05-31 10:26:11 UTC (rev 31675)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2011-05-31 10:34:11 UTC (rev 31676)
@@ -31,6 +31,7 @@
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
+import org.jboss.ide.eclipse.as.core.util.ServerConverter;
/**
*
@@ -79,9 +80,7 @@
return p.toFile();
}
- public static IStatus removeDeployFailedMarker(
- IServer server, IPath depPath,
- IJBossServerPublishMethod method,
+ public static IStatus removeDeployFailedMarker(IServer server, IPath depPath, IJBossServerPublishMethod method,
IProgressMonitor monitor) throws CoreException {
return removeFile(FAILED_DEPLOY, server, depPath, method, monitor);
}
@@ -95,12 +94,25 @@
return Status.OK_STATUS;
}
+ public static IStatus removeDeployedMarkerIfExists(IJBossServerPublishMethod method, IServer server, IModule[] module, IProgressMonitor monitor)
+ throws CoreException {
+ IDeployableServer deployableServer = ServerConverter.getDeployableServer(server);
+ IPath deployPath = PublishUtil.getDeployPath(method, module, deployableServer);
+ return removeDeployedMarkerIfExists(server, deployPath, method, monitor);
+ }
+
public static IStatus removeDeployedMarkerIfExists(IJBossServerPublishMethod method, IDeployableServer jbServer, IModule[] module, IProgressMonitor monitor)
throws CoreException {
- return removeDeployedMarkerIfExists(
- jbServer.getServer(), PublishUtil.getDeployPath(method, module, jbServer), method, monitor);
+ IPath deployPath = PublishUtil.getDeployPath(method, module, jbServer);
+ return removeDeployedMarkerIfExists(jbServer.getServer(), deployPath, method, monitor);
}
+ public static IStatus removeDeployFailedMarkerIfExists(IJBossServerPublishMethod method, IServer server, IModule[] module,
+ IProgressMonitor monitor) throws CoreException {
+ IDeployableServer deployableServer = ServerConverter.getDeployableServer(server);
+ return removeDeployedMarkerIfExists(method, deployableServer, module, monitor);
+ }
+
public static IStatus removeDeployFailedMarkerIfExists(IJBossServerPublishMethod method, IDeployableServer jbServer, IModule[] module,
IProgressMonitor monitor) throws CoreException {
IPath depPath = PublishUtil.getDeployPath(method, module, jbServer);
13 years, 7 months
JBoss Tools SVN: r31675 - trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-31 06:26:11 -0400 (Tue, 31 May 2011)
New Revision: 31675
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
Log:
[JBIDE-9023] extracted AS7 marker util methods to their own file (no deprecation - avoids even more mess - since this is a new API)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 10:22:32 UTC (rev 31674)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 10:26:11 UTC (rev 31675)
@@ -30,8 +30,6 @@
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
-import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7JSTPublisher;
-import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7Server;
import org.jboss.ide.eclipse.as.core.server.internal.v7.DeploymentMarkerUtils;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
13 years, 7 months
JBoss Tools SVN: r31674 - trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-31 06:22:32 -0400 (Tue, 31 May 2011)
New Revision: 31674
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
Log:
[JBIDE-9023] extracted AS7 marker util methods to their own file (no deprecation - avoids even more mess - since this is a new API)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-05-31 10:08:02 UTC (rev 31673)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-05-31 10:22:32 UTC (rev 31674)
@@ -28,8 +28,6 @@
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
-import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7JSTPublisher;
-import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7Server;
import org.jboss.ide.eclipse.as.core.server.internal.v7.DeploymentMarkerUtils;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
13 years, 7 months
JBoss Tools SVN: r31673 - in trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot: testsuite and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: jpeterka
Date: 2011-05-31 06:08:02 -0400 (Tue, 31 May 2011)
New Revision: 31673
Modified:
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java
trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java
Log:
[hb-bot-test] fixed hibernate console db expansion
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java 2011-05-31 09:49:47 UTC (rev 31672)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testcase/ConsoleTest.java 2011-05-31 10:08:02 UTC (rev 31673)
@@ -160,9 +160,13 @@
private void expandDatabaseInConsole() {
SWTBot viewBot = open.viewOpen(ActionItem.View.HibernateHibernateConfigurations.LABEL).bot();
SWTBotTreeItem console = viewBot.tree().expandNode(Project.PROJECT_NAME);
- bot.sleep(TIME_500MS);
+ bot.sleep(TIME_1S);
+ // Workaround cause node can't be expanded
SWTBotTreeItem db = console.expandNode("Database").select();
- bot.sleep(TIME_500MS);
+ bot.sleep(TIME_1S);
+ db.contextMenu("Refresh").click();
+ bot.sleep(TIME_1S);
+ db.expand();
SWTBotTreeItem pub = null;
try {
pub = db.expandNode("public").select();
Modified: trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java
===================================================================
--- trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java 2011-05-31 09:49:47 UTC (rev 31672)
+++ trunk/hibernatetools/tests/org.jboss.tools.hibernate.ui.bot.test/src/org/jboss/tools/hibernate/ui/bot/testsuite/HibernateTest.java 2011-05-31 10:08:02 UTC (rev 31673)
@@ -46,7 +46,6 @@
@BeforeClass
public static void prepare() {
log.info("Hibernate All Test Started");
- jbt.closeReportUsageWindowIfOpened(true);
util.waitForNonIgnoredJobs();
}
13 years, 7 months
JBoss Tools SVN: r31672 - in trunk/as: tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-31 05:49:47 -0400 (Tue, 31 May 2011)
New Revision: 31672
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTDeploymentWarUpdateXML.java
Log:
[JBIDE-9023] extracted AS7 marker util methods to their own file (no deprecation - avoids even more mess - since this is a new API)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 09:43:09 UTC (rev 31671)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 09:49:47 UTC (rev 31672)
@@ -119,7 +119,7 @@
method.getCallbackHandler(destFolder, server).copyFile(mf, new Path(name),
AbstractServerToolsPublisher.getSubMon(monitor, 150)
);
- if( JBoss7Server.supportsJBoss7MarkerDeployment(server))
+ if( DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server))
DeploymentMarkerUtils.addDeployMarker(method, ServerConverter.getDeployableServer(server), module, monitor);
} catch(CoreException ce) {
return ce.getStatus();
@@ -130,7 +130,7 @@
private IStatus removeDeployFailedMarker(IProgressMonitor monitor) {
try {
IDeployableServer ds = ServerConverter.getDeployableServer(server);
- if (JBoss7Server.supportsJBoss7MarkerDeployment(server)) {
+ if (DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server)) {
return DeploymentMarkerUtils.removeDeployFailedMarkerIfExists(method, ds, module, monitor);
}
} catch(CoreException ce) {
@@ -143,7 +143,7 @@
IPath destFolder, String name, IProgressMonitor monitor) throws CoreException {
IDeployableServer ds = ServerConverter.getDeployableServer(server);
try {
- if( JBoss7Server.supportsJBoss7MarkerDeployment(server))
+ if( DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server))
return DeploymentMarkerUtils.removeDeployedMarkerIfExists(method, ds, module, monitor);
return removeRemoteDeploymentFolder(sourcePath, destFolder, name, monitor);
} catch(CoreException ce) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-05-31 09:43:09 UTC (rev 31671)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-05-31 09:49:47 UTC (rev 31672)
@@ -63,7 +63,7 @@
if( module.length > 1 )
return null;
- if( JBoss7Server.supportsJBoss7MarkerDeployment(server))
+ if( DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server))
return handleJBoss7Deployment(method, server, module, publishType, delta, monitor);
IDeployableServer ds = ServerConverter.getDeployableServer(server);
Modified: trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTDeploymentWarUpdateXML.java
===================================================================
--- trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTDeploymentWarUpdateXML.java 2011-05-31 09:43:09 UTC (rev 31671)
+++ trunk/as/tests/org.jboss.ide.eclipse.as.test/src/org/jboss/ide/eclipse/as/test/publishing/v2/JSTDeploymentWarUpdateXML.java 2011-05-31 09:49:47 UTC (rev 31672)
@@ -12,7 +12,7 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.ServerUtil;
-import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7JSTPublisher;
+import org.jboss.ide.eclipse.as.core.server.internal.v7.DeploymentMarkerUtils;
import org.jboss.ide.eclipse.as.test.util.ServerRuntimeUtils;
import org.jboss.ide.eclipse.as.test.util.wtp.JavaEEFacetConstants;
import org.jboss.ide.eclipse.as.test.util.wtp.OperationTestCase;
@@ -66,7 +66,7 @@
public void testWarUpdateMockPublishMethodJBoss7() throws CoreException, IOException {
server = ServerRuntimeUtils.createMockJBoss7Server();
server = ServerRuntimeUtils.useMockPublishMethod(server);
- testMockPublishMethod(8,1,"newModule.war" + JBoss7JSTPublisher.DEPLOYED);
+ testMockPublishMethod(8,1,"newModule.war" + DeploymentMarkerUtils.DEPLOYED);
}
private void testMockPublishMethod(int initial, int remove, String removedFile) throws CoreException, IOException {
13 years, 7 months
JBoss Tools SVN: r31671 - trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-31 05:43:09 -0400 (Tue, 31 May 2011)
New Revision: 31671
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java
Log:
[JBIDE-9023] extracted AS7 marker util methods to their own file (no deprecation - avoids even more mess - since this is a new API)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2011-05-31 09:41:20 UTC (rev 31670)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2011-05-31 09:43:09 UTC (rev 31671)
@@ -19,6 +19,7 @@
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.wst.server.core.IModule;
@@ -114,5 +115,11 @@
return Status.OK_STATUS;
}
}
+
+ public static boolean supportsJBoss7MarkerDeployment(IServer server) {
+ boolean retval = (server.loadAdapter(IJBoss7Deployment.class, new NullProgressMonitor()) != null);
+ return retval;
+ }
+
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java 2011-05-31 09:41:20 UTC (rev 31670)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java 2011-05-31 09:43:09 UTC (rev 31671)
@@ -10,31 +10,22 @@
******************************************************************************/
package org.jboss.ide.eclipse.as.core.server.internal.v7;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.OutputStream;
import java.util.ArrayList;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
-import org.eclipse.wst.server.core.model.IModuleFile;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
-import org.eclipse.wst.server.core.util.ModuleFile;
-import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.publishers.AbstractServerToolsPublisher;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.internal.DeployableServerBehavior;
-import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public class JBoss7JSTPublisher extends AbstractServerToolsPublisher {
@@ -75,7 +66,7 @@
IServer server, IModule[] module,
int publishType, IModuleResourceDelta[] delta,
IProgressMonitor monitor) throws CoreException {
- boolean useAS7Behavior = JBoss7Server.supportsJBoss7MarkerDeployment(server);
+ boolean useAS7Behavior = DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server);
if( useAS7Behavior )
return publishModuleToAS7(method, server, module, publishType, delta, monitor);
else
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java 2011-05-31 09:41:20 UTC (rev 31670)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7Server.java 2011-05-31 09:43:09 UTC (rev 31671)
@@ -57,9 +57,4 @@
}
return p.toString();
}
-
- public static boolean supportsJBoss7MarkerDeployment(IServer server) {
- boolean retval = (server.loadAdapter(IJBoss7Deployment.class, new NullProgressMonitor()) != null);
- return retval;
- }
}
13 years, 7 months
JBoss Tools SVN: r31670 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-31 05:41:20 -0400 (Tue, 31 May 2011)
New Revision: 31670
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
Log:
[JBIDE-9023] extracted AS7 marker util methods to their own file (no deprecation - avoids even more mess - since this is a new API)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 09:20:17 UTC (rev 31669)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 09:41:20 UTC (rev 31670)
@@ -120,7 +120,7 @@
AbstractServerToolsPublisher.getSubMon(monitor, 150)
);
if( JBoss7Server.supportsJBoss7MarkerDeployment(server))
- DeploymentMarkerUtils.addDoDeployMarker(method, ServerConverter.getDeployableServer(server), module, monitor);
+ DeploymentMarkerUtils.addDeployMarker(method, ServerConverter.getDeployableServer(server), module, monitor);
} catch(CoreException ce) {
return ce.getStatus();
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-05-31 09:20:17 UTC (rev 31669)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-05-31 09:41:20 UTC (rev 31670)
@@ -96,7 +96,7 @@
callback.copyFile(mf, new Path(depPath.lastSegment()), monitor);
// Add marker
- DeploymentMarkerUtils.addDoDeployMarker(method, ds, module, new NullProgressMonitor());
+ DeploymentMarkerUtils.addDeployMarker(method, ds, module, new NullProgressMonitor());
}
monitor.done();
return s;
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2011-05-31 09:20:17 UTC (rev 31669)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2011-05-31 09:41:20 UTC (rev 31670)
@@ -47,7 +47,7 @@
public static final String SKIP_DEPLOY = ".skipdeploy";//$NON-NLS-1$
public static final String PENDING = ".pending";//$NON-NLS-1$
- public static IStatus addDoDeployMarker(IJBossServerPublishMethod method,IDeployableServer server,
+ public static IStatus addDeployMarker(IJBossServerPublishMethod method,IDeployableServer server,
IModule[] moduleTree, IProgressMonitor monitor ) throws CoreException {
IPath depPath = PublishUtil.getDeployPath(method, moduleTree, server);
return addDeployMarker(method, server.getServer(), depPath, monitor);
13 years, 7 months
JBoss Tools SVN: r31669 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-31 05:20:17 -0400 (Tue, 31 May 2011)
New Revision: 31669
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
Log:
[JBIDE-8920] corrected warnings: replaced usage of deprecated constant, cleaned imports
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2011-05-31 09:16:12 UTC (rev 31668)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java 2011-05-31 09:20:17 UTC (rev 31669)
@@ -61,13 +61,13 @@
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
-import org.jboss.ide.eclipse.as.core.server.IJBossServerConstants;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.IJBossServerRuntime;
import org.jboss.ide.eclipse.as.core.server.internal.JBossServer;
import org.jboss.ide.eclipse.as.core.server.internal.ServerAttributeHelper;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentModulePrefs;
import org.jboss.ide.eclipse.as.core.util.DeploymentPreferenceLoader.DeploymentPreferences;
+import org.jboss.ide.eclipse.as.core.util.IJBossRuntimeResourceConstants;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
import org.jboss.ide.eclipse.as.core.util.ServerUtil;
@@ -353,7 +353,7 @@
}
public static HashMap<String, IBrowseBehavior> browseBehaviorMap = new HashMap<String, IBrowseBehavior>();
static {
- browseBehaviorMap.put(LocalPublishMethod.LOCAL_PUBLISH_METHOD, new IBrowseBehavior() { //$NON-NLS-1$
+ browseBehaviorMap.put(LocalPublishMethod.LOCAL_PUBLISH_METHOD, new IBrowseBehavior() {
public String openBrowseDialog(ModuleDeploymentPage page, String original) {
DirectoryDialog d = new DirectoryDialog(new Shell());
d.setFilterPath(page.makeGlobal(original));
@@ -366,7 +366,7 @@
String mode = getServer().getAttributeHelper().getAttribute(IDeployableServer.SERVER_MODE, LocalPublishMethod.LOCAL_PUBLISH_METHOD);
IBrowseBehavior beh = browseBehaviorMap.get(mode);
if( beh == null )
- beh = browseBehaviorMap.get(LocalPublishMethod.LOCAL_PUBLISH_METHOD); //$NON-NLS-1$
+ beh = browseBehaviorMap.get(LocalPublishMethod.LOCAL_PUBLISH_METHOD);
return beh.openBrowseDialog(page, original);
}
@@ -389,9 +389,9 @@
JBossServer jbs = ServerConverter.getJBossServer(page.getServer().getOriginal());
String newDir = getHelper().getAttribute(IDeployableServer.DEPLOY_DIRECTORY,
- jbs == null ? "" : jbs.getDeployFolder());
+ jbs == null ? "" : jbs.getDeployFolder()); //$NON-NLS-1$
String newTemp = getHelper().getAttribute(IDeployableServer.TEMP_DEPLOY_DIRECTORY,
- jbs == null ? "" : jbs.getTempDeployFolder());
+ jbs == null ? "" : jbs.getTempDeployFolder()); //$NON-NLS-1$
deployText.removeModifyListener(deployListener);
deployText.setText(newDir);
deployText.addModifyListener(deployListener);
@@ -531,9 +531,9 @@
// Discover the new folders
if( newSelection == metadataRadio ) {
newDir = JBossServerCorePlugin.getServerStateLocation(id)
- .append(IJBossServerConstants.DEPLOY).makeAbsolute().toString();
+ .append(IJBossRuntimeResourceConstants.DEPLOY).makeAbsolute().toString();
newTemp = JBossServerCorePlugin.getServerStateLocation(id)
- .append(IJBossServerConstants.TEMP_DEPLOY).makeAbsolute().toString();
+ .append(IJBossToolingConstants.TEMP_DEPLOY).makeAbsolute().toString();
new File(newDir).mkdirs();
new File(newTemp).mkdirs();
} else if( newSelection == serverRadio ) {
@@ -547,10 +547,10 @@
config = cb.getServerConfigName(page.getServer());
newDir = new Path(loc)
.append(config)
- .append(IJBossServerConstants.DEPLOY).toString();
+ .append(IJBossRuntimeResourceConstants.DEPLOY).toString();
newTemp = new Path(loc).append(config)
- .append(IJBossServerConstants.TMP)
- .append(IJBossServerConstants.JBOSSTOOLS_TMP).toString();
+ .append(IJBossToolingConstants.TMP)
+ .append(IJBossToolingConstants.JBOSSTOOLS_TMP).toString();
if( mode.equals(LocalPublishMethod.LOCAL_PUBLISH_METHOD))
new File(newTemp).mkdirs();
}
@@ -632,7 +632,7 @@
viewer.setLabelProvider(new ModulePageLabelProvider());
viewer.setColumnProperties(new String[] { COLUMN_NAME,
COLUMN_LOC, COLUMN_TEMP_LOC });
- viewer.setInput(""); // irrelevent
+ viewer.setInput(""); //$NON-NLS-1$
CellEditor[] editors = new CellEditor[] {
new TextCellEditor(viewer.getTree()),
new TextCellEditor(viewer.getTree()),
@@ -641,7 +641,7 @@
viewer.setCellEditors(editors);
Link link = new Link(root, SWT.DEFAULT);
- link.setText("<a>" + Messages.EditorRefreshViewer + "</a>");
+ link.setText("<a>" + Messages.EditorRefreshViewer + "</a>"); //$NON-NLS-1$ //$NON-NLS-2$
link.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
refreshViewer();
@@ -666,7 +666,7 @@
private void refreshViewer() {
page.refreshPossibleModules();
- viewer.setInput(""); // irrelevent
+ viewer.setInput(""); //$NON-NLS-1$
}
private class LocalDeploymentCellModifier implements ICellModifier {
@@ -684,10 +684,10 @@
}
if (property == COLUMN_TEMP_LOC) {
String ret = p.getProperty(COLUMN_TEMP_LOC);
- return ret == null ? "" : ret;
+ return ret == null ? "" : ret; //$NON-NLS-1$
}
- return "";
+ return ""; //$NON-NLS-1$
}
public void modify(Object element, String property, Object value) {
@@ -764,8 +764,8 @@
String result = modPref.getProperty(COLUMN_TEMP_LOC);
if (result != null)
return result;
- modPref.setProperty(COLUMN_TEMP_LOC, "");
- return "";
+ modPref.setProperty(COLUMN_TEMP_LOC, ""); //$NON-NLS-1$
+ return ""; //$NON-NLS-1$
}
}
return element.toString();
@@ -798,8 +798,8 @@
if( getShowRadios() && evt.getPropertyName().equals( IDeployableServer.SERVER_MODE)) {
String mode = page.getServer().getAttribute(IDeployableServer.SERVER_MODE, LocalPublishMethod.LOCAL_PUBLISH_METHOD);
metadataRadio.setEnabled(callbackMappings.get(mode).metadataEnabled());
- String originalDeployLocation = page.getServer().getOriginal().getAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, IDeployableServer.DEPLOY_CUSTOM);
- String wcDeployLocation = page.getServer().getAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, IDeployableServer.DEPLOY_CUSTOM);
+// String originalDeployLocation = page.getServer().getOriginal().getAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, IDeployableServer.DEPLOY_CUSTOM);
+// String wcDeployLocation = page.getServer().getAttribute(IDeployableServer.DEPLOY_DIRECTORY_TYPE, IDeployableServer.DEPLOY_CUSTOM);
if(!metadataRadio.isEnabled() && metadataRadio.getSelection()) {
page.execute(new RadioClickedCommand(serverRadio, currentSelection));
}
@@ -816,7 +816,7 @@
protected static String getOutputFolderAndName(DeploymentModulePrefs modPref, IModule m) {
String folder = modPref.getProperty(COLUMN_LOC);
String outputName = modPref.getProperty(OUTPUT_NAME);
- outputName = outputName == null || outputName.equals("")
+ outputName = outputName == null || outputName.length() == 0
? getDefaultOutputName(m) : outputName;
if (folder != null)
13 years, 7 months
JBoss Tools SVN: r31668 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7 and 1 other directory.
by jbosstools-commits@lists.jboss.org
Author: adietish
Date: 2011-05-31 05:16:12 -0400 (Tue, 31 May 2011)
New Revision: 31668
Added:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java
Log:
[JBIDE-9023] extracted AS7 marker util methods to their own file (no deprecation - avoids even more mess - since this is a new API)
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 05:28:33 UTC (rev 31667)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/AltMethodZippedJSTPublisher.java 2011-05-31 09:16:12 UTC (rev 31668)
@@ -32,6 +32,7 @@
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7JSTPublisher;
import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7Server;
+import org.jboss.ide.eclipse.as.core.server.internal.v7.DeploymentMarkerUtils;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
@@ -84,6 +85,7 @@
String name = sourcePath.lastSegment();
IStatus result = null;
+ removeDeployFailedMarker(monitor);
// Am I a removal? If yes, remove me, and return
if( publishType == IJBossServerPublisher.REMOVE_PUBLISH) {
@@ -118,19 +120,31 @@
AbstractServerToolsPublisher.getSubMon(monitor, 150)
);
if( JBoss7Server.supportsJBoss7MarkerDeployment(server))
- JBoss7JSTPublisher.addDoDeployMarkerFile(method, ServerConverter.getDeployableServer(server), module, monitor);
+ DeploymentMarkerUtils.addDoDeployMarker(method, ServerConverter.getDeployableServer(server), module, monitor);
} catch(CoreException ce) {
return ce.getStatus();
}
return Status.OK_STATUS;
}
+ private IStatus removeDeployFailedMarker(IProgressMonitor monitor) {
+ try {
+ IDeployableServer ds = ServerConverter.getDeployableServer(server);
+ if (JBoss7Server.supportsJBoss7MarkerDeployment(server)) {
+ return DeploymentMarkerUtils.removeDeployFailedMarkerIfExists(method, ds, module, monitor);
+ }
+ } catch(CoreException ce) {
+ return ce.getStatus();
+ }
+ return Status.OK_STATUS;
+ }
+
private IStatus removeRemoteDeployment( IPath sourcePath,
IPath destFolder, String name, IProgressMonitor monitor) throws CoreException {
IDeployableServer ds = ServerConverter.getDeployableServer(server);
try {
if( JBoss7Server.supportsJBoss7MarkerDeployment(server))
- return JBoss7JSTPublisher.removeDeployedMarkerFile(method, ds, module, monitor);
+ return DeploymentMarkerUtils.removeDeployedMarkerIfExists(method, ds, module, monitor);
return removeRemoteDeploymentFolder(sourcePath, destFolder, name, monitor);
} catch(CoreException ce) {
return ce.getStatus();
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-05-31 05:28:33 UTC (rev 31667)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2011-05-31 09:16:12 UTC (rev 31668)
@@ -30,6 +30,7 @@
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7JSTPublisher;
import org.jboss.ide.eclipse.as.core.server.internal.v7.JBoss7Server;
+import org.jboss.ide.eclipse.as.core.server.internal.v7.DeploymentMarkerUtils;
import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
import org.jboss.ide.eclipse.as.core.util.IJBossToolingConstants;
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
@@ -81,7 +82,7 @@
IDeployableServer ds = ServerConverter.getDeployableServer(server);
String deployRoot = getDeployRoot(module, ds);
if( publishType == IJBossServerPublisher.REMOVE_PUBLISH) {
- JBoss7JSTPublisher.removeDeployedMarkerFile(method, ds, module, monitor);
+ DeploymentMarkerUtils.removeDeployedMarkerIfExists(method, ds, module, monitor);
} else {
LocalZippedPublisherUtil util = new LocalZippedPublisherUtil();
IStatus s = util.publishModule(server, deployRoot, module, publishType, delta, monitor);
@@ -95,7 +96,7 @@
callback.copyFile(mf, new Path(depPath.lastSegment()), monitor);
// Add marker
- JBoss7JSTPublisher.addDoDeployMarkerFile(method, ds, module, new NullProgressMonitor());
+ DeploymentMarkerUtils.addDoDeployMarker(method, ds, module, new NullProgressMonitor());
}
monitor.done();
return s;
Added: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java (rev 0)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2011-05-31 09:16:12 UTC (rev 31668)
@@ -0,0 +1,118 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.ide.eclipse.as.core.server.internal.v7;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.model.IModuleFile;
+import org.eclipse.wst.server.core.util.ModuleFile;
+import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
+import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
+import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
+import org.jboss.ide.eclipse.as.core.server.xpl.PublishCopyUtil.IPublishCopyCallbackHandler;
+
+/**
+ *
+ * @author André Dietisheim
+ *
+ */
+public class DeploymentMarkerUtils {
+
+ public static final String DEPLOYED = ".deployed"; //$NON-NLS-1$
+ public static final String FAILED_DEPLOY = ".failed";//$NON-NLS-1$
+ public static final String DO_DEPLOY = ".dodeploy";//$NON-NLS-1$
+ public static final String DEPLOYING = ".isdeploying";//$NON-NLS-1$
+ public static final String UNDEPLOYING = ".isundeploying";//$NON-NLS-1$
+ public static final String UNDEPLOYED = ".undeployed";//$NON-NLS-1$
+ public static final String SKIP_DEPLOY = ".skipdeploy";//$NON-NLS-1$
+ public static final String PENDING = ".pending";//$NON-NLS-1$
+
+ public static IStatus addDoDeployMarker(IJBossServerPublishMethod method,IDeployableServer server,
+ IModule[] moduleTree, IProgressMonitor monitor ) throws CoreException {
+ IPath depPath = PublishUtil.getDeployPath(method, moduleTree, server);
+ return addDeployMarker(method, server.getServer(), depPath, monitor);
+ }
+
+ public static IStatus addDeployMarker(IJBossServerPublishMethod method,IServer server,
+ IPath depPath, IProgressMonitor monitor ) throws CoreException {
+ IPath folder = depPath.removeLastSegments(1);
+ IPublishCopyCallbackHandler callback = method.getCallbackHandler(folder, server);
+ callback.copyFile(createBlankModule(), new Path(depPath.lastSegment() + DO_DEPLOY), monitor);
+ return Status.OK_STATUS;
+ }
+
+ private static IModuleFile createBlankModule() {
+ return new ModuleFile(getBlankFile(), "", new Path("/")); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ private static File getBlankFile() {
+ IPath p = JBossServerCorePlugin.getDefault().getStateLocation().append("BLANK_FILE"); //$NON-NLS-1$
+ if( !p.toFile().exists()) {
+ try {
+ OutputStream out = new FileOutputStream(p.toFile());
+ if (out != null) {
+ out.close();
+ }
+ } catch(IOException ioe) {}
+ }
+ return p.toFile();
+ }
+
+ public static IStatus removeDeployFailedMarker(
+ IServer server, IPath depPath,
+ IJBossServerPublishMethod method,
+ IProgressMonitor monitor) throws CoreException {
+ return removeFile(FAILED_DEPLOY, server, depPath, method, monitor);
+ }
+
+ private static IStatus removeFile(String suffix,IServer server, IPath depPath,IJBossServerPublishMethod method,
+ IProgressMonitor monitor) throws CoreException {
+ IPath folder = depPath.removeLastSegments(1);
+ IPublishCopyCallbackHandler callback = method.getCallbackHandler(folder, server);
+ IPath file = new Path(depPath.lastSegment()+suffix);
+ callback.deleteResource(file, monitor);
+ return Status.OK_STATUS;
+ }
+
+ public static IStatus removeDeployedMarkerIfExists(IJBossServerPublishMethod method, IDeployableServer jbServer, IModule[] module, IProgressMonitor monitor)
+ throws CoreException {
+ return removeDeployedMarkerIfExists(
+ jbServer.getServer(), PublishUtil.getDeployPath(method, module, jbServer), method, monitor);
+ }
+
+ public static IStatus removeDeployFailedMarkerIfExists(IJBossServerPublishMethod method, IDeployableServer jbServer, IModule[] module,
+ IProgressMonitor monitor) throws CoreException {
+ IPath depPath = PublishUtil.getDeployPath(method, module, jbServer);
+ return removeDeployedMarkerIfExists(jbServer.getServer(), depPath, method, monitor);
+ }
+
+ public static IStatus removeDeployedMarkerIfExists(IServer server, IPath depPath, IJBossServerPublishMethod method, IProgressMonitor monitor)
+ throws CoreException {
+ try {
+ return removeFile(DEPLOYED, server, depPath, method, monitor);
+ } catch(Exception e) {
+ return Status.OK_STATUS;
+ }
+ }
+
+}
Property changes on: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java 2011-05-31 05:28:33 UTC (rev 31667)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java 2011-05-31 09:16:12 UTC (rev 31668)
@@ -38,29 +38,24 @@
import org.jboss.ide.eclipse.as.core.util.ServerConverter;
public class JBoss7JSTPublisher extends AbstractServerToolsPublisher {
+
// Same as super class but just a *bit* different
public boolean accepts(String method, IServer server, IModule[] module) {
return super.accepts(method, server, module);
// && JBoss7Server.supportsJBoss7MarkerDeployment(server);
}
- public static final String DEPLOYED = ".deployed"; //$NON-NLS-1$
- public static final String FAILED_DEPLOY = ".failed";//$NON-NLS-1$
- public static final String DO_DEPLOY = ".dodeploy";//$NON-NLS-1$
- public static final String DEPLOYING = ".isdeploying";//$NON-NLS-1$
- public static final String UNDEPLOYING = ".isundeploying";//$NON-NLS-1$
- public static final String UNDEPLOYED = ".undeployed";//$NON-NLS-1$
- public static final String SKIP_DEPLOY = ".skipdeploy";//$NON-NLS-1$
- public static final String PENDING = ".pending";//$NON-NLS-1$
-
public IStatus publishModuleToAS7(
IJBossServerPublishMethod method,
IServer server, IModule[] module,
int publishType, IModuleResourceDelta[] delta,
IProgressMonitor monitor) throws CoreException {
IDeployableServer ds = ServerConverter.getDeployableServer(server);
+
+ DeploymentMarkerUtils.removeDeployFailedMarker(server, PublishUtil.getDeployPath(method, module, ds), method, monitor);
+
if( publishType == IJBossServerPublisher.REMOVE_PUBLISH) {
- JBoss7JSTPublisher.removeDeployedMarkerFile(method, ds, module, monitor);
+ DeploymentMarkerUtils.removeDeployedMarkerIfExists(method, ds, module, monitor);
} else {
IStatus s = super.publishModule(method, server, module, publishType, delta, monitor);
if( module.length == 1 &&
@@ -120,54 +115,4 @@
// if( !list.contains(p))
// list.add(p);
// }
-
- public static IStatus addDoDeployMarkerFile(IJBossServerPublishMethod method,IDeployableServer server,
- IModule[] moduleTree, IProgressMonitor monitor ) throws CoreException {
- IPath depPath = PublishUtil.getDeployPath(method, moduleTree, server);
- return addDoDeployMarkerFile(method, server.getServer(), depPath, monitor);
- }
-
- public static IStatus addDoDeployMarkerFile(IJBossServerPublishMethod method,IServer server,
- IPath depPath, IProgressMonitor monitor ) throws CoreException {
- IPath folder = depPath.removeLastSegments(1);
- IPublishCopyCallbackHandler callback = method.getCallbackHandler(folder, server);
- callback.copyFile(createBlankModuleFile(), new Path(depPath.lastSegment() + DO_DEPLOY), monitor);
- return Status.OK_STATUS;
- }
-
-
- public static IStatus removeDeployedMarkerFile(
- IJBossServerPublishMethod method,
- IDeployableServer jbServer, IModule[] module,
- IProgressMonitor monitor) throws CoreException {
- IPath depPath = PublishUtil.getDeployPath(method, module, jbServer);
- return removeDeployedMarkerFile(jbServer.getServer(), depPath, method, monitor);
- }
- public static IStatus removeDeployedMarkerFile(
- IServer server, IPath depPath,
- IJBossServerPublishMethod method,
- IProgressMonitor monitor) throws CoreException {
- IPath folder = depPath.removeLastSegments(1);
- IPublishCopyCallbackHandler callback = method.getCallbackHandler(folder, server);
- IPath deployed = new Path(depPath.lastSegment()+DEPLOYED);
- callback.deleteResource(deployed, monitor);
- return Status.OK_STATUS;
- }
-
-
- public static IModuleFile createBlankModuleFile() {
- return new ModuleFile(getBlankFile(), "", new Path("/")); //$NON-NLS-1$ //$NON-NLS-2$
- }
- protected static File getBlankFile() {
- IPath p = JBossServerCorePlugin.getDefault().getStateLocation().append("BLANK_FILE"); //$NON-NLS-1$
- if( !p.toFile().exists()) {
- try {
- OutputStream out = new FileOutputStream(p.toFile());
- if (out != null) {
- out.close();
- }
- } catch(IOException ioe) {}
- }
- return p.toFile();
- }
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java 2011-05-31 05:28:33 UTC (rev 31667)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7ServerBehavior.java 2011-05-31 09:16:12 UTC (rev 31668)
@@ -130,7 +130,7 @@
Iterator<IPath> i = l.iterator();
IPath p;
while (i.hasNext()) {
- JBoss7JSTPublisher.addDoDeployMarkerFile(method, getServer(), i.next(), new SubProgressMonitor(monitor,
+ DeploymentMarkerUtils.addDeployMarker(method, getServer(), i.next(), new SubProgressMonitor(monitor,
1));
}
super.publishFinish(new SubProgressMonitor(monitor, 1));
13 years, 7 months
JBoss Tools SVN: r31667 - trunk/build.
by jbosstools-commits@lists.jboss.org
Author: nickboldt
Date: 2011-05-31 01:28:33 -0400 (Tue, 31 May 2011)
New Revision: 31667
Modified:
trunk/build/publish.sh
Log:
copy buildResults.css, buildResults.html to ${STAGINGDIR}/logs
Modified: trunk/build/publish.sh
===================================================================
--- trunk/build/publish.sh 2011-05-31 05:09:03 UTC (rev 31666)
+++ trunk/build/publish.sh 2011-05-31 05:28:33 UTC (rev 31667)
@@ -197,10 +197,18 @@
for buildxml in ${WORKSPACE}/build/results/build.xml ${WORKSPACE}/sources/build/results/build.xml ${WORKSPACE}/sources/results/build.xml; do
if [[ -f ${buildxml} ]]; then
ANT_SCRIPT=${buildxml}
+ RESULTS_DIR=${buildxml/\/build.xml/}
fi
done
if [[ ${ANT_SCRIPT} ]] && [[ -f ${ANT_SCRIPT} ]]; then ant -f ${ANT_SCRIPT} ${ANT_PARAMS}; fi
+# copy buildResults.css, buildResults.html to ${STAGINGDIR}/logs
+if [[ ${RESULTS_DIR} ]] && [[ -d ${RESULTS_DIR} ]]; then
+ for f in buildResults.html buildResults.css; do
+ if [[ -f ${RESULTS_DIR}/${f} ]]; then rsync -arzq ${RESULTS_DIR}/${f} ${STAGINGDIR}/logs/; fi
+ done
+fi
+
# purge duplicate zip files in logs/zips/all/*.zip
if [[ -d ${STAGINGDIR}/logs/zips ]]; then rm -f $(find ${STAGINGDIR}/logs/zips -type f -name "*.zip"); fi
13 years, 7 months