You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ho...@apache.org on 2006/05/10 06:08:51 UTC
svn commit: r405624 - in /geronimo/branches/1.1/modules:
deploy-tool/src/java/org/apache/geronimo/deployment/cli/
hot-deploy/src/java/org/apache/geronimo/deployment/hot/
Author: hogstrom
Date: Tue May 9 21:08:49 2006
New Revision: 405624
URL: http://svn.apache.org/viewcvs?rev=405624&view=rev
Log:
Applied patch Per Geronimo-2001 to improve visual experience during deployment.
Modified:
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/AbstractCommand.java
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandLogin.java
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/DeployTool.java
geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java
geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java
Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/AbstractCommand.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/AbstractCommand.java?rev=405624&r1=405623&r2=405624&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/AbstractCommand.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/AbstractCommand.java Tue May 9 21:08:49 2006
@@ -78,7 +78,7 @@
}
protected void emit(String message) {
- out.println(DeployUtils.reformat(message,4,72));
+ out.print(DeployUtils.reformat(message,4,72));
out.flush();
}
Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java?rev=405624&r1=405623&r2=405624&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandDistribute.java Tue May 9 21:08:49 2006
@@ -153,11 +153,11 @@
results = po.getResultTargetModuleIDs();
for (int i = 0; i < results.length; i++) {
TargetModuleID result = results[i];
- out.println(DeployUtils.reformat(getAction()+" "+result.getModuleID()+(multipleTargets ? " to "+result.getTarget().getName() : "")+(result.getWebURL() == null || !getAction().equals("Deployed") ? "" : " @ "+result.getWebURL()), 4, 72));
+ out.print(DeployUtils.reformat(getAction()+" "+result.getModuleID()+(multipleTargets ? " to "+result.getTarget().getName() : "")+(result.getWebURL() == null || !getAction().equals("Deployed") ? "" : " @ "+result.getWebURL()), 4, 72));
if(result.getChildTargetModuleID() != null) {
for (int j = 0; j < result.getChildTargetModuleID().length; j++) {
TargetModuleID child = result.getChildTargetModuleID()[j];
- out.println(DeployUtils.reformat(" `-> "+child.getModuleID()+(child.getWebURL() == null || !getAction().equals("Deployed") ? "" : " @ "+child.getWebURL()),4, 72));
+ out.print(DeployUtils.reformat(" `-> "+child.getModuleID()+(child.getWebURL() == null || !getAction().equals("Deployed") ? "" : " @ "+child.getWebURL()),4, 72));
}
}
}
Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java?rev=405624&r1=405623&r2=405624&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandInstallCAR.java Tue May 9 21:08:49 2006
@@ -62,7 +62,7 @@
int time = (int)(System.currentTimeMillis() - start) / 1000;
System.out.println();
if(!results.isFailed()) {
- System.out.println(DeployUtils.reformat("**** Installation Complete!", 4, 72));
+ System.out.print(DeployUtils.reformat("**** Installation Complete!", 4, 72));
for (int i = 0; i < results.getDependenciesPresent().length; i++) {
Artifact uri = results.getDependenciesPresent()[i];
System.out.print(DeployUtils.reformat("Used existing: "+uri, 4, 72));
@@ -73,7 +73,7 @@
}
if(results.getTotalDownloadBytes() > 0 && time > 0) {
System.out.println();
- System.out.println(DeployUtils.reformat("Downloaded "+(results.getTotalDownloadBytes()/1024)+" kB in "+time+"s ("+results.getTotalDownloadBytes()/(1024*time)+" kB/s)", 4, 72));
+ System.out.print(DeployUtils.reformat("Downloaded "+(results.getTotalDownloadBytes()/1024)+" kB in "+time+"s ("+results.getTotalDownloadBytes()/(1024*time)+" kB/s)", 4, 72));
}
}
if(results.isFinished() && !results.isFailed() && results.getInstalledConfigIDs().length == 1) {
Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java?rev=405624&r1=405623&r2=405624&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandListConfigurations.java Tue May 9 21:08:49 2006
@@ -132,7 +132,7 @@
int time = (int)(System.currentTimeMillis() - start) / 1000;
out.println();
if(!results.isFailed()) {
- out.println(DeployUtils.reformat("**** Installation Complete!", 4, 72));
+ out.print(DeployUtils.reformat("**** Installation Complete!", 4, 72));
for (int i = 0; i < results.getDependenciesPresent().length; i++) {
Artifact uri = results.getDependenciesPresent()[i];
out.print(DeployUtils.reformat("Used existing: "+uri, 4, 72));
@@ -142,7 +142,7 @@
out.print(DeployUtils.reformat("Installed new: "+uri, 4, 72));
}
out.println();
- out.println(DeployUtils.reformat("Downloaded "+(results.getTotalDownloadBytes()/1024)+" kB in "+time+"s ("+results.getTotalDownloadBytes()/(1024*time)+" kB/s)", 4, 72));
+ out.print(DeployUtils.reformat("Downloaded "+(results.getTotalDownloadBytes()/1024)+" kB in "+time+"s ("+results.getTotalDownloadBytes()/(1024*time)+" kB/s)", 4, 72));
}
if(results.isFinished() && !results.isFailed()) {
out.print(DeployUtils.reformat("Now starting "+target.getModuleId()+"...", 4, 72));
Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandLogin.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandLogin.java?rev=405624&r1=405623&r2=405624&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandLogin.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/CommandLogin.java Tue May 9 21:08:49 2006
@@ -77,7 +77,7 @@
props.store(save, "Saved authentication information to connect to Geronimo servers");
save.flush();
save.close();
- System.out.println(DeployUtils.reformat("Saved login for: "+connection.getServerURI(), 4, 72));
+ System.out.print(DeployUtils.reformat("Saved login for: "+connection.getServerURI(), 4, 72));
} catch (IOException e) {
throw new DeploymentException("Unable to save authentication to login file", e);
}
Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/DeployTool.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/DeployTool.java?rev=405624&r1=405623&r2=405624&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/DeployTool.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/DeployTool.java Tue May 9 21:08:49 2006
@@ -201,7 +201,7 @@
private void processException(PrintWriter out, Exception e) {
failed = true;
- out.println(DeployUtils.reformat("Error: "+e.getMessage(),4,72));
+ out.print(DeployUtils.reformat("Error: "+e.getMessage(),4,72));
if(e.getCause() != null) {
e.getCause().printStackTrace(out);
}
@@ -219,7 +219,7 @@
out.println();
out.println(" deployer "+hangingIndent(command.getCommandName()+" "+command.getHelpArgumentList(), 13));
out.println();
- out.println(DeployUtils.reformat(command.getHelpText(), 8, 72));
+ out.print(DeployUtils.reformat(command.getHelpText(), 8, 72));
out.println();
return;
} else if(args[0].equals("options")) {
@@ -230,7 +230,7 @@
String s = (String) it.next();
out.println(" "+s);
out.println();
- out.println(DeployUtils.reformat((String)map.get(s), 8, 72));
+ out.print(DeployUtils.reformat((String)map.get(s), 8, 72));
}
return;
} else if(args[0].equals("all")) {
@@ -241,7 +241,7 @@
for (int i = 0; i < all.length; i++) {
DeployCommand cmd = all[i];
out.println(" deployer "+hangingIndent(cmd.getCommandName()+" "+cmd.getHelpArgumentList(), 13));
- out.println(DeployUtils.reformat(cmd.getHelpText(), 8, 72));
+ out.print(DeployUtils.reformat(cmd.getHelpText(), 8, 72));
}
out.println();
return;
Modified: geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java?rev=405624&r1=405623&r2=405624&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java (original)
+++ geronimo/branches/1.1/modules/deploy-tool/src/java/org/apache/geronimo/deployment/cli/ServerConnection.java Tue May 9 21:08:49 2006
@@ -243,11 +243,11 @@
user = encryped.substring(7, pos);
password = encryped.substring(pos+1);
} else {
- System.out.println(DeployUtils.reformat("Unknown encryption used in saved login file", 4, 72));
+ System.out.print(DeployUtils.reformat("Unknown encryption used in saved login file", 4, 72));
}
}
} catch (IOException e) {
- System.out.println(DeployUtils.reformat("Unable to read authentication from saved login file: "+e.getMessage(), 4, 72));
+ System.out.print(DeployUtils.reformat("Unable to read authentication from saved login file: "+e.getMessage(), 4, 72));
} finally {
try {in.close();}catch(IOException e) {}
}
Modified: geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java?rev=405624&r1=405623&r2=405624&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java (original)
+++ geronimo/branches/1.1/modules/hot-deploy/src/java/org/apache/geronimo/deployment/hot/DirectoryHotDeployer.java Tue May 9 21:08:49 2006
@@ -233,11 +233,11 @@
modules = po.getResultTargetModuleIDs();
for (int i = 0; i < modules.length; i++) {
TargetModuleID result = modules[i];
- System.out.println(DeployUtils.reformat("Deployed "+result.getModuleID()+(targets.length > 1 ? " to "+result.getTarget().getName() : "")+(result.getWebURL() == null ? "" : " @ "+result.getWebURL()), 4, 72));
+ System.out.print(DeployUtils.reformat("Deployed "+result.getModuleID()+(targets.length > 1 ? " to "+result.getTarget().getName() : "")+(result.getWebURL() == null ? "" : " @ "+result.getWebURL()), 4, 72));
if(result.getChildTargetModuleID() != null) {
for (int j = 0; j < result.getChildTargetModuleID().length; j++) {
TargetModuleID child = result.getChildTargetModuleID()[j];
- System.out.println(DeployUtils.reformat(" `-> "+child.getModuleID()+(child.getWebURL() == null ? "" : " @ "+child.getWebURL()),4, 72));
+ System.out.print(DeployUtils.reformat(" `-> "+child.getModuleID()+(child.getWebURL() == null ? "" : " @ "+child.getWebURL()),4, 72));
}
}
}
@@ -286,7 +286,7 @@
TargetModuleID[] modules = po.getResultTargetModuleIDs();
for (int i = 0; i < modules.length; i++) {
TargetModuleID result = modules[i];
- System.out.println(DeployUtils.reformat("Undeployed "+result.getModuleID()+(targets.length > 1 ? " to "+result.getTarget().getName() : ""), 4, 72));
+ System.out.print(DeployUtils.reformat("Undeployed "+result.getModuleID()+(targets.length > 1 ? " to "+result.getTarget().getName() : ""), 4, 72));
}
} else {
log.error("Unable to undeploy "+file.getAbsolutePath()+"("+configId+")"+po.getDeploymentStatus().getMessage());
@@ -318,11 +318,11 @@
TargetModuleID[] modules = po.getResultTargetModuleIDs();
for (int i = 0; i < modules.length; i++) {
TargetModuleID result = modules[i];
- System.out.println(DeployUtils.reformat("Redeployed "+result.getModuleID()+(targets.length > 1 ? " to "+result.getTarget().getName() : "")+(result.getWebURL() == null ? "" : " @ "+result.getWebURL()), 4, 72));
+ System.out.print(DeployUtils.reformat("Redeployed "+result.getModuleID()+(targets.length > 1 ? " to "+result.getTarget().getName() : "")+(result.getWebURL() == null ? "" : " @ "+result.getWebURL()), 4, 72));
if(result.getChildTargetModuleID() != null) {
for (int j = 0; j < result.getChildTargetModuleID().length; j++) {
TargetModuleID child = result.getChildTargetModuleID()[j];
- System.out.println(DeployUtils.reformat(" `-> "+child.getModuleID()+(child.getWebURL() == null ? "" : " @ "+child.getWebURL()),4, 72));
+ System.out.print(DeployUtils.reformat(" `-> "+child.getModuleID()+(child.getWebURL() == null ? "" : " @ "+child.getWebURL()),4, 72));
}
}
}