From 2f93c766ed7fed2c50f55ffda29a08e81387a077 Mon Sep 17 00:00:00 2001 From: Benjamin Culkin Date: Sat, 18 May 2024 20:51:00 -0400 Subject: Continue to improve --- src/main/java/com/ashardalon/maven/tomcat/TomcatMojo.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/main') diff --git a/src/main/java/com/ashardalon/maven/tomcat/TomcatMojo.java b/src/main/java/com/ashardalon/maven/tomcat/TomcatMojo.java index e2a030d..0a5198d 100644 --- a/src/main/java/com/ashardalon/maven/tomcat/TomcatMojo.java +++ b/src/main/java/com/ashardalon/maven/tomcat/TomcatMojo.java @@ -42,7 +42,7 @@ import java.util.Base64; * * @author bjculkin */ -@Mojo( name = "deploy", defaultPhase = LifecyclePhase.PROCESS_SOURCES ) +@Mojo( name = "deploy", defaultPhase = LifecyclePhase.DEPLOY ) public class TomcatMojo extends AbstractMojo { @Component SettingsDecrypter decrypter; @@ -62,7 +62,7 @@ public class TomcatMojo extends AbstractMojo { private String serverName; @Parameter (defaultValue = "http://localhost:8080", property = "serverURL", required = true) private String serverURL; - @Parameter(defaultValue = "${project.build.finalName}", property = "appPath", required = false) + @Parameter(defaultValue = "/${project.build.finalName}", property = "appPath", required = false) private String appPath; public void execute() throws MojoExecutionException { @@ -87,7 +87,6 @@ public class TomcatMojo extends AbstractMojo { Server decServer = decrypt.getServer(); String auth = decServer.getUsername() + ":" + decServer.getPassword(); - System.out.println("auth header: " + auth); byte[] encodedAuth = Base64.getEncoder().encode(auth.getBytes(StandardCharsets.UTF_8)); String authHeaderValue = "Basic " + new String(encodedAuth); @@ -102,7 +101,7 @@ public class TomcatMojo extends AbstractMojo { int res = input.read(); while (res != -1) { output.write(res); - + res = input.read(); } output.close(); -- cgit v1.2.3