Author: lcorneliussen Date: Fri May 4 15:33:03 2012 New Revision: 1334035 URL: http://svn.apache.org/viewvc?rev=1334035&view=rev Log: [NPANDAY-563] Generic MSDeploy synchronization mojo
o make sure password is not printed in toString / logging o password is still printed as cmd-line arg; need a config switch to avoid printing the arg-line or possibility to register a method that gets called in order to mask the executable log Modified: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Package.java Modified: incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Package.java URL: http://svn.apache.org/viewvc/incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Package.java?rev=1334035&r1=1334034&r2=1334035&view=diff ============================================================================== --- incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Package.java (original) +++ incubator/npanday/trunk/plugins/msdeploy-maven-plugin/src/main/java/npanday/plugin/msdeploy/sync/Package.java Fri May 4 15:33:03 2012 @@ -81,8 +81,8 @@ public class Package @Override public String toString() { - return "Item{" + "packageSource=" + groupId + ":" + artifactId + ":" + version + ", packageTarget=" - + getDestinationArgument() + '}'; + return "Item{" + "packageSource=" + groupId + ":" + artifactId + ":" + version + ", " + getDestinationSummary() + + '}'; } static Joiner JOIN_ON_COMMA = Joiner.on( "," ).skipNulls(); @@ -93,17 +93,17 @@ public class Package if ( !Strings.isNullOrEmpty( iisApp ) ) { - parts.add( "iisApp=\"" + iisApp + "\""); + parts.add( "iisApp=\"" + iisApp + "\"" ); } else if ( !Strings.isNullOrEmpty( contentPath ) ) { - parts.add( "contentPath=\"" + contentPath + "\""); + parts.add( "contentPath=\"" + contentPath + "\"" ); } if ( destination != null && !Strings.isNullOrEmpty( destination.getComputerName() ) && !destination.getLocal() ) { - parts.add( "computerName=\"" + destination.getComputerName() + "\""); + parts.add( "computerName=\"" + destination.getComputerName() + "\"" ); if ( !Strings.isNullOrEmpty( destination.getServerId() ) ) { @@ -144,7 +144,8 @@ public class Package // cant get overriding the physical app path to work if ( !Strings.isNullOrEmpty( iisApp ) && !Strings.isNullOrEmpty( contentPath ) ) { - commands.add( "-replace:objectName=dirPath,targetAttributeName=path,match=^,replace=\"" + contentPath + "\"" ); + commands.add( "-replace:objectName=dirPath,targetAttributeName=path,match=^, + replace=\"" + contentPath + "\"" ); } */ return commands; @@ -239,4 +240,25 @@ public class Package { this.classifier = classifier; } + + public String getDestinationSummary() + { + String d = contentPath; + if ( !Strings.isNullOrEmpty( iisApp ) ) + { + d = iisApp; + } + d += " on "; + + if ( destination == null || destination.getLocal() ) + { + d += "local machine"; + } + else + { + d += destination.getComputerName(); + } + + return d; + } }