Author: rob.stryker(a)jboss.com
Date: 2007-05-29 12:37:37 -0400 (Tue, 29 May 2007)
New Revision: 2077
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/NullPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/stripped/DeployableServerBehavior.java
Log:
Archives API change refeactor
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java 2007-05-24
21:14:43 UTC (rev 2076)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/packages/types/J2EEArchiveType.java 2007-05-29
16:37:37 UTC (rev 2077)
@@ -104,7 +104,7 @@
jar.setInWorkspace(ResourcesPlugin.getWorkspace().getRoot().getLocation().isPrefixOf(new
Path(deployDirectory)));
jar.setExploded(false);
} else {
- jar.setDestinationPath(project.getLocation());
+ jar.setDestinationPath(project.getFullPath());
jar.setInWorkspace(true);
jar.setExploded(false);
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java 2007-05-24
21:14:43 UTC (rev 2076)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/IJBossServerPublisher.java 2007-05-29
16:37:37 UTC (rev 2077)
@@ -25,10 +25,13 @@
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.wst.server.core.IModule;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
public interface IJBossServerPublisher {
public IStatus publishModule(int kind, int deltaKind, int modulePublishState,
IModule module, IProgressMonitor monitor)
throws CoreException;
public int getPublishState();
+ public void setDelta(IModuleResourceDelta[] delta);
+
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-05-24
21:14:43 UTC (rev 2076)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/JstPublisher.java 2007-05-29
16:37:37 UTC (rev 2077)
@@ -25,13 +25,13 @@
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;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
-import org.jboss.ide.eclipse.archives.core.model.ArchivesCore;
+import org.jboss.ide.eclipse.archives.core.build.ArchiveBuildDelegate;
import org.jboss.ide.eclipse.archives.core.model.IArchive;
import org.jboss.ide.eclipse.archives.core.model.IArchiveType;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
@@ -55,10 +55,17 @@
public static final int BUILD_FAILED_CODE = 100;
public static final int PACKAGE_UNDETERMINED_CODE = 101;
+ protected IModuleResourceDelta[] delta;
+
public JstPublisher(IServer server, EventLogTreeItem context) {
super(server, context);
}
+
+ public void setDelta(IModuleResourceDelta[] delta) {
+ this.delta = delta;
+ }
+
public IStatus publishModule(int kind, int deltaKind, int modulePublishState,
IModule module, IProgressMonitor monitor) throws CoreException {
IStatus status = null;
@@ -80,7 +87,7 @@
IArchive topLevel = createTopPackage(module, jbServer.getDeployDirectory(), monitor);
if( topLevel != null ) {
try {
- ArchivesCore.buildArchive(topLevel, new NullProgressMonitor());
+ new ArchiveBuildDelegate().fullArchiveBuild(topLevel);//, new
NullProgressMonitor());
} catch( Exception e ) {
return new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, BUILD_FAILED_CODE,
"", e);
}
@@ -106,7 +113,7 @@
protected IArchive createTopPackage(IModule module, String deployDir, IProgressMonitor
monitor) {
IArchiveType type = ModulePackageTypeConverter.getPackageTypeFor(module);
if( type != null ) {
- IArchive topLevel = type.createDefaultConfiguration(module.getProject(), monitor);
+ IArchive topLevel = type.createDefaultConfiguration(module.getProject().getName(),
monitor);
topLevel.setDestinationPath(new Path(deployDir));
topLevel.setInWorkspace(false);
return topLevel;
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/NullPublisher.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/NullPublisher.java 2007-05-24
21:14:43 UTC (rev 2076)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/NullPublisher.java 2007-05-29
16:37:37 UTC (rev 2077)
@@ -26,6 +26,7 @@
import org.eclipse.core.runtime.IStatus;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
+import org.eclipse.wst.server.core.model.IModuleResourceDelta;
/**
*
@@ -42,4 +43,9 @@
return null;
}
+ public void setDelta(IModuleResourceDelta[] delta) {
+ // TODO Auto-generated method stub
+
+ }
+
}
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/stripped/DeployableServerBehavior.java
===================================================================
---
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/stripped/DeployableServerBehavior.java 2007-05-24
21:14:43 UTC (rev 2076)
+++
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/stripped/DeployableServerBehavior.java 2007-05-29
16:37:37 UTC (rev 2077)
@@ -82,10 +82,10 @@
publisher = new JstPublisher(getServer(), root);
} else if( isPackagesTypeModule(module[i]) ) {
publisher = new PackagesPublisher(getServer(), root);
- ((PackagesPublisher)publisher).setDelta(getPublishedResourceDelta(module));
} else {
publisher = new NullPublisher();
}
+ publisher.setDelta(getPublishedResourceDelta(module));
publisher.publishModule(kind, deltaKind, modulePublishState, module[0], monitor);
setModulePublishState(module, publisher.getPublishState());
}