diff --git a/boost-common/src/main/java/io/openliberty/boost/common/config/JDBCBoosterPackConfigurator.java b/boost-common/src/main/java/io/openliberty/boost/common/config/JDBCBoosterPackConfigurator.java index f76dd169..80a7606b 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/config/JDBCBoosterPackConfigurator.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/config/JDBCBoosterPackConfigurator.java @@ -33,8 +33,8 @@ public JDBCBoosterPackConfigurator(BoosterDependencyInfo depInfo, LibertyServerC private final String DEPENDENCY_ARTIFACT = "org.apache.derby:derby:10.14.2.0"; /** - * writes out jdbc default config data when selected by the presence of a - * jdbc boost dependency + * writes out jdbc default config data when selected by the presence of a jdbc + * boost dependency */ @Override public void addServerConfig(Document doc) { @@ -90,4 +90,4 @@ public String getDependencyToCopy() { return DEPENDENCY_ARTIFACT; } -} \ No newline at end of file +} diff --git a/boost-common/src/main/java/io/openliberty/boost/common/config/LibertyServerConfigGenerator.java b/boost-common/src/main/java/io/openliberty/boost/common/config/LibertyServerConfigGenerator.java index d041b991..29c32671 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/config/LibertyServerConfigGenerator.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/config/LibertyServerConfigGenerator.java @@ -170,8 +170,7 @@ public void addFeatures(List features) { } /** - * Write the server.xml and bootstrap.properties to the server config - * directory + * Write the server.xml and bootstrap.properties to the server config directory * * @throws TransformerException * @throws IOException @@ -223,4 +222,4 @@ public void addApplication(String appName) { serverRoot.appendChild(appCfg); } -} \ No newline at end of file +} diff --git a/boost-common/src/main/java/io/openliberty/boost/common/docker/AbstractDockerI.java b/boost-common/src/main/java/io/openliberty/boost/common/docker/AbstractDockerI.java index 7e52528a..a27cbe94 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/docker/AbstractDockerI.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/docker/AbstractDockerI.java @@ -21,13 +21,13 @@ import io.openliberty.boost.common.BoostLoggerI; public interface AbstractDockerI { - + public void execute(DockerClient dockerClient) throws BoostException; - + public RegistryAuthSupplier createRegistryAuthSupplier() throws BoostException; - + // Default methods - + default public String getImageName(String repository, String tag) { return repository + ":" + tag; } @@ -45,7 +45,7 @@ default public boolean isRepositoryValid(String repository) { return Pattern.matches(repositoryRegExp, repository); } - + default public DockerClient getDockerClient(boolean useProxy) throws BoostException { final RegistryAuthSupplier authSupplier = createRegistryAuthSupplier(); try { @@ -55,7 +55,8 @@ default public DockerClient getDockerClient(boolean useProxy) throws BoostExcept } } - default public boolean isValidDockerConfig(BoostLoggerI log, String repository, String tag, String artifactId) throws BoostException { + default public boolean isValidDockerConfig(BoostLoggerI log, String repository, String tag, String artifactId) + throws BoostException { if (repository.equals(artifactId) && !repository.equals(repository.toLowerCase())) { repository = artifactId.toLowerCase(); log.debug( diff --git a/boost-common/src/main/java/io/openliberty/boost/common/docker/DockerPushI.java b/boost-common/src/main/java/io/openliberty/boost/common/docker/DockerPushI.java index 11d27c45..7605c4e8 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/docker/DockerPushI.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/docker/DockerPushI.java @@ -19,8 +19,9 @@ import io.openliberty.boost.common.BoostLoggerI; public interface DockerPushI extends AbstractDockerI { - - default public void dockerPush(DockerClient dockerClient, String artifactId, String repository, String tag, BoostLoggerI log) throws BoostException { + + default public void dockerPush(DockerClient dockerClient, String artifactId, String repository, String tag, + BoostLoggerI log) throws BoostException { final DockerLoggingProgressHandler progressHandler = new DockerLoggingProgressHandler(log); final String currentImage = getImageName(repository, tag); String newImage = null; diff --git a/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/Dockerizer.java b/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/Dockerizer.java index 8d9806c4..153d1890 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/Dockerizer.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/Dockerizer.java @@ -146,4 +146,4 @@ private boolean isFileGeneratedByPlugin(File file) throws IOException { return false; } -} \ No newline at end of file +} diff --git a/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/DockerizeSpringBootClasspath.java b/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/DockerizeSpringBootClasspath.java index a63b82fb..ad9d96dd 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/DockerizeSpringBootClasspath.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/DockerizeSpringBootClasspath.java @@ -21,7 +21,7 @@ import io.openliberty.boost.common.docker.DockerParameters; public class DockerizeSpringBootClasspath extends SpringDockerizer { - + public DockerizeSpringBootClasspath(File projectDirectory, File outputDirectory, File appArchive, String springBootVersion, DockerParameters params, BoostLoggerI log) { super(projectDirectory, outputDirectory, appArchive, springBootVersion, params, log); diff --git a/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/DockerizeSpringBootJar.java b/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/DockerizeSpringBootJar.java index 1d1d4bf4..4bb2df0d 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/DockerizeSpringBootJar.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/DockerizeSpringBootJar.java @@ -29,7 +29,7 @@ public DockerizeSpringBootJar(File projectDirectory, File outputDirectory, File public Map getBuildArgs() { Map buildArgs = new HashMap(); - buildArgs.put("JAR_FILE", getAppPathString() + "/" + appArchive.getName()); + buildArgs.put("JAR_FILE", getAppPathString() + "/" + appArchive.getName()); return buildArgs; } diff --git a/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/SpringDockerizer.java b/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/SpringDockerizer.java index ccca7dec..9fb9e624 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/SpringDockerizer.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/docker/dockerizer/spring/SpringDockerizer.java @@ -28,11 +28,12 @@ import net.wasdev.wlp.common.plugins.util.SpringBootUtil; public abstract class SpringDockerizer extends Dockerizer { - + public final String SPRING_BOOT_VERSION; public final DockerParameters params; - public SpringDockerizer(File projectDirectory, File outputDirectory, File appArchive, String springBootVersion, DockerParameters params, BoostLoggerI log) { + public SpringDockerizer(File projectDirectory, File outputDirectory, File appArchive, String springBootVersion, + DockerParameters params, BoostLoggerI log) { super(projectDirectory, outputDirectory, appArchive, log); this.SPRING_BOOT_VERSION = springBootVersion; this.params = params; @@ -62,7 +63,7 @@ public void createDockerFile() throws BoostException { throw new BoostException("Unable to create a Dockerfile because application type is not supported"); } } - + protected String getAppPathString() { Path projPath = projectDirectory.toPath(); @@ -82,12 +83,10 @@ protected String getSpringStartClass() throws BoostException { Attributes attributes = manifest.getMainAttributes(); return attributes.getValue("Start-Class"); } else { - throw new BoostException( - "Could not get Spring Boot start class due to error getting app manifest."); + throw new BoostException("Could not get Spring Boot start class due to error getting app manifest."); } } catch (IOException e) { - throw new BoostException("Could not get Spring Boot start class due to error opening app archive.", - e); + throw new BoostException("Could not get Spring Boot start class due to error opening app archive.", e); } } @@ -113,4 +112,4 @@ private void writeSpringBootDockerFile(File dockerFile, String startClass) throw } } -} \ No newline at end of file +} diff --git a/boost-common/src/main/java/io/openliberty/boost/common/utils/LibertyBoosterUtil.java b/boost-common/src/main/java/io/openliberty/boost/common/utils/LibertyBoosterUtil.java index 47844df7..6b8ab577 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/utils/LibertyBoosterUtil.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/utils/LibertyBoosterUtil.java @@ -63,8 +63,8 @@ public LibertyBoosterUtil(String libertyServerPath, List } /** - * take a list of pom boost dependency strings and map to liberty features - * for config. return a list of feature configuration objects for each found + * take a list of pom boost dependency strings and map to liberty features for + * config. return a list of feature configuration objects for each found * dependency. * * @param dependencies diff --git a/boost-common/src/main/java/io/openliberty/boost/common/utils/SpringBootUtil.java b/boost-common/src/main/java/io/openliberty/boost/common/utils/SpringBootUtil.java index daceaab8..197580ab 100644 --- a/boost-common/src/main/java/io/openliberty/boost/common/utils/SpringBootUtil.java +++ b/boost-common/src/main/java/io/openliberty/boost/common/utils/SpringBootUtil.java @@ -64,10 +64,9 @@ public class SpringBootUtil { private static final String SPRING_WEBSOCKET = "spring-websocket"; /** - * Get the expected path of the Spring Boot Uber JAR (with .spring - * extension) that was preserved during the Boost packaging process. No - * guarantee that the path exists or the artifact is indeed a Spring Boot - * Uber JAR. + * Get the expected path of the Spring Boot Uber JAR (with .spring extension) + * that was preserved during the Boost packaging process. No guarantee that the + * path exists or the artifact is indeed a Spring Boot Uber JAR. * * @param artifact * @return the canonical path @@ -115,8 +114,8 @@ public static File copySpringBootUberJar(File artifact, BoostLoggerI logger) thr } /** - * Add the Spring Boot Version property to the Manifest file in the Liberty - * Uber JAR. This is to trick Spring Boot into not repackaging it. + * Add the Spring Boot Version property to the Manifest file in the Liberty Uber + * JAR. This is to trick Spring Boot into not repackaging it. * * @param artifact * @param springBootVersion diff --git a/boost-common/src/test/java/io/openliberty/boost/common/config/LibertyServerConfigGeneratorTest.java b/boost-common/src/test/java/io/openliberty/boost/common/config/LibertyServerConfigGeneratorTest.java index ffdca4c6..0725e9e0 100644 --- a/boost-common/src/test/java/io/openliberty/boost/common/config/LibertyServerConfigGeneratorTest.java +++ b/boost-common/src/test/java/io/openliberty/boost/common/config/LibertyServerConfigGeneratorTest.java @@ -70,4 +70,4 @@ public void testZeroFeaturesInDefaultServerConfig() assertEquals("Didn't find empty list of features", 0, featureList.size()); } -} \ No newline at end of file +} diff --git a/boost-gradle/src/test/resources/jaxrsTestApp/src/main/java/com/example/HelloResource.java b/boost-gradle/src/test/resources/jaxrsTestApp/src/main/java/com/example/HelloResource.java index 7c4cb4b7..1f37cbd0 100644 --- a/boost-gradle/src/test/resources/jaxrsTestApp/src/main/java/com/example/HelloResource.java +++ b/boost-gradle/src/test/resources/jaxrsTestApp/src/main/java/com/example/HelloResource.java @@ -22,4 +22,4 @@ public class HelloResource { public String getInformation() throws Exception, IOException { return "Hello World From Your Friends at Liberty Boost EE!"; } -} \ No newline at end of file +} diff --git a/boost-gradle/src/test/resources/springApp/src/main/java/hello/HelloController.java b/boost-gradle/src/test/resources/springApp/src/main/java/hello/HelloController.java index d9c1069c..8a85245c 100644 --- a/boost-gradle/src/test/resources/springApp/src/main/java/hello/HelloController.java +++ b/boost-gradle/src/test/resources/springApp/src/main/java/hello/HelloController.java @@ -5,10 +5,10 @@ @RestController public class HelloController { - + @RequestMapping("/") public String index() { return "Greetings from Spring Boot!"; } - + } diff --git a/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/HelloController.java b/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/HelloController.java index d9c1069c..8a85245c 100644 --- a/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/HelloController.java +++ b/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/HelloController.java @@ -5,10 +5,10 @@ @RestController public class HelloController { - + @RequestMapping("/") public String index() { return "Greetings from Spring Boot!"; } - + } diff --git a/boost-maven/boost-maven-plugin/src/it/pom.xml b/boost-maven/boost-maven-plugin/src/it/pom.xml index 4b93d782..145c0f20 100644 --- a/boost-maven/boost-maven-plugin/src/it/pom.xml +++ b/boost-maven/boost-maven-plugin/src/it/pom.xml @@ -25,7 +25,7 @@ test-spring-boot-ssl test-jaxrs-2.0 test-jaxrs-2.1 - test-context + test-dynamic-update diff --git a/boost-maven/boost-maven-plugin/src/it/test-context/pom.xml b/boost-maven/boost-maven-plugin/src/it/test-dynamic-update/pom.xml similarity index 98% rename from boost-maven/boost-maven-plugin/src/it/test-context/pom.xml rename to boost-maven/boost-maven-plugin/src/it/test-dynamic-update/pom.xml index 2e019a7e..0d5fcfaf 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-context/pom.xml +++ b/boost-maven/boost-maven-plugin/src/it/test-dynamic-update/pom.xml @@ -2,7 +2,7 @@ 4.0.0 io.openliberty.boost - test-context + test-dynamic-update war 1.0-SNAPSHOT diff --git a/boost-maven/boost-maven-plugin/src/it/test-context/src/main/java/com/example/HelloResource.java b/boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/java/com/example/HelloResource.java similarity index 79% rename from boost-maven/boost-maven-plugin/src/it/test-context/src/main/java/com/example/HelloResource.java rename to boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/java/com/example/HelloResource.java index 75434c76..133fffbf 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-context/src/main/java/com/example/HelloResource.java +++ b/boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/java/com/example/HelloResource.java @@ -11,16 +11,15 @@ //import com.ibm.json.java.JSONArray; //import com.ibm.json.java.JSONObject; - // This class define the RESTful API to fetch the database service information // /api/hello @Path("/hello") public class HelloResource { - @GET - @Produces("text/plain") - public String getInformation() throws Exception, IOException { - return "Hello World From Your Friends at Liberty Boost EE! - pass 1"; - } -} \ No newline at end of file + @GET + @Produces("text/plain") + public String getInformation() throws Exception, IOException { + return "Hello World From Your Friends at Liberty Boost EE! - pass 1"; + } +} diff --git a/boost-maven/boost-maven-plugin/src/it/test-context/src/main/webapp/META-INF/MANIFEST.MF b/boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/webapp/META-INF/MANIFEST.MF similarity index 100% rename from boost-maven/boost-maven-plugin/src/it/test-context/src/main/webapp/META-INF/MANIFEST.MF rename to boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/webapp/META-INF/MANIFEST.MF diff --git a/boost-maven/boost-maven-plugin/src/it/test-context/src/main/webapp/WEB-INF/web.xml b/boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from boost-maven/boost-maven-plugin/src/it/test-context/src/main/webapp/WEB-INF/web.xml rename to boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/webapp/WEB-INF/web.xml diff --git a/boost-maven/boost-maven-plugin/src/it/test-context/src/main/webapp/index.html b/boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/webapp/index.html similarity index 100% rename from boost-maven/boost-maven-plugin/src/it/test-context/src/main/webapp/index.html rename to boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/main/webapp/index.html diff --git a/boost-maven/boost-maven-plugin/src/it/test-context/src/test/java/it/EndpointIT.java b/boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/test/java/it/EndpointIT.java similarity index 100% rename from boost-maven/boost-maven-plugin/src/it/test-context/src/test/java/it/EndpointIT.java rename to boost-maven/boost-maven-plugin/src/it/test-dynamic-update/src/test/java/it/EndpointIT.java diff --git a/boost-maven/boost-maven-plugin/src/it/test-jaxrs-2.0/src/main/java/com/example/HelloResource.java b/boost-maven/boost-maven-plugin/src/it/test-jaxrs-2.0/src/main/java/com/example/HelloResource.java index 7c4cb4b7..1f37cbd0 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-jaxrs-2.0/src/main/java/com/example/HelloResource.java +++ b/boost-maven/boost-maven-plugin/src/it/test-jaxrs-2.0/src/main/java/com/example/HelloResource.java @@ -22,4 +22,4 @@ public class HelloResource { public String getInformation() throws Exception, IOException { return "Hello World From Your Friends at Liberty Boost EE!"; } -} \ No newline at end of file +} diff --git a/boost-maven/boost-maven-plugin/src/it/test-jaxrs-2.1/src/main/java/com/example/HelloResource.java b/boost-maven/boost-maven-plugin/src/it/test-jaxrs-2.1/src/main/java/com/example/HelloResource.java index 7c4cb4b7..1f37cbd0 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-jaxrs-2.1/src/main/java/com/example/HelloResource.java +++ b/boost-maven/boost-maven-plugin/src/it/test-jaxrs-2.1/src/main/java/com/example/HelloResource.java @@ -22,4 +22,4 @@ public class HelloResource { public String getInformation() throws Exception, IOException { return "Hello World From Your Friends at Liberty Boost EE!"; } -} \ No newline at end of file +} diff --git a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/main/java/application/Application.java b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/main/java/application/Application.java index 088fbdce..bdd04a39 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/main/java/application/Application.java +++ b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/main/java/application/Application.java @@ -28,4 +28,4 @@ public String hello() { return "Greetings from Spring Boot!"; } -} \ No newline at end of file +} diff --git a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/test/java/application/DockerBuildIT.java b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/test/java/application/DockerBuildIT.java index 21c9d3d4..4effd65d 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/test/java/application/DockerBuildIT.java +++ b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/test/java/application/DockerBuildIT.java @@ -156,7 +156,7 @@ public void testDockerContainerRunning() throws Exception { } public void testAppRunningOnEndpoint() throws Exception { - URL requestUrl = new URL("http://" + getTestDockerHost() + ":" + port + "/spring/"); + URL requestUrl = new URL("http://" + getTestDockerHost() + ":" + port + "/spring"); HttpURLConnection conn = (HttpURLConnection) requestUrl.openConnection(); if (conn != null) { @@ -185,4 +185,4 @@ private static String getTestDockerHost() { } } -} \ No newline at end of file +} diff --git a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/test/java/application/DockerPushIT.java b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/test/java/application/DockerPushIT.java index c631c52e..c4d1eaef 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/test/java/application/DockerPushIT.java +++ b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-docker/src/test/java/application/DockerPushIT.java @@ -84,4 +84,4 @@ private void removeImage(String imageName) throws Exception { Image removedImage = getImage(imageName); assertNull(imageName + " was not removed.", removedImage); } -} \ No newline at end of file +} diff --git a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-ssl/src/test/java/it/EndpointIT.java b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-ssl/src/test/java/it/EndpointIT.java index c31c97a1..3ba68e66 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-ssl/src/test/java/it/EndpointIT.java +++ b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-ssl/src/test/java/it/EndpointIT.java @@ -39,22 +39,20 @@ public static void init() { @Test public void testServlet() throws Exception { - - SSLContext sslContext = new SSLContextBuilder() - .loadTrustMaterial(null, (certificate, authType) -> true).build(); - - CloseableHttpClient client = HttpClients.custom() - .setSSLContext(sslContext) - .setSSLHostnameVerifier(new NoopHostnameVerifier()) - .build(); - + + SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, (certificate, authType) -> true) + .build(); + + CloseableHttpClient client = HttpClients.custom().setSSLContext(sslContext) + .setSSLHostnameVerifier(new NoopHostnameVerifier()).build(); + HttpGet httpGet = new HttpGet(URL); httpGet.setHeader("Accept", "application/xml"); - + HttpResponse response = client.execute(httpGet); - + assertEquals("HTTP GET failed", HttpStatus.SC_OK, response.getStatusLine().getStatusCode()); - + ResponseHandler handler = new BasicResponseHandler(); String body = handler.handleResponse(response); diff --git a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-websocket/src/main/java/hello/WebSocketConfig.java b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-websocket/src/main/java/hello/WebSocketConfig.java index 241e1d2f..d46e285f 100644 --- a/boost-maven/boost-maven-plugin/src/it/test-spring-boot-websocket/src/main/java/hello/WebSocketConfig.java +++ b/boost-maven/boost-maven-plugin/src/it/test-spring-boot-websocket/src/main/java/hello/WebSocketConfig.java @@ -21,4 +21,4 @@ public void registerStompEndpoints(StompEndpointRegistry registry) { registry.addEndpoint("/gs-guide-websocket").withSockJS(); } -} \ No newline at end of file +} diff --git a/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/docker/AbstractDockerMojo.java b/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/docker/AbstractDockerMojo.java index 69c079da..d8b3841d 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/docker/AbstractDockerMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/docker/AbstractDockerMojo.java @@ -69,7 +69,7 @@ public abstract class AbstractDockerMojo extends AbstractMojo implements Abstrac @Override public void execute() throws MojoExecutionException { try { - if(isValidDockerConfig(BoostLogger.getInstance(), repository, tag, project.getArtifactId())) { + if (isValidDockerConfig(BoostLogger.getInstance(), repository, tag, project.getArtifactId())) { execute(getDockerClient(useProxy)); } } catch (BoostException e) { diff --git a/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/liberty/LibertyPackageMojo.java b/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/liberty/LibertyPackageMojo.java index 36f6882e..ee9d6660 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/liberty/LibertyPackageMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/liberty/LibertyPackageMojo.java @@ -59,16 +59,15 @@ public void execute() throws MojoExecutionException { createServer(); /** - * Whether the packaged Liberty Uber JAR will be the project artifact. - * This should be the case in Spring Boot scenarios since Spring Boot - * developers expect a runnable JAR. + * Whether the packaged Liberty Uber JAR will be the project artifact. This + * should be the case in Spring Boot scenarios since Spring Boot developers + * expect a runnable JAR. */ boolean attach; /** - * Use the classifier to determine whether we need to set the Liberty - * Uber JAR as the project artifact, and add Spring-Boot-Version to the - * manifest + * Use the classifier to determine whether we need to set the Liberty Uber JAR + * as the project artifact, and add Spring-Boot-Version to the manifest */ String springBootClassifier = null; @@ -193,8 +192,8 @@ private void generateServerConfigEE() throws MojoExecutionException { } /** - * Manipulate the manifest so that Spring Boot will not attempt to repackage - * a Liberty Uber JAR. + * Manipulate the manifest so that Spring Boot will not attempt to repackage a + * Liberty Uber JAR. * * @param springBootVersion * @throws MojoExecutionException @@ -215,8 +214,8 @@ private void addSpringBootVersionToManifest(String springBootVersion) throws Moj /** * Check that we either have a Liberty Uber JAR (in which case this is a - * re-execution) or a Spring Boot Uber JAR (from which we will create a - * Liberty Uber JAR) when we begin the packaging for Spring Boot projects. + * re-execution) or a Spring Boot Uber JAR (from which we will create a Liberty + * Uber JAR) when we begin the packaging for Spring Boot projects. * * @throws MojoExecutionException */ @@ -229,8 +228,8 @@ private void validateSpringBootUberJAR(File springBootUberJar) throws MojoExecut } /** - * Copy the Spring Boot uber JAR back as the project artifact, only if - * Spring Boot didn't create it already + * Copy the Spring Boot uber JAR back as the project artifact, only if Spring + * Boot didn't create it already * * @throws MojoExecutionException */ @@ -303,8 +302,8 @@ private void installMissingFeatures() throws MojoExecutionException { } /** - * Get all booster dependencies and invoke the maven-dependency-plugin to - * copy them to the Liberty server. + * Get all booster dependencies and invoke the maven-dependency-plugin to copy + * them to the Liberty server. * * @throws MojoExecutionException * @@ -328,15 +327,14 @@ private void copyBoosterDependencies() throws MojoExecutionException { } /** - * Invoke the liberty-maven-plugin to package the server into a runnable - * Liberty JAR + * Invoke the liberty-maven-plugin to package the server into a runnable Liberty + * JAR * * @param packageFilePath * the Spring Boot Uber JAR file path, whose contents will be * replaced by the Liberty Uber JAR * @param attach - * whether or not to make the packaged server the project - * artifact + * whether or not to make the packaged server the project artifact * @throws MojoExecutionException */ private void createUberJar(String packageFilePath, boolean attach) throws MojoExecutionException { diff --git a/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/utils/MavenProjectUtil.java b/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/utils/MavenProjectUtil.java index 0198f5ad..38116046 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/utils/MavenProjectUtil.java +++ b/boost-maven/boost-maven-plugin/src/main/java/io/openliberty/boost/maven/utils/MavenProjectUtil.java @@ -42,8 +42,8 @@ public static String findSpringBootVersion(MavenProject project) { /** * Get all dependencies with "org.springframework" as the groupId. These - * dependencies will be used to determine which additional Liberty features - * need to be enabled. + * dependencies will be used to determine which additional Liberty features need + * to be enabled. * */ public static List getSpringFrameworkDependencies(MavenProject project) { diff --git a/pre-commit.template b/pre-commit.template index 0f6d7e28..3c80b11e 100755 --- a/pre-commit.template +++ b/pre-commit.template @@ -37,7 +37,7 @@ statusFile=status.$RANDOM fileCommand="git status --porcelain 2>&1 > $statusFile" $(eval $fileCommand) -newlist=Y +newList=Y while read -r do line="$REPLY" @@ -64,11 +64,11 @@ do # We had some inconsistencies with Git versions and sed versions, so hopefully this covers all cases. newFileCmd="echo \"$line\" | sed 's/.* //'" newFile=$(eval "$newFileCmd") - if [ $newlist == "Y" ] ; then + if [ $newList == "Y" ] ; then # formatFiles are input to the eclipse formatter formatFiles=$PROJECT_LOCATION/$newFile checkIfFormatted=$newFile - newlist=N + newList=N else formatFiles="$formatFiles $PROJECT_LOCATION/$newFile" checkIfFormatted="$checkIfFormatted $newFile" @@ -78,7 +78,7 @@ do # Note the sed output is an absolute path including project location newFileCmd="echo $line | cut -c 3- | sed -e 's|^|$PROJECT_LOCATION/|'" newFile=$(eval "$newFileCmd") - if [ $newlist == "Y" ] ; then + if [ $newList == "Y" ] ; then formatFiles="$newFile" checkIfFormatted=$newFile newList=N