You are viewing a plain text version of this content. The canonical link for it is here.
Posted to npanday-commits@incubator.apache.org by lc...@apache.org on 2012/05/03 08:16:39 UTC
svn commit: r1333353 - in
/incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync:
Destination.java Item.java
Author: lcorneliussen
Date: Thu May 3 08:16:39 2012
New Revision: 1333353
URL: http://svn.apache.org/viewvc?rev=1333353&view=rev
Log:
[NPANDAY-563] Generic MSDeploy synchronization mojo
o Support local sync
Modified:
incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Destination.java
incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Item.java
Modified: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Destination.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Destination.java?rev=1333353&r1=1333352&r2=1333353&view=diff
==============================================================================
--- incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Destination.java (original)
+++ incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Destination.java Thu May 3 08:16:39 2012
@@ -26,7 +26,9 @@ import org.apache.maven.plugin.MojoExecu
*/
public class Destination
{
- private String computerName, username, password, authType = "basic", serverId;
+ private String computerName, username, password, authType, serverId;
+
+ private boolean local;
public String getComputerName()
{
@@ -87,4 +89,14 @@ public class Destination
{
this.password = password;
}
+
+ public boolean getLocal()
+ {
+ return local;
+ }
+
+ public void setLocal( boolean local )
+ {
+ this.local = local;
+ }
}
Modified: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Item.java
URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Item.java?rev=1333353&r1=1333352&r2=1333353&view=diff
==============================================================================
--- incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Item.java (original)
+++ incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Item.java Thu May 3 08:16:39 2012
@@ -20,6 +20,7 @@
package npanday.plugin.msdeploy.sync;
import com.google.common.base.Joiner;
+import com.google.common.base.Strings;
import com.google.common.collect.Lists;
import org.apache.maven.artifact.Artifact;
import org.apache.maven.plugin.MojoFailureException;
@@ -87,25 +88,27 @@ public class Item
parts.add( "contentPath=" + contentPath );
}
- if (destination != null) {
- if ( destination.getComputerName() != null )
- {
- parts.add( "computerName=" + destination.getComputerName() );
- }
-
- if ( destination.getUsername() != null )
- {
- parts.add( "username=" + destination.getUsername() );
- }
-
- if ( destination.getPassword() != null )
- {
- parts.add( "password=" + destination.getPassword() );
- }
-
- if ( destination.getAuthType() != null )
- {
- parts.add( "authType=" + destination.getAuthType() );
+ if ( destination != null
+ && !Strings.isNullOrEmpty(destination.getComputerName())
+ && !destination.getLocal()) {
+
+ parts.add( "computerName=" + destination.getComputerName() );
+
+ if (!Strings.isNullOrEmpty( destination.getServerId())) {
+ if ( destination.getUsername() != null )
+ {
+ parts.add( "username=" + destination.getUsername() );
+ }
+
+ if ( destination.getPassword() != null )
+ {
+ parts.add( "password=" + destination.getPassword() );
+ }
+
+ if ( destination.getAuthType() != null )
+ {
+ parts.add( "authType=" + destination.getAuthType() );
+ }
}
}