Skip to content
Browse files

Add clean deploy

  • Loading branch information...
1 parent 7963265 commit ea09eb9dbef085b3c63fe4956213416cd1497698 @cheleb committed Jan 16, 2012
View
22 org.eclipse.alfresco.publisher.core/plugin.xml
@@ -46,26 +46,40 @@
id="org.eclipse.alfresco.publisher.core.contribution"
objectClass="org.eclipse.core.resources.IProject">
<menu
- id="org.eclipse.alfresco.publisher.core.menu1"
+ id="org.eclipse.alfresco.publisher.core.menu"
label="Alfresco"
path="additions">
<separator
- name="group1">
+ name="deploy">
</separator>
</menu>
<action
class="org.eclipse.alfresco.publisher.core.popup.actions.DeployJar"
enablesFor="1"
id="org.eclipse.alfresco.publisher.core.action.deployJar"
label="Deploy Jar"
- menubarPath="org.eclipse.alfresco.publisher.core.menu1/group1">
+ menubarPath="org.eclipse.alfresco.publisher.core.menu/deploy">
+ </action>
+ <action
+ class="org.eclipse.alfresco.publisher.core.popup.actions.CleanDeployJar"
+ enablesFor="1"
+ id="org.eclipse.alfresco.publisher.core.action.deployJar"
+ label="Clean Deploy Jar"
+ menubarPath="org.eclipse.alfresco.publisher.core.menu/deploy">
</action>
<action
class="org.eclipse.alfresco.publisher.core.popup.actions.DeployAmp"
enablesFor="1"
id="org.eclipse.alfresco.publisher.core.action.deployAmp"
label="Deploy AMP"
- menubarPath="org.eclipse.alfresco.publisher.core.menu1/group1">
+ menubarPath="org.eclipse.alfresco.publisher.core.menu/deploy">
+ </action>
+ <action
+ class="org.eclipse.alfresco.publisher.core.popup.actions.CleanDeployAmp"
+ enablesFor="1"
+ id="org.eclipse.alfresco.publisher.core.action.deployAmp"
+ label="Clean Deploy AMP"
+ menubarPath="org.eclipse.alfresco.publisher.core.menu/deploy">
</action>
<filter
name="projectNature"
View
3 ...esco.publisher.core/src/org/eclipse/alfresco/publisher/core/AlfrescoPreferenceHelper.java
@@ -38,10 +38,7 @@
private Preferences preference;
- private IProject project;
-
public AlfrescoPreferenceHelper(IProject project) {
- this.project = project;
this.preference = getProjectPreferences(project);
}
View
5 ....publisher.core/src/org/eclipse/alfresco/publisher/core/popup/actions/AlfrescoDeploy.java
@@ -2,7 +2,6 @@
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.util.Map;
@@ -161,9 +160,9 @@ public void run(IProgressMonitor monitor)
new ProgressMonitorDialog(shell).run(true, true,
iRunnableWithProgress);
} catch (InvocationTargetException e) {
- LOGGER.error("", e);
+ LOGGER.error(e.getLocalizedMessage(), e.getCause());
} catch (InterruptedException e) {
- LOGGER.error("", e);
+ LOGGER.error(e.getLocalizedMessage(), e.getCause());
}
}
View
10 ....publisher.core/src/org/eclipse/alfresco/publisher/core/popup/actions/CleanDeployAmp.java
@@ -0,0 +1,10 @@
+package org.eclipse.alfresco.publisher.core.popup.actions;
+
+public class CleanDeployAmp extends DeployAmp {
+
+ @Override
+ protected String getGoals() {
+ return "clean " + super.getGoals();
+ }
+
+}
View
8 ....publisher.core/src/org/eclipse/alfresco/publisher/core/popup/actions/CleanDeployJar.java
@@ -0,0 +1,8 @@
+package org.eclipse.alfresco.publisher.core.popup.actions;
+
+public class CleanDeployJar extends DeployJar {
+ @Override
+ protected String getGoals() {
+ return "clean " + super.getGoals();
+ }
+}
View
4 ...resco.publisher.core/src/org/eclipse/alfresco/publisher/core/popup/actions/DeployAmp.java
@@ -3,8 +3,6 @@
import java.io.File;
import java.io.IOException;
-import org.codehaus.plexus.util.FileUtils;
-import org.codehaus.plexus.util.StringUtils;
import org.eclipse.alfresco.publisher.core.AlfrescoDeployementException;
import org.eclipse.alfresco.publisher.core.AlfrescoFileUtils;
import org.eclipse.alfresco.publisher.core.AlfrescoPreferenceHelper;
@@ -23,9 +21,11 @@ protected void deploy(IProject project,
AlfrescoFileUtils alfrescoFileUtils,
AlfrescoPreferenceHelper preferences, IProgressMonitor monitor) {
+
String alfrescoHome = preferences.getAlfrescoHome();
String ampRelativePath = preferences.getTargetAmpLocation() + ".amp";
+ LOGGER.info("Deploying AMP " + ampRelativePath);
final String webappAbsolutePath = preferences.getWebappAbsolutePath();
String mmtAbsolutePath = alfrescoHome + File.separator + "bin"
View
1 ...resco.publisher.core/src/org/eclipse/alfresco/publisher/core/popup/actions/DeployJar.java
@@ -20,6 +20,7 @@
protected void deploy(IProject project, AlfrescoFileUtils alfrescoFileUtils, AlfrescoPreferenceHelper preferences, IProgressMonitor monitor) throws IOException {
String jarName = preferences.getAmpJarName();
String jarLocation = preferences.getAmpJarLocation();
+ LOGGER.info("Deploying jar file " + jarLocation);
String libFolder = preferences.getAmpLib();
View
2 ...re/src/org/eclipse/alfresco/publisher/core/properties/AlfrescoDeploymentPropertyPage.java
@@ -86,8 +86,6 @@ public void widgetSelected(SelectionEvent e) {
deploymentModeComposite.setEnabled(incrementalDeploymentButton
.getSelection());
- String mode = "Webapp";
-
webappRadioButton = new Button(deploymentModeComposite, SWT.RADIO);
webappRadioButton.setText("Webapp");
//webappRadioButton.setSelection("Webapp".equals(pref.getDeploymentMode()));
View
4 ...r.core/src/org/eclipse/alfresco/publisher/core/properties/AlfrescoServerPropertyPage.java
@@ -9,7 +9,6 @@
import org.eclipse.alfresco.publisher.core.ProjectHelper;
import org.eclipse.alfresco.publisher.core.ServerHelper;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.equinox.security.storage.StorageException;
import org.eclipse.jface.dialogs.MessageDialog;
@@ -38,7 +37,7 @@
private Text serverPathText;
private Label lblServerPath;
- private String mode;
+
private String alfrescoHome;
private String serverPath;
private String webappName;
@@ -66,7 +65,6 @@ private void addFirstSection(final Composite parent) {
final AlfrescoPreferenceHelper pref = new AlfrescoPreferenceHelper(project);
- mode = pref.getDeploymentMode();
serverPath = pref.getServerPath();
alfrescoHome = pref.getAlfrescoHome();
webappName = pref.getWebappName();

0 comments on commit ea09eb9

Please sign in to comment.
Something went wrong with that request. Please try again.