From 85f3629058845145a3e1faab5ca3e9abb0cda01e Mon Sep 17 00:00:00 2001 From: mattbsox Date: Tue, 13 Aug 2019 10:21:34 -0500 Subject: [PATCH 01/10] Adding parameters to Maven Liberty runtime --- .../java/boost/common/runtimes/RuntimeI.java | 16 ++-- .../java/boost/maven/plugin/AbstractMojo.java | 10 ++- .../java/boost/maven/plugin/DebugMojo.java | 2 +- .../java/boost/maven/plugin/PackageMojo.java | 2 +- .../main/java/boost/maven/plugin/RunMojo.java | 2 +- .../java/boost/maven/plugin/StartMojo.java | 2 +- .../java/boost/maven/plugin/StopMojo.java | 2 +- boost-maven/boost-runtimes/pom.xml | 4 +- .../runtimes/openliberty/LibertyRuntime.java | 84 +++++++++---------- 9 files changed, 64 insertions(+), 60 deletions(-) diff --git a/boost-common/src/main/java/boost/common/runtimes/RuntimeI.java b/boost-common/src/main/java/boost/common/runtimes/RuntimeI.java index b59993c9..c00bafa2 100644 --- a/boost-common/src/main/java/boost/common/runtimes/RuntimeI.java +++ b/boost-common/src/main/java/boost/common/runtimes/RuntimeI.java @@ -10,18 +10,22 @@ *******************************************************************************/ package boost.common.runtimes; +import java.util.List; + import boost.common.BoostException; +import boost.common.boosters.AbstractBoosterConfig; public abstract interface RuntimeI { + //Will need to pass in plugin mojo/task to Maven/Gradle along with project object + + public void doPackage(List boosterConfigs, Object project, Object pluginTask) throws BoostException; - public void doPackage() throws BoostException; - - public void doDebug(boolean clean) throws BoostException; + public void doDebug(Object project, Object pluginTask) throws BoostException; - public void doRun(boolean clean) throws BoostException; + public void doRun(Object project, Object pluginTask) throws BoostException; - public void doStart(boolean clean, int verifyTimeout, int serverStartTimeout) throws BoostException; + public void doStart(Object project, Object pluginTask) throws BoostException; - public void doStop() throws BoostException; + public void doStop(Object project, Object pluginTask) throws BoostException; } diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/AbstractMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/AbstractMojo.java index aa6dc2f4..e4a4c018 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/AbstractMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/AbstractMojo.java @@ -81,10 +81,14 @@ protected Plugin getMavenDependencyPlugin() throws MojoExecutionException { return plugin(groupId(mavenDependencyPluginGroupId), artifactId(mavenDependencyPluginArtifactId)); } - protected ExecutionEnvironment getExecutionEnvironment() { + public ExecutionEnvironment getExecutionEnvironment() { return executionEnvironment(project, session, pluginManager); } + public List getBoosterConfigs() { + return boosterConfigs; + } + @Override public void execute() throws MojoExecutionException { try { @@ -114,8 +118,6 @@ public void execute() throws MojoExecutionException { protected RuntimeI getRuntimeInstance() throws MojoExecutionException { if (runtime == null) { - RuntimeParams params = new RuntimeParams(boosterConfigs, getExecutionEnvironment(), project, getLog(), - repoSystem, repoSession, remoteRepos, getMavenDependencyPlugin()); try { ServiceLoader runtimes = ServiceLoader.load(RuntimeI.class, projectClassLoader); if (!runtimes.iterator().hasNext()) { @@ -127,7 +129,7 @@ protected RuntimeI getRuntimeInstance() throws MojoExecutionException { throw new MojoExecutionException( "There are multiple Boost runtimes on the classpath. Configure the project to use one runtime and restart the build."); } - runtime = runtimeI.getClass().getConstructor(params.getClass()).newInstance(params); + runtime = runtimeI.getClass().getDeclaredConstructor().newInstance(); } } catch (IllegalAccessException | InstantiationException | InvocationTargetException | NoSuchMethodException e) { diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/DebugMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/DebugMojo.java index 18c1d4fc..f38df95b 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/DebugMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/DebugMojo.java @@ -34,7 +34,7 @@ public class DebugMojo extends AbstractMojo { public void execute() throws MojoExecutionException { super.execute(); try { - this.getRuntimeInstance().doDebug(clean); + this.getRuntimeInstance().doDebug(project, this); } catch (BoostException e) { throw new MojoExecutionException("Error debugging server", e); } diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/PackageMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/PackageMojo.java index db7ab02d..c810c129 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/PackageMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/PackageMojo.java @@ -30,7 +30,7 @@ public class PackageMojo extends AbstractMojo { public void execute() throws MojoExecutionException { super.execute(); try { - this.getRuntimeInstance().doPackage(); + this.getRuntimeInstance().doPackage(getBoosterConfigs(), project, this); } catch (BoostException e) { throw new MojoExecutionException("Error performing server package", e); } diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/RunMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/RunMojo.java index e119a3f5..0a15d244 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/RunMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/RunMojo.java @@ -34,7 +34,7 @@ public void execute() throws MojoExecutionException { super.execute(); try { - this.getRuntimeInstance().doRun(clean); + this.getRuntimeInstance().doRun(project, this); } catch (BoostException e) { throw new MojoExecutionException("Error running server", e); } diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StartMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StartMojo.java index eb780707..354736c4 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StartMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StartMojo.java @@ -47,7 +47,7 @@ public void execute() throws MojoExecutionException { super.execute(); try { - this.getRuntimeInstance().doStart(clean, verifyTimeout, serverStartTimeout); + this.getRuntimeInstance().doStart(project, this); } catch (BoostException e) { throw new MojoExecutionException("Error starting server", e); } diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StopMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StopMojo.java index 993b4d82..5f1fe3fe 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StopMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StopMojo.java @@ -28,7 +28,7 @@ public void execute() throws MojoExecutionException { super.execute(); try { - this.getRuntimeInstance().doStop(); + this.getRuntimeInstance().doStop(project, this); } catch (BoostException e) { throw new MojoExecutionException("Error stopping server", e); } diff --git a/boost-maven/boost-runtimes/pom.xml b/boost-maven/boost-runtimes/pom.xml index 424d4728..4a475322 100644 --- a/boost-maven/boost-runtimes/pom.xml +++ b/boost-maven/boost-runtimes/pom.xml @@ -14,8 +14,8 @@ runtime-openliberty - - runtime-tomee + + diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java b/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java index 7dbd5cf0..2ca85d4e 100644 --- a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java +++ b/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java @@ -37,54 +37,48 @@ import boost.common.config.BoosterConfigurator; import boost.common.config.ConfigConstants; import boost.common.runtimes.RuntimeI; +import boost.maven.plugin.AbstractMojo; import boost.maven.runtimes.RuntimeParams; import boost.maven.utils.BoostLogger; import boost.maven.utils.MavenProjectUtil; import boost.runtimes.openliberty.boosters.LibertyBoosterI; public class LibertyRuntime implements RuntimeI { - private final List boosterConfigs; - private final ExecutionEnvironment env; - private final MavenProject project; - private final Plugin mavenDepPlugin; - private final String serverName = "BoostServer"; - private final String projectBuildDir; - private final String libertyServerPath; + private final String serversDir = "/liberty/wlp/usr/servers/"; private final String runtimeGroupId = "io.openliberty"; private final String runtimeArtifactId = "openliberty-runtime"; private final String runtimeVersion = "19.0.0.3"; + private String libertyServerPath; + + private MavenProject project; + private ExecutionEnvironment env; + private String libertyMavenPluginGroupId = "net.wasdev.wlp.maven.plugins"; private String libertyMavenPluginArtifactId = "liberty-maven-plugin"; private String libertyMavenPluginVersion = "2.6.3"; - public LibertyRuntime() { - this.boosterConfigs = null; - this.env = null; - this.project = null; - this.projectBuildDir = null; - this.libertyServerPath = null; - this.mavenDepPlugin = null; - } + private String mavenDependencyPluginGroupId = "org.apache.maven.plugins"; + private String mavenDependencyPluginArtifactId = "maven-dependency-plugin"; - public LibertyRuntime(RuntimeParams runtimeParams) { - this.boosterConfigs = runtimeParams.getBoosterConfigs(); - this.env = runtimeParams.getEnv(); - this.project = runtimeParams.getProject(); - this.projectBuildDir = project.getBuild().getDirectory(); - this.libertyServerPath = projectBuildDir + "/liberty/wlp/usr/servers/" + serverName; - this.mavenDepPlugin = runtimeParams.getMavenDepPlugin(); - } + public LibertyRuntime() {} private Plugin getPlugin() throws MojoExecutionException { return plugin(groupId(libertyMavenPluginGroupId), artifactId(libertyMavenPluginArtifactId), version(libertyMavenPluginVersion)); } + public ExecutionEnvironment getExecutionEnvironment() { + return env; + } + @Override - public void doPackage() throws BoostException { + public void doPackage(List boosterConfigs, Object mavenProject, Object pluginTask) throws BoostException { + project = (MavenProject)mavenProject; + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); + libertyServerPath = project.getBuild().getDirectory() + serversDir + serverName; String javaCompilerTargetVersion = MavenProjectUtil.getJavaCompilerTargetVersion(project); System.setProperty(BoostProperties.INTERNAL_COMPILER_TARGET, javaCompilerTargetVersion); try { @@ -133,6 +127,8 @@ private void copyBoosterDependencies(List boosterConfigs) List dependenciesToCopy = BoosterConfigurator.getDependenciesToCopy(boosterConfigs, BoostLogger.getInstance()); + Plugin mavenDepPlugin = plugin(groupId(mavenDependencyPluginGroupId), artifactId(mavenDependencyPluginArtifactId)); + for (String dep : dependenciesToCopy) { String[] dependencyInfo = dep.split(":"); @@ -143,7 +139,7 @@ private void copyBoosterDependencies(List boosterConfigs) element(name("artifactItem"), element(name("groupId"), dependencyInfo[0]), element(name("artifactId"), dependencyInfo[1]), element(name("version"), dependencyInfo[2])))), - env); + getExecutionEnvironment()); } } @@ -236,7 +232,7 @@ private void generateLibertyServerConfig(List boosterConf */ private void createLibertyServer() throws MojoExecutionException { executeMojo(getPlugin(), goal("create-server"), - configuration(element(name("serverName"), serverName), getRuntimeArtifactElement()), env); + configuration(element(name("serverName"), serverName), getRuntimeArtifactElement()), getExecutionEnvironment()); } /** @@ -248,7 +244,7 @@ private void createLibertyServer() throws MojoExecutionException { */ private void installMissingFeatures() throws MojoExecutionException { executeMojo(getPlugin(), goal("install-feature"), configuration(element(name("serverName"), serverName), - element(name("features"), element(name("acceptLicense"), "false"))), env); + element(name("features"), element(name("acceptLicense"), "false"))), getExecutionEnvironment()); } /** @@ -262,7 +258,7 @@ private void installApp(String installAppPackagesVal) throws MojoExecutionExcept configuration.addChild(element(name("appsDirectory"), "apps").toDom()); configuration.addChild(element(name("looseApplication"), "true").toDom()); - executeMojo(getPlugin(), goal("install-apps"), configuration, env); + executeMojo(getPlugin(), goal("install-apps"), configuration, getExecutionEnvironment()); } private Element getRuntimeArtifactElement() { @@ -280,24 +276,26 @@ private void createUberJar() throws MojoExecutionException { configuration(element(name("isInstall"), "false"), element(name("include"), "minify,runnable"), element(name("outputDirectory"), "target/liberty-alt-output-dir"), element(name("packageFile"), ""), element(name("serverName"), serverName)), - env); + getExecutionEnvironment()); } @Override - public void doDebug(boolean clean) throws BoostException { + public void doDebug(Object project, Object pluginTask) throws BoostException { try { - executeMojo(getPlugin(), goal("debug"), configuration(element(name("serverName"), serverName), - element(name("clean"), String.valueOf(clean)), getRuntimeArtifactElement()), env); + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); + executeMojo(getPlugin(), goal("debug"), configuration(element(name("serverName"), serverName), getRuntimeArtifactElement()), + getExecutionEnvironment()); } catch (MojoExecutionException e) { throw new BoostException("Error debugging Liberty server", e); } } @Override - public void doRun(boolean clean) throws BoostException { + public void doRun(Object project, Object pluginTask) throws BoostException { try { - executeMojo(getPlugin(), goal("run"), configuration(element(name("serverName"), serverName), - element(name("clean"), String.valueOf(clean)), getRuntimeArtifactElement()), env); + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); + executeMojo(getPlugin(), goal("run"), configuration(element(name("serverName"), serverName), getRuntimeArtifactElement()), + getExecutionEnvironment()); } catch (MojoExecutionException e) { throw new BoostException("Error running Liberty server", e); } @@ -305,24 +303,24 @@ public void doRun(boolean clean) throws BoostException { } @Override - public void doStart(boolean clean, int verifyTimeout, int serverStartTimeout) throws BoostException { + public void doStart(Object project, Object pluginTask) throws BoostException { try { + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); executeMojo(getPlugin(), goal("start"), - configuration(element(name("serverName"), serverName), - element(name("verifyTimeout"), String.valueOf(verifyTimeout)), - element(name("serverStartTimeout"), String.valueOf(serverStartTimeout)), - element(name("clean"), String.valueOf(clean)), getRuntimeArtifactElement()), - env); + configuration(element(name("serverName"), serverName), getRuntimeArtifactElement()), + getExecutionEnvironment()); } catch (MojoExecutionException e) { throw new BoostException("Error starting Liberty server", e); } } @Override - public void doStop() throws BoostException { + public void doStop(Object project, Object pluginTask) throws BoostException { try { + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); executeMojo(getPlugin(), goal("stop"), - configuration(element(name("serverName"), serverName), getRuntimeArtifactElement()), env); + configuration(element(name("serverName"), serverName), getRuntimeArtifactElement()), + getExecutionEnvironment()); } catch (MojoExecutionException e) { throw new BoostException("Error stopping Liberty server", e); } From 352e4120e195dc98e4acb7d864a38535d303574a Mon Sep 17 00:00:00 2001 From: mattbsox Date: Wed, 14 Aug 2019 12:55:12 -0500 Subject: [PATCH 02/10] Adding Liberty runtime to boost-gradle --- boost-gradle/build.gradle | 28 +- .../gradle/wrapper/gradle-wrapper.jar | Bin 55190 -> 0 bytes .../gradle/wrapper/gradle-wrapper.properties | 5 - boost-gradle/openliberty-gradle/build.gradle | 30 ++ .../openliberty/LibertyGradleRuntime.java | 293 ++++++++++++++++++ .../LibertyServerConfigGenerator.java | 244 +++++++++++++++ .../boosters/LibertyBoosterI.java} | 18 +- .../boosters/LibertyCDIBoosterConfig.java | 39 +++ .../boosters/LibertyJDBCBoosterConfig.java | 127 ++++++++ .../boosters/LibertyJPABoosterConfig.java | 44 +++ .../boosters/LibertyJSONPBoosterConfig.java | 41 +++ .../boosters/LibertyJaxRSBoosterConfig.java | 44 +++ .../LibertyMPConfigBoosterConfig.java | 41 +++ .../LibertyMPHealthBoosterConfig.java | 41 +++ .../LibertyMPOpenTracingBoosterConfig.java | 42 +++ .../LibertyMPRestClientBoosterConfig.java | 42 +++ .../boost.gradle.runtimes.GradleRuntimeI | 1 + .../io/openliberty/boost/gradle/Boost.groovy | 50 +-- .../boost/gradle/BoostTaskFactory.groovy | 16 +- .../gradle/extensions/BoostExtension.groovy | 9 +- .../extensions/BoostPackageExtension.groovy | 2 +- .../gradle/runtimes/GradleRuntimeI.groovy | 8 + .../gradle/tasks/AbstractBoostTask.groovy | 87 +++++- .../boost/gradle/tasks/BoostDebugTask.groovy | 6 +- .../gradle/tasks/BoostPackageTask.groovy | 278 +---------------- .../boost/gradle/tasks/BoostRunTask.groovy | 6 +- .../boost/gradle/tasks/BoostStartTask.groovy | 5 +- .../boost/gradle/tasks/BoostStopTask.groovy | 6 +- .../docker/AbstractBoostDockerTask.groovy | 69 ----- .../tasks/docker/BoostDockerBuildTask.groovy | 123 -------- .../tasks/docker/BoostDockerPushTask.groovy | 50 --- .../boost/gradle/utils/BoostLogger.groovy | 4 +- .../gradle/utils/GradleProjectUtil.groovy | 23 +- .../groovy/AbstractBoostDockerTest.groovy | 121 -------- .../test/groovy/BoostFunctionalTest.groovy | 66 ---- .../test/groovy/BoostPackageJPA21Test.groovy | 2 - .../test/groovy/BoostPackageJPA22Test.groovy | 2 - .../groovy/BoostPackageJaxRS20Test.groovy | 2 - .../groovy/BoostPackageJaxRS21Test.groovy | 2 - .../groovy/BoostPackageSpring15Test.groovy | 44 --- .../groovy/BoostPackageSpring20Test.groovy | 45 --- .../groovy/BoostPackageSpringSSLTest.groovy | 103 ------ .../src/test/groovy/DockerBuild15Test.groovy | 38 --- .../src/test/groovy/DockerBuild20Test.groovy | 38 --- ...ockerBuildDockerizerClasspath15Test.groovy | 37 --- ...ockerBuildDockerizerClasspath20Test.groovy | 37 --- .../DockerBuildDockerizerJar15Test.groovy | 38 --- .../DockerBuildDockerizerJar20Test.groovy | 38 --- .../test/groovy/DockerClassifier15Test.groovy | 39 --- .../test/groovy/DockerClassifier20Test.groovy | 39 --- .../src/test/groovy/DockerEmpty15Test.groovy | 37 --- .../src/test/groovy/DockerEmpty20Test.groovy | 37 --- .../src/test/groovy/DockerPush15Test.groovy | 101 ------ .../src/test/groovy/DockerPush20Test.groovy | 102 ------ .../groovy/PackageAndDockerize15Test.groovy | 52 ---- .../groovy/PackageAndDockerize20Test.groovy | 53 ---- .../test/groovy/PackageExtensionTest.groovy | 43 --- .../PackageSpringClassifier15Test.groovy | 46 --- .../PackageSpringClassifier20Test.groovy | 46 --- .../test/groovy/PackageSpringWar20Test.groovy | 44 --- .../test/resources/test-jaxrs/settings.gradle | 0 .../resources/test-jaxrs/testJaxrs20.gradle | 8 +- .../resources/test-jaxrs/testJaxrs21.gradle | 8 +- .../src/test/resources/test-jdbc/db2.gradle | 10 +- .../resources/test-jdbc/derby-default.gradle | 10 +- .../resources/test-jdbc/derby-defined.gradle | 10 +- .../src/test/resources/test-jdbc/mysql.gradle | 10 +- .../test/resources/test-jdbc/settings.gradle | 0 .../test/resources/test-jpa/settings.gradle | 0 .../test/resources/test-jpa/testJPA21.gradle | 10 +- .../test/resources/test-jpa/testJPA22.gradle | 10 +- .../test-spring-boot-ssl/build.gradle | 39 --- .../src/main/java/hello/Application.java | 33 -- .../src/main/java/hello/HelloController.java | 14 - .../src/main/resources/application.properties | 4 - .../src/main/resources/sample.jks | Bin 2264 -> 0 bytes .../test-spring-boot/docker15Test.gradle | 46 --- .../test-spring-boot/docker20Test.gradle | 43 --- .../dockerClassifier15Test.gradle | 45 --- .../dockerClassifier20Test.gradle | 42 --- .../dockerDockerizerClasspath15Test.gradle | 47 --- .../dockerDockerizerClasspath20Test.gradle | 44 --- .../dockerDockerizerJar15Test.gradle | 47 --- .../dockerDockerizerJar20Test.gradle | 44 --- .../test-spring-boot/dockerEmpty15Test.gradle | 44 --- .../test-spring-boot/dockerEmpty20Test.gradle | 41 --- .../packageExtensionTest.gradle | 46 --- .../test-spring-boot/springApp-15.gradle | 42 --- .../test-spring-boot/springApp-20.gradle | 40 --- .../springAppClassifier-15.gradle | 39 --- .../springAppClassifier-20.gradle | 41 --- .../test-spring-boot/springWarApp-20.gradle | 40 --- .../src/main/java/hello/Application.java | 33 -- .../src/main/java/hello/HelloController.java | 14 - 94 files changed, 1232 insertions(+), 2746 deletions(-) delete mode 100644 boost-gradle/gradle/wrapper/gradle-wrapper.jar delete mode 100644 boost-gradle/gradle/wrapper/gradle-wrapper.properties create mode 100644 boost-gradle/openliberty-gradle/build.gradle create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java rename boost-gradle/{src/main/groovy/io/openliberty/boost/gradle/extensions/BoostDockerExtension.groovy => openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java} (56%) create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJaxRSBoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java create mode 100644 boost-gradle/openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI create mode 100644 boost-gradle/src/main/groovy/io/openliberty/boost/gradle/runtimes/GradleRuntimeI.groovy delete mode 100644 boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/AbstractBoostDockerTask.groovy delete mode 100644 boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/BoostDockerBuildTask.groovy delete mode 100644 boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/BoostDockerPushTask.groovy delete mode 100644 boost-gradle/src/test/groovy/AbstractBoostDockerTest.groovy delete mode 100644 boost-gradle/src/test/groovy/BoostFunctionalTest.groovy delete mode 100644 boost-gradle/src/test/groovy/BoostPackageSpring15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/BoostPackageSpring20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/BoostPackageSpringSSLTest.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerBuild15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerBuild20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerBuildDockerizerClasspath15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerBuildDockerizerClasspath20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerBuildDockerizerJar15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerBuildDockerizerJar20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerClassifier15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerClassifier20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerEmpty15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerEmpty20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerPush15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/DockerPush20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/PackageAndDockerize15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/PackageAndDockerize20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/PackageExtensionTest.groovy delete mode 100644 boost-gradle/src/test/groovy/PackageSpringClassifier15Test.groovy delete mode 100644 boost-gradle/src/test/groovy/PackageSpringClassifier20Test.groovy delete mode 100644 boost-gradle/src/test/groovy/PackageSpringWar20Test.groovy create mode 100644 boost-gradle/src/test/resources/test-jaxrs/settings.gradle create mode 100644 boost-gradle/src/test/resources/test-jdbc/settings.gradle create mode 100644 boost-gradle/src/test/resources/test-jpa/settings.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot-ssl/build.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/Application.java delete mode 100644 boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/HelloController.java delete mode 100644 boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/resources/application.properties delete mode 100755 boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/resources/sample.jks delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/docker15Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/docker20Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/dockerClassifier15Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/dockerClassifier20Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerClasspath15Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerClasspath20Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerJar15Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerJar20Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/dockerEmpty15Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/dockerEmpty20Test.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/packageExtensionTest.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/springApp-15.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/springApp-20.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/springAppClassifier-15.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/springAppClassifier-20.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/springWarApp-20.gradle delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/src/main/java/hello/Application.java delete mode 100644 boost-gradle/src/test/resources/test-spring-boot/src/main/java/hello/HelloController.java diff --git a/boost-gradle/build.gradle b/boost-gradle/build.gradle index 9b46bd72..b7119cd2 100644 --- a/boost-gradle/build.gradle +++ b/boost-gradle/build.gradle @@ -6,7 +6,7 @@ plugins { } archivesBaseName = 'boost-gradle-plugin' -group = 'io.openliberty.boost' +group = 'boost' version = '0.1.1-SNAPSHOT' def boosterVersion = '0.1.3-SNAPSHOT' @@ -24,9 +24,9 @@ repositories { dependencies { compile localGroovy() - compile 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.6-SNAPSHOT' + compile 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.7-SNAPSHOT' compile group: 'commons-io', name: 'commons-io', version: '2.6' - compile 'io.openliberty.boost:boost-common:0.1.3-SNAPSHOT' + compile 'boost:boost-common:0.1.3-SNAPSHOT' compile 'com.spotify:docker-client:8.11.7' testCompile 'junit:junit:4.12' @@ -39,15 +39,11 @@ test { doFirst { //Copying gradle.properties with plugin version to test projects String runtimeGroup String runtimeArtifactId - String libertyRuntime = System.getProperty('runtime') - String runtimeVersion = System.getProperty('runtimeVersion') + String runtime = System.getProperty('runtime') - if (libertyRuntime == null || libertyRuntime.isEmpty()) { + if (runtime == null || runtime.isEmpty()) { throw new GradleException('Tests could not be run. Please specify a Liberty runtime. Choose either wlp or ol.') } - if (runtimeVersion == null || runtimeVersion.isEmpty()) { - throw new GradleException('Tests could not be run. Please specify a Liberty runtime version.') - } Properties prop = new Properties() OutputStream output = null @@ -55,12 +51,9 @@ test { try { output = new FileOutputStream("${buildDir}/gradle.properties") - if (libertyRuntime == "ol") { - runtimeGroup = "io.openliberty" - runtimeArtifactId = "openliberty-runtime" - } else { - runtimeGroup = "com.ibm.websphere.appserver.runtime" - runtimeArtifactId = "wlp-javaee7" + if (runtime == "ol") { + runtimeGroup = "boost.runtimes" + runtimeArtifactId = "openliberty-gradle" } // set the properties value @@ -68,7 +61,6 @@ test { prop.setProperty("boosterVersion", boosterVersion) prop.setProperty("runtimeGroup", runtimeGroup) prop.setProperty("runtimeArtifactId", runtimeArtifactId) - prop.setProperty("runtimeVersion", runtimeVersion) // save properties to project root folder prop.store(output, null) @@ -165,8 +157,8 @@ if (project.hasProperty('ossrhUsername') && project.hasProperty('ossrhPassword') gradlePlugin { plugins { boostPlugin { - id = 'io.openliberty.boost' - implementationClass = 'io.openliberty.boost.gradle.Boost' + id = 'boost' + implementationClass = 'boost.gradle.Boost' } } } diff --git a/boost-gradle/gradle/wrapper/gradle-wrapper.jar b/boost-gradle/gradle/wrapper/gradle-wrapper.jar deleted file mode 100644 index 87b738cbd051603d91cc39de6cb000dd98fe6b02..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 55190 zcmafaW0WS*vSoFbZQHhO+s0S6%`V%vZQJa!ZQHKus_B{g-pt%P_q|ywBQt-*Stldc z$+IJ3?^KWm27v+sf`9-50uuadKtMnL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M1yxBrp zz6}z`(=cngs6X05e79o_B7@3K|Qpe3n38Py_~ zpi?^rj!`pq!7PHGliC$`-8A^Ib?2qgJJCW+(&TfOnFGJ+@-<<~`7BR0f4oSINBq&R z2CM`0%WLg_Duw^1SPwj-{?BUl2Y=M4e+7yL1{C&&f&zjF06#xf>VdLozgNye(BNgSD`=fFbBy0HIosLl@JwCQl^s;eTnc( z3!r8G=K>zb`|bLLI0N|eFJk%s)B>oJ^M@AQzqR;HUjLsOqW<0v>1ksT_#24*U@R3HJu*A^#1o#P3%3_jq>icD@<`tqU6ICEgZrME(xX#?i^Z z%Id$_uyQGlFD-CcaiRtRdGn|K`Lq5L-rx7`vYYGH7I=eLfHRozPiUtSe~Tt;IN2^gCXmf2#D~g2@9bhzK}3nphhG%d?V7+Zq{I2?Gt*!NSn_r~dd$ zqkUOg{U=MI?Ehx@`(X%rQB?LP=CjJ*V!rec{#0W2WshH$X#9zep!K)tzZoge*LYd5 z@g?-j5_mtMp>_WW`p*UNUZTFN{_+#m*bJzt{hvAdkF{W40{#L3w6gzPztnsA_4?&0 z(+>pv!zB16rR-(nm(^c>Z(its{ny677vT8sF564^mlZvJ!h65}OW%Hn|2OXbOQM%b z{6C54Z2v;^hyMQ;UH+HwFD2!F!VlQ}6Z{L0_9g5~CH0@Mqz?ZC`^QkhOU#$Lx<4`B zyZsa9uPF!rZDo8ZVfzzR#raQ>5|)k~_Ef*wDqG^76o)j!C4 zykvT*o$!-MBko@?{b~*Zf2*YMlImrK`cEp|#D7f%Twm<|C|dWD() { + @Override + public void execute(LibertyExtension liberty) { + liberty.server(serverClosure); + } + }); + + this.projectBuildDir = project.getBuildDir().toString(); + this.libertyServerPath = projectBuildDir + "/wlp/usr/servers/" + serverName; + } + + public void doPackage(List boosterConfigs, Object project, Object pluginTask) throws BoostException { + Project gradleProject = (Project)project; + System.setProperty(BoostProperties.INTERNAL_COMPILER_TARGET, gradleProject.findProperty("targetCompatibility").toString()); + try { + packageLiberty(boosterConfigs, gradleProject); + } catch (GradleException e) { + throw new BoostException("Error packaging Liberty server", e); + } + } + + private void packageLiberty(List boosterConfigs, Project project) throws BoostException { + try { + runTask("installLiberty", project); + runTask("libertyCreate", project); + + // targeting a liberty install + copyBoosterDependencies(boosterConfigs, project); + + generateServerConfig(boosterConfigs, project); + + installMissingFeatures(project); + + // Create the Liberty runnable jar + createUberJar(project); + } catch(Exception e) { + throw new BoostException("Error packaging Liberty server", e); + } + + } + + /** + * Get all booster dependencies and copy them to the Liberty server. + * + * @throws GradleException + * + */ + private void copyBoosterDependencies(List boosterConfigs, Project project) throws IOException { + List dependenciesToCopy = BoosterConfigurator.getDependenciesToCopy(boosterConfigs, + BoostLogger.getInstance()); + + project.getConfigurations().maybeCreate("boosterDependencies"); + for (String dep : dependenciesToCopy) { + project.getDependencies().add("boosterDependencies", dep); + } + + File resouresDir = new File(libertyServerPath, "resources"); + + for (File dep : project.getConfigurations().getByName("boosterDependencies").resolve()) { + FileUtils.copyFileToDirectory(dep, resouresDir); + } + } + + /** + * Generate config for the Liberty server based on the Gradle project. + * + * @throws GradleException + */ + private void generateServerConfig(List boosterConfigs, Project project) throws GradleException { + + try { + // Generate server config + generateLibertyServerConfig(boosterConfigs, project); + + } catch (Exception e) { + throw new GradleException("Unable to generate server configuration for the Liberty server.", e); + } + } + + private List getWarNames(Project project) { + String warName = null; + + if (project.getPlugins().hasPlugin("war")) { + WarPlugin warPlugin = (WarPlugin)(project.getPlugins().findPlugin("war")); + War warTask = (War)(project.getTasks().findByPath(warPlugin.WAR_TASK_NAME)); + warName = warTask.getArchiveFileName().get().substring(0, warTask.getArchiveFileName().get().length() - 4); + } + + return Arrays.asList(warName); + } + + /** + * Configure the Liberty runtime + * + * @param boosterConfigurators + * @throws Exception + */ + private void generateLibertyServerConfig(List boosterConfigurators, Project project) throws Exception { + + List warNames = getWarNames(project); + LibertyServerConfigGenerator libertyConfig = new LibertyServerConfigGenerator(libertyServerPath, + BoostLogger.getInstance()); + + // Add default http endpoint configuration + Properties boostConfigProperties = BoostProperties.getConfiguredBoostProperties(BoostLogger.getInstance()); + + String host = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HOST, "*"); + libertyConfig.addHostname(host); + + String httpPort = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HTTP_PORT, "9080"); + libertyConfig.addHttpPort(httpPort); + + String httpsPort = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HTTPS_PORT, "9443"); + libertyConfig.addHttpsPort(httpsPort); + + // Add war configuration if necessary + if (!warNames.isEmpty()) { + for (String warName : warNames) { + libertyConfig.addApplication(warName); + } + } else { + throw new Exception( + "No war files were found. The project must have a war packaging type or specify war dependencies."); + } + + // Loop through configuration objects and add config and + // the corresponding Liberty feature + for (AbstractBoosterConfig configurator : boosterConfigurators) { + if (configurator instanceof LibertyBoosterI) { + ((LibertyBoosterI) configurator).addServerConfig(libertyConfig); + libertyConfig.addFeature(((LibertyBoosterI) configurator).getFeature()); + } + } + + libertyConfig.writeToServer(); + } + + //Liberty Gradle Plugin Execution + + /** + * Invoke the liberty-gradle-plugin to run the install-feature goal. + * + * This will install any missing features defined in the server.xml or + * configDropins. + * + */ + private void installMissingFeatures(Project project) throws GradleException { + runTask("installFeature", project); + } + + /** + * Invoke the liberty-gradle-plugin to package the server into a runnable Liberty + * JAR + */ + private void createUberJar(Project project) throws BoostException { + try { + runTask("libertyPackage", project); + } catch (GradleException e) { + throw new BoostException("Error creating Liberty uber jar", e); + } + } + + public void doDebug(Object project, Object pluginTask) throws BoostException { + try { + runTask("libertyDebug", (Project)project); + } catch (GradleException e) { + throw new BoostException("Error debugging Liberty server", e); + } + } + + public void doRun(Object project, Object pluginTask) throws BoostException { + try { + runTask("LibertyRun", (Project)project); + } catch (GradleException e) { + throw new BoostException("Error running Liberty server", e); + } + } + + public void doStart(Object project, Object pluginTask) throws BoostException { + try { + runTask("libertyStart", (Project)project); + } catch (GradleException e) { + throw new BoostException("Error starting Liberty server", e); + } + } + + public void doStop(Object project, Object pluginTask) throws BoostException { + try { + runTask("libertyStop", (Project)project); + } catch (GradleException e) { + throw new BoostException("Error stopping Liberty server", e); + } + } + + private void runTask(String taskName, Project project) throws GradleException { + //String command = project.getProjectDir().toString() + "/gradlew"; + try { + ProcessBuilder pb = new ProcessBuilder("gradle", taskName, "-i", "-s"); + System.out.println("Executing task " + pb.command().get(1)); + pb.directory(project.getProjectDir()); + Process p = pb.start(); + p.waitFor(); + } catch (IOException | InterruptedException e) { + throw new GradleException("Unable to execute the " + taskName + " task.", e); + } + } + +} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java new file mode 100644 index 00000000..7a5f227c --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java @@ -0,0 +1,244 @@ +/******************************************************************************* + * Copyright (c) 2018, 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty; + +import static boost.common.config.ConfigConstants.*; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Properties; +import java.util.Set; + +import javax.xml.parsers.DocumentBuilder; +import javax.xml.parsers.DocumentBuilderFactory; +import javax.xml.parsers.ParserConfigurationException; +import javax.xml.transform.OutputKeys; +import javax.xml.transform.Transformer; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.dom.DOMSource; +import javax.xml.transform.stream.StreamResult; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; + +import boost.common.BoostLoggerI; +import boost.common.config.BoostProperties; +import boost.common.utils.BoostUtil; + +/** + * Create a Liberty server.xml + * + */ +public class LibertyServerConfigGenerator { + + private final String serverPath; + private final String libertyInstallPath; + + private final BoostLoggerI logger; + + private Document serverXml; + private Element featureManager; + private Element serverRoot; + private Element httpEndpoint; + + private Set featuresAdded; + + private Properties bootstrapProperties; + + private final Properties boostConfigProperties; + + public LibertyServerConfigGenerator(String serverPath, BoostLoggerI logger) throws ParserConfigurationException { + + this.serverPath = serverPath; + this.libertyInstallPath = serverPath + "/../../.."; // Three directories + // back from + // 'wlp/usr/servers/BoostServer' + this.logger = logger; + + boostConfigProperties = BoostProperties.getConfiguredBoostProperties(logger); + + generateServerXml(); + + featuresAdded = new HashSet(); + bootstrapProperties = new Properties(); + } + + private void generateServerXml() throws ParserConfigurationException { + DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); + + // Create top level server config element + serverXml = docBuilder.newDocument(); + serverRoot = serverXml.createElement("server"); + serverRoot.setAttribute("description", "Liberty server generated by Liberty Boost"); + serverXml.appendChild(serverRoot); + + // Create featureManager config element + featureManager = serverXml.createElement(FEATURE_MANAGER); + serverRoot.appendChild(featureManager); + + // Create httpEndpoint config element + httpEndpoint = serverXml.createElement(HTTP_ENDPOINT); + httpEndpoint.setAttribute("id", DEFAULT_HTTP_ENDPOINT); + serverRoot.appendChild(httpEndpoint); + } + + /** + * Add a Liberty feature to the server configuration + * + */ + public void addFeature(String featureName) { + if (!featuresAdded.contains(featureName)) { + Element feature = serverXml.createElement(FEATURE); + feature.appendChild(serverXml.createTextNode(featureName)); + featureManager.appendChild(feature); + featuresAdded.add(featureName); + } + } + + /** + * Add a list of features to the server configuration + * + */ + public void addFeatures(List features) { + + for (String featureName : features) { + addFeature(featureName); + } + } + + /** + * Write the server.xml and bootstrap.properties to the server config + * directory + * + * @throws TransformerException + * @throws IOException + */ + public void writeToServer() throws TransformerException, IOException { + // Replace auto-generated server.xml + TransformerFactory transformerFactory = TransformerFactory.newInstance(); + Transformer transformer = transformerFactory.newTransformer(); + transformer.setOutputProperty(OutputKeys.METHOD, "xml"); + transformer.setOutputProperty(OutputKeys.INDENT, "yes"); + transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); + transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); + DOMSource source = new DOMSource(serverXml); + StreamResult result = new StreamResult(new File(serverPath + "/server.xml")); + transformer.transform(source, result); + + // Generate bootstrap.properties + if (!bootstrapProperties.isEmpty()) { + + OutputStream output = null; + try { + output = new FileOutputStream(serverPath + "/bootstrap.properties"); + bootstrapProperties.store(output, null); + } finally { + if (output != null) { + output.close(); + } + } + } + + // Try setting all bootstrap properties to system properties for test + // purposes + for (String key : bootstrapProperties.stringPropertyNames()) { + System.setProperty(key, bootstrapProperties.getProperty(key)); + } + } + + public void addBootstrapProperties(Properties properties) throws IOException { + + if (properties != null) { + for (String key : properties.stringPropertyNames()) { + String value = properties.getProperty(key); + + addBoostrapProperty(key, value); + } + } + } + + private void addBoostrapProperty(String key, String value) throws IOException { + + // Using this to hold the properties we want to encrypt and the type of + // encryption we want to use + Map propertiesToEncrypt = BoostProperties.getPropertiesToEncrypt(); + + if (propertiesToEncrypt.containsKey(key) && value != null && !value.equals("")) { + // Getting properties that might not have been passed with the other + // properties that will be written to boostrap.properties + // Don't want to add certain properties to the boostrap properties + // so we'll grab them here + Properties supportedProperties = BoostProperties.getConfiguredBoostProperties(logger); + value = BoostUtil.encrypt(libertyInstallPath, value, propertiesToEncrypt.get(key), + supportedProperties.getProperty(BoostProperties.AES_ENCRYPTION_KEY), logger); + } + + bootstrapProperties.put(key, value); + } + + public void addKeystore(Map keystoreProps, Map keyProps) { + Element keystore = serverXml.createElement(KEYSTORE); + keystore.setAttribute("id", DEFAULT_KEYSTORE); + + for (String key : keystoreProps.keySet()) { + keystore.setAttribute(key, keystoreProps.get(key)); + } + + if (!keyProps.isEmpty()) { + Element keyEntry = serverXml.createElement(KEY_ENTRY); + + for (String key : keyProps.keySet()) { + keyEntry.setAttribute(key, keyProps.get(key)); + } + + keystore.appendChild(keyEntry); + } + + serverRoot.appendChild(keystore); + } + + public void addApplication(String appName) { + Element appCfg = serverXml.createElement(APPLICATION); + appCfg.setAttribute(CONTEXT_ROOT, "/"); + appCfg.setAttribute(LOCATION, appName + "." + WAR_PKG_TYPE); + appCfg.setAttribute(TYPE, WAR_PKG_TYPE); + serverRoot.appendChild(appCfg); + + } + + public void addHostname(String hostname) throws Exception { + httpEndpoint.setAttribute("host", BoostUtil.makeVariable(BoostProperties.ENDPOINT_HOST)); + + addBoostrapProperty(BoostProperties.ENDPOINT_HOST, hostname); + } + + public void addHttpPort(String httpPort) throws Exception { + httpEndpoint.setAttribute("httpPort", BoostUtil.makeVariable(BoostProperties.ENDPOINT_HTTP_PORT)); + + addBoostrapProperty(BoostProperties.ENDPOINT_HTTP_PORT, httpPort); + } + + public void addHttpsPort(String httpsPort) throws Exception { + httpEndpoint.setAttribute("httpsPort", BoostUtil.makeVariable(BoostProperties.ENDPOINT_HTTPS_PORT)); + + addBoostrapProperty(BoostProperties.ENDPOINT_HTTPS_PORT, httpsPort); + } + + public Document getServerXmlDoc() { + return serverXml; + } +} diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostDockerExtension.groovy b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java similarity index 56% rename from boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostDockerExtension.groovy rename to boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java index 6fc5ccfa..0109b495 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostDockerExtension.groovy +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. + * Copyright (c) 2019 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -8,17 +8,13 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ +package boost.runtimes.openliberty.boosters; -package io.openliberty.boost.gradle.extensions +import boost.common.BoostException; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; -class BoostDockerExtension { - - String dockerizer = "liberty" - String repository = null - String tag = "latest" - boolean useProxy = false - boolean pullNewerImage = false - boolean noCache = false - Map buildArgs = new HashMap() +public interface LibertyBoosterI { + public String getFeature(); + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) throws BoostException; } \ No newline at end of file diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java new file mode 100644 index 00000000..202ea448 --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java @@ -0,0 +1,39 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.CDI_20; + +import java.util.Map; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.CDIBoosterConfig; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +public class LibertyCDIBoosterConfig extends CDIBoosterConfig implements LibertyBoosterI { + + public LibertyCDIBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { + super(dependencies, logger); + } + + public String getFeature() { + if (getVersion().equals(MP_20_VERSION)) { + return CDI_20; + } + return null; + } + + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { + + } +} \ No newline at end of file diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java new file mode 100644 index 00000000..a699cc1a --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java @@ -0,0 +1,127 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.*; + +import java.util.Map; +import java.util.Properties; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.JDBCBoosterConfig; +import boost.common.config.BoostProperties; +import boost.common.utils.BoostUtil; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +import org.w3c.dom.Document; +import org.w3c.dom.Element; +import org.w3c.dom.NodeList; + +public class LibertyJDBCBoosterConfig extends JDBCBoosterConfig implements LibertyBoosterI { + + public LibertyJDBCBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { + super(dependencies, logger); + + } + + @Override + public String getFeature() { + String compilerVersion = System.getProperty(BoostProperties.INTERNAL_COMPILER_TARGET); + + if ("1.8".equals(compilerVersion) || "8".equals(compilerVersion) || "9".equals(compilerVersion) + || "10".equals(compilerVersion)) { + return JDBC_42; + } else if ("11".equals(compilerVersion)) { + return JDBC_43; + } else { + return JDBC_41; // Default to the spec for Liberty's + // minimum supported JRE (version 7 + // as of 17.0.0.3) + } + } + + @Override + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) throws BoostException { + try { + addDataSource(getProductName(), getDatasourceProperties(), libertyServerConfigGenerator, + libertyServerConfigGenerator.getServerXmlDoc()); + } catch (Exception e) { + throw new BoostException("Error when configuring JDBC data source."); + } + } + + private void addDataSource(String productName, Properties serverProperties, + LibertyServerConfigGenerator libertyServerConfigGenerator, Document serverXml) throws Exception { + + String driverJar = null; + String datasourcePropertiesElement = null; + + if (productName.equals(JDBCBoosterConfig.DERBY)) { + driverJar = DERBY_JAR; + datasourcePropertiesElement = PROPERTIES_DERBY_EMBEDDED; + } else if (productName.equals(JDBCBoosterConfig.DB2)) { + driverJar = DB2_JAR; + datasourcePropertiesElement = PROPERTIES_DB2_JCC; + } else if (productName.equals(JDBCBoosterConfig.MYSQL)) { + driverJar = MYSQL_JAR; + datasourcePropertiesElement = PROPERTIES; + } + + Element serverRoot = serverXml.getDocumentElement(); + + // Find the root server element + NodeList list = serverXml.getChildNodes(); + for (int i = 0; i < list.getLength(); i++) { + if (list.item(i).getNodeName().equals("server")) { + serverRoot = (Element) list.item(i); + } + } + + // Add library + Element lib = serverXml.createElement(LIBRARY); + lib.setAttribute("id", JDBC_LIBRARY_1); + Element fileLoc = serverXml.createElement(FILESET); + fileLoc.setAttribute("dir", RESOURCES); + fileLoc.setAttribute("includes", driverJar); + lib.appendChild(fileLoc); + serverRoot.appendChild(lib); + + // Add datasource + Element dataSource = serverXml.createElement(DATASOURCE); + dataSource.setAttribute("id", DEFAULT_DATASOURCE); + dataSource.setAttribute(JDBC_DRIVER_REF, JDBC_DRIVER_1); + + // Add all configured datasource properties + Element props = serverXml.createElement(datasourcePropertiesElement); + addDatasourceProperties(serverProperties, props); + dataSource.appendChild(props); + + serverRoot.appendChild(dataSource); + + // Add jdbc driver + Element jdbcDriver = serverXml.createElement(JDBC_DRIVER); + jdbcDriver.setAttribute("id", JDBC_DRIVER_1); + jdbcDriver.setAttribute(LIBRARY_REF, JDBC_LIBRARY_1); + serverRoot.appendChild(jdbcDriver); + + // Add properties to bootstrap.properties + libertyServerConfigGenerator.addBootstrapProperties(serverProperties); + } + + private void addDatasourceProperties(Properties serverProperties, Element propertiesElement) { + for (String property : serverProperties.stringPropertyNames()) { + String attribute = property.replace(BoostProperties.DATASOURCE_PREFIX, ""); + propertiesElement.setAttribute(attribute, BoostUtil.makeVariable(property)); + } + } +} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java new file mode 100644 index 00000000..69498982 --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.JPA_21; +import static boost.common.config.ConfigConstants.JPA_22; + +import java.util.Map; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.JPABoosterConfig; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +public class LibertyJPABoosterConfig extends JPABoosterConfig implements LibertyBoosterI { + + public LibertyJPABoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { + super(dependencies, logger); + } + + @Override + public String getFeature() { + if (getVersion().equals(EE_7_VERSION)) { + return JPA_21; + } else if (getVersion().equals(EE_8_VERSION)) { + return JPA_22; + } + return null; + } + + @Override + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { + + } +} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java new file mode 100644 index 00000000..851d6881 --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.JSONP_11; + +import java.util.Map; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.JSONPBoosterConfig; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +public class LibertyJSONPBoosterConfig extends JSONPBoosterConfig implements LibertyBoosterI { + + public LibertyJSONPBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { + super(dependencies, logger); + } + + @Override + public String getFeature() { + if (getVersion().equals(MP_20_VERSION)) { + return JSONP_11; + } + return null; + } + + @Override + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { + + } +} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJaxRSBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJaxRSBoosterConfig.java new file mode 100644 index 00000000..f9c1c85a --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJaxRSBoosterConfig.java @@ -0,0 +1,44 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.JAXRS_20; +import static boost.common.config.ConfigConstants.JAXRS_21; + +import java.util.Map; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.JAXRSBoosterConfig; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +public class LibertyJaxRSBoosterConfig extends JAXRSBoosterConfig implements LibertyBoosterI { + + public LibertyJaxRSBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { + super(dependencies, logger); + } + + @Override + public String getFeature() { + if (getVersion().equals(EE_7_VERSION)) { + return JAXRS_20; + } else if (getVersion().equals(EE_8_VERSION)) { + return JAXRS_21; + } + return null; + } + + @Override + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { + + } +} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java new file mode 100644 index 00000000..071c7917 --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.MPCONFIG_13; + +import java.util.Map; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.MPConfigBoosterConfig; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +public class LibertyMPConfigBoosterConfig extends MPConfigBoosterConfig implements LibertyBoosterI { + + public LibertyMPConfigBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { + super(dependencies, logger); + } + + @Override + public String getFeature() { + if (getVersion().equals(MP_20_VERSION)) { + return MPCONFIG_13; + } + return null; + } + + @Override + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { + + } +} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java new file mode 100644 index 00000000..3144ff2d --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java @@ -0,0 +1,41 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.MPHEALTH_10; + +import java.util.Map; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.MPHealthBoosterConfig; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +public class LibertyMPHealthBoosterConfig extends MPHealthBoosterConfig implements LibertyBoosterI { + + public LibertyMPHealthBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { + super(dependencies, logger); + } + + @Override + public String getFeature() { + if (getVersion().equals(MP_20_VERSION)) { + return MPHEALTH_10; + } + return null; + } + + @Override + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { + + } +} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java new file mode 100644 index 00000000..b90b5143 --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.MPOPENTRACING_11; + +import java.util.Map; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.MPOpenTracingBoosterConfig; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +public class LibertyMPOpenTracingBoosterConfig extends MPOpenTracingBoosterConfig implements LibertyBoosterI { + + public LibertyMPOpenTracingBoosterConfig(Map dependencies, BoostLoggerI logger) + throws BoostException { + super(dependencies, logger); + } + + @Override + public String getFeature() { + if (getVersion().equals(MP_20_VERSION)) { + return MPOPENTRACING_11; + } + return null; + } + + @Override + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { + + } +} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java new file mode 100644 index 00000000..fb13d9fa --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java @@ -0,0 +1,42 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty.boosters; + +import static boost.common.config.ConfigConstants.MPRESTCLIENT_11; + +import java.util.Map; + +import boost.common.BoostException; +import boost.common.BoostLoggerI; +import boost.common.boosters.MPRestClientBoosterConfig; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +public class LibertyMPRestClientBoosterConfig extends MPRestClientBoosterConfig implements LibertyBoosterI { + + public LibertyMPRestClientBoosterConfig(Map dependencies, BoostLoggerI logger) + throws BoostException { + super(dependencies, logger); + } + + @Override + public String getFeature() { + if (getVersion().equals(MP_20_VERSION)) { + return MPRESTCLIENT_11; + } + return null; + } + + @Override + public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { + + } +} diff --git a/boost-gradle/openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI b/boost-gradle/openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI new file mode 100644 index 00000000..f4bcc36b --- /dev/null +++ b/boost-gradle/openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI @@ -0,0 +1 @@ +boost.runtimes.openliberty.LibertyGradleRuntime \ No newline at end of file diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/Boost.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/Boost.groovy index 08b3b506..d16c0f78 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/Boost.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/Boost.groovy @@ -8,44 +8,52 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle +package boost.gradle import org.gradle.api.* import net.wasdev.wlp.gradle.plugins.extensions.ServerExtension -import io.openliberty.boost.gradle.extensions.BoostExtension -import io.openliberty.boost.gradle.utils.BoostLogger +import boost.gradle.tasks.AbstractBoostTask +import boost.gradle.extensions.BoostExtension +import boost.gradle.utils.BoostLogger public class Boost implements Plugin { final String BOOST_SERVER_NAME = 'BoostServer' - final String OPEN_LIBERTY_VERSION = '[18.0.0.3,)' + // final String OPEN_LIBERTY_VERSION = '[18.0.0.3,)' void apply(Project project) { project.extensions.create('boost', BoostExtension) + // project.configurations.create("boosterDependency"); BoostLogger.init(project) new BoostTaskFactory(project).createTasks() - project.pluginManager.apply('net.wasdev.wlp.gradle.plugins.Liberty') - - project.liberty.server = configureBoostServerProperties() - configureRuntimeArtifact(project) + project.afterEvaluate { + AbstractBoostTask.resetRuntime() + AbstractBoostTask.getRuntimeInstance(project).configureRuntimePlugin(project) + } } +} - //Overwritten by any liberty configuration in build file - ServerExtension configureBoostServerProperties() { - ServerExtension boostServer = new ServerExtension() - boostServer.name = BOOST_SERVER_NAME - boostServer.looseApplication = false - return boostServer - } - void configureRuntimeArtifact(Project project) { - //The libertyRuntime configuration won't be null. It is added with the Liberty plugin. - //A libertyRuntime configuration in the build.gradle will overwrite this. - project.dependencies.add('libertyRuntime', "io.openliberty:openliberty-runtime:$OPEN_LIBERTY_VERSION") - } -} +// project.liberty.server = configureBoostServerProperties() +// configureRuntimeArtifact(project) +// } + +// //Overwritten by any liberty configuration in build file +// ServerExtension configureBoostServerProperties() { +// ServerExtension boostServer = new ServerExtension() +// boostServer.name = BOOST_SERVER_NAME +// boostServer.looseApplication = false +// return boostServer +// } + +// void configureRuntimeArtifact(Project project) { +// //The libertyRuntime configuration won't be null. It is added with the Liberty plugin. +// //A libertyRuntime configuration in the build.gradle will overwrite this. +// project.dependencies.add('libertyRuntime', "io.openliberty:openliberty-runtime:$OPEN_LIBERTY_VERSION") +// } +// } diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/BoostTaskFactory.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/BoostTaskFactory.groovy index 39ffc916..f12aaa5f 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/BoostTaskFactory.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/BoostTaskFactory.groovy @@ -8,17 +8,15 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle +package boost.gradle import org.gradle.api.Project -import io.openliberty.boost.gradle.tasks.BoostStartTask -import io.openliberty.boost.gradle.tasks.BoostRunTask -import io.openliberty.boost.gradle.tasks.BoostStopTask -import io.openliberty.boost.gradle.tasks.BoostPackageTask -import io.openliberty.boost.gradle.tasks.BoostDebugTask -import io.openliberty.boost.gradle.tasks.docker.BoostDockerBuildTask -import io.openliberty.boost.gradle.tasks.docker.BoostDockerPushTask +import boost.gradle.tasks.BoostStartTask +import boost.gradle.tasks.BoostRunTask +import boost.gradle.tasks.BoostStopTask +import boost.gradle.tasks.BoostPackageTask +import boost.gradle.tasks.BoostDebugTask class BoostTaskFactory { Project project @@ -33,8 +31,6 @@ class BoostTaskFactory { project.tasks.create('boostStop', BoostStopTask) project.tasks.create('boostPackage', BoostPackageTask) project.tasks.create('boostDebug', BoostDebugTask) - project.tasks.create('boostDockerBuild', BoostDockerBuildTask) - project.tasks.create('boostDockerPush', BoostDockerPushTask) } } \ No newline at end of file diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostExtension.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostExtension.groovy index 9353789e..393f0744 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostExtension.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostExtension.groovy @@ -9,19 +9,12 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.extensions +package boost.gradle.extensions import org.gradle.util.ConfigureUtil class BoostExtension { - BoostDockerExtension docker - - def docker(Closure closure){ - docker = new BoostDockerExtension() - ConfigureUtil.configure(closure, docker) - } - BoostPackageExtension packaging def packaging(Closure closure){ diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostPackageExtension.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostPackageExtension.groovy index 0a1e709c..848eb712 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostPackageExtension.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/extensions/BoostPackageExtension.groovy @@ -9,7 +9,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.extensions +package boost.gradle.extensions class BoostPackageExtension { diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/runtimes/GradleRuntimeI.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/runtimes/GradleRuntimeI.groovy new file mode 100644 index 00000000..639e338c --- /dev/null +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/runtimes/GradleRuntimeI.groovy @@ -0,0 +1,8 @@ +package boost.gradle.runtimes + +import boost.common.runtimes.RuntimeI +import org.gradle.api.Project + +public interface GradleRuntimeI extends RuntimeI { + public void configureRuntimePlugin(Project project) +} \ No newline at end of file diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/AbstractBoostTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/AbstractBoostTask.groovy index 6d6b52b3..1a553e1d 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/AbstractBoostTask.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/AbstractBoostTask.groovy @@ -8,15 +8,96 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.tasks +package boost.gradle.tasks + +import java.io.File +import java.lang.reflect.InvocationTargetException +import java.util.ArrayList +import java.util.List +import java.util.Map +import java.util.ServiceLoader + +import java.net.URL +import java.net.URLClassLoader import org.gradle.api.DefaultTask +import org.gradle.api.GradleException import org.gradle.api.Project +import boost.common.boosters.AbstractBoosterConfig +import boost.common.config.BoosterConfigurator +import boost.gradle.runtimes.GradleRuntimeI +import boost.gradle.utils.BoostLogger +import boost.gradle.utils.GradleProjectUtil + abstract class AbstractBoostTask extends DefaultTask { - protected boolean isDockerConfigured() { - return project.boost.docker != null + private static GradleRuntimeI runtime + private static ClassLoader projectClassLoader + private static List boosterConfigs + + protected static Map dependencies + + private static void init(Project project) throws GradleException { + try { + // TODO move this into getRuntimeInstance() + dependencies = GradleProjectUtil.getAllDependencies(project, BoostLogger.getInstance()) + + List compileClasspathJars = new ArrayList() + + List pathUrls = new ArrayList() + for (File compilePathElement : project.configurations.compileClasspath.resolve()) { + pathUrls.add(compilePathElement.toURI().toURL()) + if (compilePathElement.toString().endsWith(".jar")) { + compileClasspathJars.add(compilePathElement) + } + } + Class thisClass = new Object(){}.getClass().getEnclosingClass(); + URL[] urlsForClassLoader = pathUrls.toArray(new URL[pathUrls.size()]) + projectClassLoader = new URLClassLoader(urlsForClassLoader, thisClass.getClassLoader()) + + boosterConfigs = BoosterConfigurator.getBoosterConfigs(compileClasspathJars, projectClassLoader, + dependencies, BoostLogger.getInstance()) + + } catch (Exception e) { + throw new GradleException(e.getMessage(), e) + } + } + + public static GradleRuntimeI getRuntimeInstance(Project project) throws GradleException { + if (runtime == null) { + init(project) + try { + ServiceLoader runtimes = ServiceLoader.load(GradleRuntimeI.class, projectClassLoader) + if (!runtimes.iterator().hasNext()) { + throw new GradleException( + "No target Boost runtime was detected. Please add a runtime and restart the build.") + } + for (GradleRuntimeI runtimeI : runtimes) { + if (runtime != null) { + throw new GradleException( + "There are multiple Boost runtimes on the classpath. Configure the project to use one runtime and restart the build.") + } + runtime = runtimeI.getClass().newInstance() + } + } catch (IllegalAccessException | InstantiationException | InvocationTargetException + | NoSuchMethodException e) { + throw new GradleException("Error while looking for Boost runtime.") + } + } + return runtime + } + + public static void resetRuntime() { + runtime = null + } + + public static List getBoosterConfigs() { + return boosterConfigs; + } + + protected ClassLoader getProjectClassLoader() { + return projectClassLoader } protected boolean isPackageConfigured() { diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostDebugTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostDebugTask.groovy index 8dfd0a1e..ada1ec52 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostDebugTask.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostDebugTask.groovy @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.tasks +package boost.gradle.tasks import org.gradle.api.logging.LogLevel @@ -20,10 +20,8 @@ public class BoostDebugTask extends AbstractBoostTask { logging.level = LogLevel.INFO group 'Boost' - finalizedBy 'libertyDebug' - doFirst { - logger.info('Running the application in debug mode.') + AbstractBoostTask.getRuntimeInstance(project).doDebug(project, this) } }) } diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostPackageTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostPackageTask.groovy index e1b32083..0b2acf5e 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostPackageTask.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostPackageTask.groovy @@ -9,7 +9,7 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.tasks +package boost.gradle.tasks import org.codehaus.groovy.GroovyException @@ -33,288 +33,26 @@ import org.gradle.maven.MavenPomArtifact import org.gradle.api.artifacts.ModuleVersionIdentifier import org.gradle.api.tasks.Copy -import io.openliberty.boost.gradle.utils.BoostLogger -import io.openliberty.boost.gradle.utils.GradleProjectUtil -import io.openliberty.boost.common.boosters.AbstractBoosterConfig; -import io.openliberty.boost.common.config.BoosterConfigurator -import io.openliberty.boost.common.config.BoostProperties; -import io.openliberty.boost.common.utils.BoostUtil -import io.openliberty.boost.common.utils.SpringBootUtil +import boost.gradle.utils.BoostLogger +import boost.gradle.utils.GradleProjectUtil +import boost.common.boosters.AbstractBoosterConfig; +import boost.common.config.BoosterConfigurator +import boost.common.config.BoostProperties; +import boost.common.utils.BoostUtil import org.gradle.api.Task import net.wasdev.wlp.gradle.plugins.extensions.PackageAndDumpExtension public class BoostPackageTask extends AbstractBoostTask { - - List boosterPackConfigurators - - String springBootVersion = GradleProjectUtil.findSpringBootVersion(this.project) - - String libertyServerPath = null - BoostPackageTask() { configure({ description 'Packages the application into an executable Liberty jar.' logging.level = LogLevel.INFO group 'Boost' - dependsOn 'libertyCreate' - - mustRunAfter 'boostDockerBuild' - - //There are some things that this task does before we can package up the server into a JAR - PackageAndDumpExtension boostPackage = new PackageAndDumpExtension() - - //We have to check these properties after the build.gradle file has been evaluated. - //Some properties could get set after our plugin is applied. - project.afterEvaluate { - //Configuring spring plugin task dependencies - if (isSpringProject()) { - Task springBootTask = findSpringBootTask(springBootVersion) - - boostPackage.archive = getSpringBootArchivePath(springBootTask) - - if (springBootVersion.startsWith('2.')) { - if (project.plugins.hasPlugin('war')) { - dependsOn 'bootWar' - } else if (project.plugins.hasPlugin('java')) { - dependsOn 'bootJar' - } - } else if (springBootVersion.startsWith('1.')){ - dependsOn 'bootRepackage' - } - - //Skipping if Docker is configured - if (!isDockerConfigured() || isPackageConfigured()) { - springBootTask.finalizedBy 'boostPackage' - } - - } else { - if (project.plugins.hasPlugin('war')) { - boostPackage.archive = project.war.archiveName.substring(0, project.war.archiveName.lastIndexOf(".")) - - //Skipping if Docker is configured - if (!isDockerConfigured() || isPackageConfigured()) { - //Assemble works for the ear task too - project.war.finalizedBy 'boostPackage' - } - } //ear check here when supported - } - //Configuring liberty plugin task dependencies and parameters - //installFeature should check the server.xml in the server directory and install the missing feature - project.tasks.getByName('libertyPackage').dependsOn 'installApps', 'installFeature' - project.tasks.getByName('installApps').mustRunAfter 'installFeature' - boostPackage.include = "runnable, minify" - if (!project.plugins.hasPlugin('war')) { - finalizedBy 'libertyPackage' - } - } - - //The task will perform this before any other task actions doFirst { - - libertyServerPath = "${project.buildDir}/wlp/usr/servers/${project.liberty.server.name}" - if (isPackageConfigured()) { - if(project.boost.packaging.packageName != null && !project.boost.packaging.packageName.isEmpty()) { - boostPackage.archive = "${project.buildDir}/libs/${project.boost.packaging.packageName}" - } - } - - project.liberty.server.packageLiberty = boostPackage - - if (isSpringProject()) { - Task springBootTask = findSpringBootTask(springBootVersion) - File springBootUberJar = new File(getSpringBootArchivePath(springBootTask)) - - if (springBootUberJar != null && !springBootUberJar.exists()) { - throw new GradleException(springBootUberJar.getAbsolutePath() + " Spring Boot Uber JAR does not exist"); - } - - validateSpringBootUberJAR(springBootUberJar) - copySpringBootUberJar(springBootUberJar) - generateServerConfigSpringBoot() - - } else if (project.plugins.hasPlugin('war')) { - // Get booster dependencies from project - Map dependencies = GradleProjectUtil.getAllDependencies(project, BoostLogger.getInstance()) - - // Determine the Java compiler target version and set this internally - System.setProperty(BoostProperties.INTERNAL_COMPILER_TARGET, project.findProperty("targetCompatibility").toString()) - - boosterPackConfigurators = BoosterConfigurator.getBoosterPackConfigurators(dependencies, BoostLogger.getInstance()) - - copyBoosterDependencies() - - generateServerConfigEE() - - } else { - throw new GradleException('Could not package the project with boostPackage. The boostPackage task must be used with a SpringBoot or Java EE project.') - } - - logger.info('Packaging the applicaiton.') + AbstractBoostTask.getRuntimeInstance(project).doPackage(AbstractBoostTask.getBoosterConfigs(), project, this) } }) } - - public boolean isSpringProject() { - return springBootVersion != null && !springBootVersion.isEmpty() - } - - public Task findSpringBootTask(String springBootVersion) { - Task task - - if (springBootVersion == null) { - throw new GradleException("Spring Boot version cannot be null") - } - - //Do not change the order of war and java - if (springBootVersion.startsWith('2.')) { - if (project.plugins.hasPlugin('war')) { - task = project.bootWar - } else if (project.plugins.hasPlugin('java')) { - task = project.bootJar - } - } else if (springBootVersion.startsWith('1.')) { - if (project.plugins.hasPlugin('war')) { - task = project.war - } else if (project.plugins.hasPlugin('java')) { - task = project.jar - } - } - return task - } - - public String getSpringBootArchivePath(Task springBootTask) { - String archiveOutputPath; - - if (springBootVersion.startsWith('2.')) { - archiveOutputPath = springBootTask.archivePath.getAbsolutePath() - } - else if(springBootVersion.startsWith('1.')) { - archiveOutputPath = springBootTask.archivePath.getAbsolutePath() - if (project.bootRepackage.classifier != null && !project.bootRepackage.classifier.isEmpty()) { - archiveOutputPath = archiveOutputPath.substring(0, archiveOutputPath.lastIndexOf(".")) + "-" + project.bootRepackage.classifier + "." + springBootTask.extension - } - } - return archiveOutputPath - } - - public String getClassifier() { - String classifier = null - - if (isSpringProject()) { - if (springBootVersion.startsWith('2.')) { - classifier = project.tasks.getByName('bootJar').classifier - } else if (springBootVersion.startsWith('1.')) { - classifier = project.tasks.getByName('bootRepackage').classifier - } - } - - return classifier - } - - protected void generateServerConfigEE() throws GradleException { - String warName = null - - if (project.war != null) { - - if (project.war.version == null) { - warName = project.war.baseName - } else { - warName = project.war.baseName + "-" + project.war.version - } - } - - try { - - BoosterConfigurator.generateLibertyServerConfig(libertyServerPath, boosterPackConfigurators, Arrays.asList(warName), BoostLogger.getInstance()); - - } catch (Exception e) { - throw new GradleException("Unable to generate server configuration for the Liberty server.", e); - } - } - - protected void generateServerConfigSpringBoot() throws GradleException { - - try { - // Get Spring Boot starters from Maven project - Map dependencies = GradleProjectUtil.getAllDependencies(project, BoostLogger.getInstance()); - - // Generate server config - SpringBootUtil.generateLibertyServerConfig("${project.buildDir}/resources/main", libertyServerPath, - springBootVersion, dependencies, BoostLogger.getInstance()); - - } catch (Exception e) { - throw new GradleException("Unable to generate server configuration for the Liberty server.", e); - } - } - - protected void copySpringBootUberJar(File springBootUberJar) throws GradleException { - try { - File springBootUberJarCopy = null - if (springBootUberJar != null) { // Only copy the Uber JAR if it is valid - springBootUberJarCopy = SpringBootUtil.copySpringBootUberJar(springBootUberJar, - BoostLogger.getInstance()) - } - - if (springBootUberJarCopy == null) { - logger.info('Plugin should replace the project archive: ' + shouldReplaceProjectArchive()) - if (shouldReplaceProjectArchive()) { - if (!project.configurations.archives.allArtifacts.isEmpty()) { - File springJar = new File( - SpringBootUtil.getBoostedSpringBootUberJarPath(project.configurations.archives.allArtifacts[0].getFile())) - if (net.wasdev.wlp.common.plugins.util.SpringBootUtil.isSpringBootUberJar(springJar)) { - logger.info("Copying back Spring Boot Uber JAR as project artifact.") - FileUtils.copyFile(springJar, project.configurations.archives.allArtifacts[0].getFile()) - } - } - } - } else { - logger.info("Copied Spring Boot Uber JAR to " + springBootUberJarCopy.getCanonicalPath()) - } - } catch (BuildException | IOException e) { - throw new GradleException(e.getMessage(), e) - } - - } - - protected void validateSpringBootUberJAR(File springBootUberJar) throws GradleException { - if (!project.configurations.archives.allArtifacts.isEmpty()) { - if (!BoostUtil.isLibertyJar(project.configurations.archives.allArtifacts[0].getFile(), BoostLogger.getInstance()) - && springBootUberJar == null) { - throw new GradleException ( - "A valid Spring Boot Uber JAR was not found. Run the 'bootJar' task and try again.") - } - } - } - - //returns true if bootJar is using the same archiveName as jar - private boolean shouldReplaceProjectArchive() { - if (project.plugins.hasPlugin('java')) { - if (springBootVersion.startsWith('2.')) { - return project.jar.archiveName == project.bootJar.archiveName - } - } - return false - } - - protected void copyBoosterDependencies() { - - List dependenciesToCopy = BoosterConfigurator.getDependenciesToCopy(boosterPackConfigurators, BoostLogger.getInstance()); - - def boosterConfig = project.getConfigurations().create('boosterDependency') - - dependenciesToCopy.each { dep -> - - project.getDependencies().add(boosterConfig.name, dep) - - } - - project.copy { - from project.configurations.boosterDependency - into "${project.buildDir}/wlp/usr/servers/BoostServer/resources" - include '*.jar' - } - } - } diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostRunTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostRunTask.groovy index f327ace1..575b9695 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostRunTask.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostRunTask.groovy @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.tasks +package boost.gradle.tasks import org.gradle.api.logging.LogLevel @@ -20,10 +20,8 @@ public class BoostRunTask extends AbstractBoostTask { logging.level = LogLevel.INFO group 'Boost' - finalizedBy 'libertyRun' - doFirst { - logger.info('Running the application in the foreground.') + AbstractBoostTask.getRuntimeInstance(project).doRun(project, this) } }) } diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostStartTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostStartTask.groovy index e4930a9a..dd1b5969 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostStartTask.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostStartTask.groovy @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.tasks +package boost.gradle.tasks import org.gradle.api.logging.LogLevel @@ -20,10 +20,9 @@ public class BoostStartTask extends AbstractBoostTask { logging.level = LogLevel.INFO group 'Boost' - dependsOn 'libertyStart' - doFirst { logger.info('Starting the application.') + AbstractBoostTask.getRuntimeInstance(project).doStart(project, this) } }) } diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostStopTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostStopTask.groovy index 82d2d316..cc41c0ff 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostStopTask.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/BoostStopTask.groovy @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.tasks +package boost.gradle.tasks import org.gradle.api.logging.LogLevel @@ -20,10 +20,8 @@ public class BoostStopTask extends AbstractBoostTask { logging.level = LogLevel.INFO group 'Boost' - dependsOn 'libertyStop' - doFirst { - logger.info('Stopping the application.') + AbstractBoostTask.getRuntimeInstance(project).doStop(project, this) } }) } diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/AbstractBoostDockerTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/AbstractBoostDockerTask.groovy deleted file mode 100644 index d8d3af5e..00000000 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/AbstractBoostDockerTask.groovy +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package io.openliberty.boost.gradle.tasks.docker - -import com.spotify.docker.client.auth.RegistryAuthSupplier -import com.spotify.docker.client.auth.ConfigFileRegistryAuthSupplier - -import io.openliberty.boost.gradle.tasks.AbstractBoostTask -import io.openliberty.boost.gradle.utils.BoostLogger -import io.openliberty.boost.common.BoostException -import io.openliberty.boost.common.docker.AbstractDockerI - -import java.io.File - -import org.gradle.api.Project -import org.gradle.api.GradleException - -public abstract class AbstractBoostDockerTask extends AbstractBoostTask implements AbstractDockerI { - - void doExecute(String artifactId) throws GradleException { - try { - if(isValidDockerConfig(BoostLogger.getInstance(), project.boost.docker.repository, project.boost.docker.tag, artifactId)) { - execute(getDockerClient(project.boost.docker.useProxy)); - } - } catch (BoostException e) { - throw new GradleException(e.getMessage(), e); - } - } - - @Override - public RegistryAuthSupplier createRegistryAuthSupplier() throws BoostException { - return new ConfigFileRegistryAuthSupplier() - } - - public String getArtifactId(Project project, String springBootVersion) throws GradleException { - File appFile - if (springBootVersion != null) { - if (project.plugins.hasPlugin('java')) { - if (springBootVersion.startsWith("2.")) { - appFile = project.bootJar.archivePath - } else if (springBootVersion.startsWith("1.")){ - appFile = project.jar.archivePath - //Checking for classifier in bootRepackage and adding to archiveName - if (project.bootRepackage.classifier != null && !project.bootRepackage.classifier.isEmpty()) { - String appArchiveName = //Adding classifier to the appArchive name - appFile.getName().substring(0, appFile.getName().lastIndexOf(".")) + - '-' + - project.bootRepackage.classifier.toString() + - appFile.getName().substring(appFile.getName().lastIndexOf(".")) - appFile = new File(appFile.getParent(), appArchiveName) - } - } - } else { - throw new GradleException ('Unable to determine the project artifact name to add to the container. Please use the java plugin.') - } - - //Getting image name from boost docker extension if it is set, otherwise we use the file name w/o extension - return appFile.getName().substring(0, appFile.getName().lastIndexOf(".")) - } - } -} \ No newline at end of file diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/BoostDockerBuildTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/BoostDockerBuildTask.groovy deleted file mode 100644 index 1b99a53b..00000000 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/BoostDockerBuildTask.groovy +++ /dev/null @@ -1,123 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package io.openliberty.boost.gradle.tasks.docker - -import org.gradle.api.GradleException -import org.gradle.api.logging.LogLevel - -import com.spotify.docker.client.DockerClient - -import io.openliberty.boost.common.BoostException -import io.openliberty.boost.common.docker.DockerBuildI -import io.openliberty.boost.common.docker.DockerParameters -import io.openliberty.boost.gradle.utils.GradleProjectUtil -import io.openliberty.boost.gradle.utils.BoostLogger - -import net.wasdev.wlp.common.plugins.util.SpringBootUtil - -import java.nio.file.FileAlreadyExistsException -import java.nio.file.Files -import java.nio.charset.Charset -import java.util.ArrayList -import java.io.File - -import io.openliberty.boost.gradle.extensions.BoostDockerExtension - -public class BoostDockerBuildTask extends AbstractBoostDockerTask implements DockerBuildI { - - String springBootVersion - String appName - File appFile - - BoostDockerBuildTask() { - configure({ - description 'Dockerizes a Boost project.' - logging.level = LogLevel.INFO - group 'Boost' - - project.afterEvaluate { - springBootVersion = GradleProjectUtil.findSpringBootVersion(project) - if (springBootVersion != null) { - if (project.plugins.hasPlugin('java')) { - if (springBootVersion.startsWith("2.")) { - dependsOn 'bootJar' - appFile = project.bootJar.archivePath - if (isDockerConfigured()) { //We won't add the project to the build lifecycle if Docker isn't configured - project.bootJar.finalizedBy 'boostDockerBuild' - } - } else if (springBootVersion.startsWith("1.")){ - appFile = project.jar.archivePath - //Checking for classifier in bootRepackage and adding to archiveName - if (project.bootRepackage.classifier != null && !project.bootRepackage.classifier.isEmpty()) { - String appArchiveName = //Adding classifier to the appArchive name - appFile.getName().substring(0, appFile.getName().lastIndexOf(".")) + - '-' + - project.bootRepackage.classifier.toString() + - appFile.getName().substring(appFile.getName().lastIndexOf(".")) - appFile = new File(appFile.getParent(), appArchiveName) - } - - dependsOn 'bootRepackage' - - if (isDockerConfigured()) { - project.bootRepackage.finalizedBy 'boostDockerBuild' - } - } - } else { - throw new GradleException ('Unable to determine the project artifact name to add to the container. Please use the java plugin.') - } - - //Getting image name from boost docker extension if it is set, otherwise we use the file name w/o extension - appName = appFile.getName().substring(0, appFile.getName().lastIndexOf(".")) - } - } - - doFirst { - if (appFile == null) { //if we didn't set the appName during configuration we can get it from the project, will be set for springboot projects - if (!project.configurations.archives.allArtifacts.isEmpty()) { - appFile = project.configurations.archives.allArtifacts[0].getFile() - appName = appFile.getName().substring(0, appFile.getName().lastIndexOf(".")) - } else { - throw new GradleException ('Unable to determine the project artifact name.') - } - } - if (!isDockerConfigured()) { - project.boost.docker = new BoostDockerExtension() - } - if (project.boost.docker.repository == null || project.boost.docker.repository.isEmpty()) { - project.boost.docker.repository = appName - } - doExecute(appName) - } - }) - } - - @Override - public void execute(DockerClient dockerClient) throws BoostException { - File projectDirectory = project.projectDir - File outputDirectory = new File(project.buildDir.getAbsolutePath(), 'libs') - - DockerParameters params = new DockerParameters("build/dependency") - - dockerBuild(project.boost.docker.dockerizer, dockerClient, projectDirectory, outputDirectory, springBootVersion, project.boost.docker.pullNewerImage, - project.boost.docker.noCache, project.boost.docker.buildArgs, project.boost.docker.repository, project.boost.docker.tag, params, BoostLogger.getInstance()) - } - - /** - * Find the location of the Spring Boot Uber JAR - * - * @throws BoostException - */ - @Override - public File getAppArchive() throws BoostException { - return appFile - } -} \ No newline at end of file diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/BoostDockerPushTask.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/BoostDockerPushTask.groovy deleted file mode 100644 index 1e1d430c..00000000 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/tasks/docker/BoostDockerPushTask.groovy +++ /dev/null @@ -1,50 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package io.openliberty.boost.gradle.tasks.docker - -import org.gradle.api.logging.LogLevel - -import com.spotify.docker.client.DockerClient - -import io.openliberty.boost.common.BoostException -import io.openliberty.boost.common.docker.DockerPushI - -import io.openliberty.boost.gradle.utils.BoostLogger -import io.openliberty.boost.gradle.utils.GradleProjectUtil - -public class BoostDockerPushTask extends AbstractBoostDockerTask implements DockerPushI { - - String appName - - BoostDockerPushTask() { - configure({ - description 'Dockerizes a Boost project.' - logging.level = LogLevel.INFO - group 'Boost' - - dependsOn 'boostDockerBuild' - - project.afterEvaluate { - appName = getArtifactId(project, GradleProjectUtil.findSpringBootVersion(project)) - } - - doFirst { - doExecute(appName) - } - }) - } - - @Override - public void execute(DockerClient dockerClient) throws BoostException { - dockerPush(dockerClient, appName, - project.boost.docker.repository, project.boost.docker.tag, BoostLogger.getInstance()) - } -} \ No newline at end of file diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/utils/BoostLogger.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/utils/BoostLogger.groovy index 52d83c9f..0ffcaa43 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/utils/BoostLogger.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/utils/BoostLogger.groovy @@ -9,9 +9,9 @@ * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.utils +package boost.gradle.utils -import io.openliberty.boost.common.BoostLoggerI +import boost.common.BoostLoggerI import org.gradle.api.Project diff --git a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/utils/GradleProjectUtil.groovy b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/utils/GradleProjectUtil.groovy index 89466019..603b2735 100644 --- a/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/utils/GradleProjectUtil.groovy +++ b/boost-gradle/src/main/groovy/io/openliberty/boost/gradle/utils/GradleProjectUtil.groovy @@ -8,7 +8,7 @@ * Contributors: * IBM Corporation - initial API and implementation *******************************************************************************/ -package io.openliberty.boost.gradle.utils +package boost.gradle.utils import org.gradle.api.Project import org.gradle.api.artifacts.Dependency @@ -19,27 +19,6 @@ import org.gradle.api.artifacts.ModuleVersionIdentifier import groovy.lang.MissingPropertyException public class GradleProjectUtil { - - /** - * Detect spring boot version dependency - */ - public static String findSpringBootVersion(Project project) { - String version = null - - try { - for (Dependency dep : project.buildscript.configurations.classpath.getAllDependencies().toArray()) { - if ("org.springframework.boot".equals(dep.getGroup()) && "spring-boot-gradle-plugin".equals(dep.getName())) { - version = dep.getVersion() - break - } - } - } catch (MissingPropertyException e) { - project.getLogger().warn('No buildscript configuration found.') - return version - } - - return version - } public static Map getAllDependencies(Project project, BoostLogger logger) { Map dependencies = new HashMap() diff --git a/boost-gradle/src/test/groovy/AbstractBoostDockerTest.groovy b/boost-gradle/src/test/groovy/AbstractBoostDockerTest.groovy deleted file mode 100644 index 679de3c2..00000000 --- a/boost-gradle/src/test/groovy/AbstractBoostDockerTest.groovy +++ /dev/null @@ -1,121 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.junit.Test - -import org.junit.AfterClass - - -import com.github.dockerjava.api.DockerClient -import com.github.dockerjava.api.command.CreateContainerResponse -import com.github.dockerjava.api.model.Container -import com.github.dockerjava.api.model.PortBinding -import com.github.dockerjava.api.model.ExposedPort - -import io.openliberty.boost.common.docker.dockerizer.Dockerizer - -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertTrue -import static org.gradle.testkit.runner.TaskOutcome.SUCCESS - -public abstract class AbstractBoostDockerTest extends AbstractBoostTest { - protected static final String OL_SPRING_15_IMAGE = "open-liberty:springBoot1" - protected static final String OL_SPRING_20_IMAGE = "open-liberty:springBoot2" - - protected static final String OPEN_J9_IMAGE = "adoptopenjdk/openjdk8-openj9" - - protected static File dockerFile - protected static DockerClient dockerClient - - protected static String containerId - - protected static String repository - protected static String libertyImage - protected static String dockerPort - - @AfterClass - public static void cleanup() throws Exception { - dockerClient.stopContainerCmd(containerId).exec() - - dockerClient.removeContainerCmd(containerId).exec() - } - - @Test - public void testDockerSuccess() throws IOException { - assertEquals(SUCCESS, result.task(":boostDockerBuild").getOutcome()) - } - - @Test - public void testDockerizeCreatesDockerfile() throws Exception { - assertTrue(dockerFile.getCanonicalPath() + " was not created", dockerFile.exists()) - } - - @Test - public void testDockerfileContainsCorrectLibertyImage() throws Exception { - BufferedReader reader = new BufferedReader(new FileReader(dockerFile)) - - assertTrue("Expected Liberty generated Dockerfile line ${Dockerizer.BOOST_GEN} was not found in " + dockerFile.getCanonicalPath(), reader.readLine().contains(Dockerizer.BOOST_GEN)) - assertTrue("Expected Open liberty base image ${libertyImage} was not found in " + dockerFile.getCanonicalPath(), reader.readLine().contains(libertyImage)) - } - - @Test - public void runDockerContainerAndVerifyAppOnEndpoint() throws Exception { - ExposedPort exposedPort = ExposedPort.tcp(Integer.valueOf(dockerPort)) - - CreateContainerResponse container = dockerClient.createContainerCmd("${repository}:latest") - .withPortBindings(PortBinding.parse(dockerPort + ":" + dockerPort)).withExposedPorts(exposedPort).exec() - Thread.sleep(3000) - - containerId = container.getId() - - dockerClient.startContainerCmd(containerId).exec() - - Thread.sleep(10000) - testDockerContainerRunning() - - Thread.sleep(10000) - testAppRunningOnEndpoint() - } - - public void testDockerContainerRunning() throws Exception { - List containers = dockerClient.listContainersCmd().exec() - // docker local registry conatiner and image container - assertEquals("Expected number of running containers not found", 2, containers.size()) - } - - public void testAppRunningOnEndpoint() throws Exception { - URL requestUrl = new URL("http://" + getTestDockerHost() + ":" + dockerPort) - HttpURLConnection conn = (HttpURLConnection) requestUrl.openConnection() - - if (conn != null) { - assertEquals("Expected response code not found.", 200, conn.getResponseCode()) - } - - StringBuffer response = new StringBuffer() - - BufferedReader br = new BufferedReader(new InputStreamReader(conn.getInputStream())) - String line; - while ((line = br.readLine()) != null) { - response.append(line) - } - assertEquals("Expected body not found.", "Greetings from Spring Boot!", response.toString()) - } - - private static String getTestDockerHost() { - String dockerHostEnv = System.getenv("DOCKER_HOST"); - if (dockerHostEnv == null || dockerHostEnv.isEmpty()) { - return "localhost"; - } else { - URI dockerHostURI = URI.create(dockerHostEnv); - return dockerHostURI.getHost(); - } - } - -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/BoostFunctionalTest.groovy b/boost-gradle/src/test/groovy/BoostFunctionalTest.groovy deleted file mode 100644 index 6d3253f6..00000000 --- a/boost-gradle/src/test/groovy/BoostFunctionalTest.groovy +++ /dev/null @@ -1,66 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.BuildResult -import org.gradle.testkit.runner.GradleRunner -import org.junit.Before -import org.junit.Test - -import java.io.File -import java.io.IOException - -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertTrue - -import static org.gradle.testkit.runner.TaskOutcome.* - -public class BoostFunctionalTest extends AbstractBoostTest { - - String buildFileContent = "buildscript {\n\t" + - "repositories {\n\t\t" + - "mavenLocal()\n\t\t" + - "mavenCentral()\n\t\t" + - "maven {\n\t\t\t" + - "url 'https://oss.sonatype.org/content/repositories/snapshots/'\n\t\t" + - "}\n\t" + - "}\n\t" + - "dependencies {\n\t\t" + - "classpath \"io.openliberty.boost:boost-gradle-plugin:\$boostVersion\"\n\t" + - "}\n" + - "}\n\n" + - "apply plugin: 'boost'\n\n" + - "repositories {\n\t" + - "mavenLocal()\n\t" + - "mavenCentral()\n" + - "}\n\n" + - "dependencies {\n\t" + - "libertyRuntime \"\$runtimeGroup:\$runtimeArtifactId:\$runtimeVersion\"\n" + - "}" - - @Before - void setup () { - testProjectDir = new File(integTestDir, 'BoostFunctionalTest') - - createDir(testProjectDir) - writeFile(new File(testProjectDir, 'build.gradle'), buildFileContent) - copyFile(new File("build/gradle.properties"), new File(testProjectDir, 'gradle.properties')) - } - - @Test - public void testStartAndStopTasks() throws IOException { - BuildResult result = GradleRunner.create() - .withProjectDir(testProjectDir) - .withArguments("boostStart", "boostStop") - .build() - - assertEquals(SUCCESS, result.task(":boostStart").getOutcome()) - assertEquals(SUCCESS, result.task(":boostStop").getOutcome()) - } -} diff --git a/boost-gradle/src/test/groovy/BoostPackageJPA21Test.groovy b/boost-gradle/src/test/groovy/BoostPackageJPA21Test.groovy index f817a3ae..eb0eeefe 100644 --- a/boost-gradle/src/test/groovy/BoostPackageJPA21Test.groovy +++ b/boost-gradle/src/test/groovy/BoostPackageJPA21Test.groovy @@ -51,8 +51,6 @@ public class BoostPackageJPA21Test extends AbstractBoostTest { @Test public void testPackageSuccess() throws IOException { - assertEquals(SUCCESS, result.task(":installLiberty").getOutcome()) - assertEquals(SUCCESS, result.task(":libertyCreate").getOutcome()) assertEquals(SUCCESS, result.task(":boostPackage").getOutcome()) assertEquals(SUCCESS, result.task(":boostStart").getOutcome()) diff --git a/boost-gradle/src/test/groovy/BoostPackageJPA22Test.groovy b/boost-gradle/src/test/groovy/BoostPackageJPA22Test.groovy index 569806df..c416de43 100644 --- a/boost-gradle/src/test/groovy/BoostPackageJPA22Test.groovy +++ b/boost-gradle/src/test/groovy/BoostPackageJPA22Test.groovy @@ -51,8 +51,6 @@ public class BoostPackageJPA22Test extends AbstractBoostTest { @Test public void testPackageSuccess() throws IOException { - assertEquals(SUCCESS, result.task(":installLiberty").getOutcome()) - assertEquals(SUCCESS, result.task(":libertyCreate").getOutcome()) assertEquals(SUCCESS, result.task(":boostPackage").getOutcome()) assertEquals(SUCCESS, result.task(":boostStart").getOutcome()) diff --git a/boost-gradle/src/test/groovy/BoostPackageJaxRS20Test.groovy b/boost-gradle/src/test/groovy/BoostPackageJaxRS20Test.groovy index a920f6ed..6c1e7854 100644 --- a/boost-gradle/src/test/groovy/BoostPackageJaxRS20Test.groovy +++ b/boost-gradle/src/test/groovy/BoostPackageJaxRS20Test.groovy @@ -54,8 +54,6 @@ public class BoostPackageJaxRS20Test extends AbstractBoostTest { @Test public void testPackageSuccess() throws IOException { - assertEquals(SUCCESS, result.task(":installLiberty").getOutcome()) - assertEquals(SUCCESS, result.task(":libertyCreate").getOutcome()) assertEquals(SUCCESS, result.task(":boostPackage").getOutcome()) assertEquals(SUCCESS, result.task(":boostStart").getOutcome()) diff --git a/boost-gradle/src/test/groovy/BoostPackageJaxRS21Test.groovy b/boost-gradle/src/test/groovy/BoostPackageJaxRS21Test.groovy index d8d787d8..601c88e0 100644 --- a/boost-gradle/src/test/groovy/BoostPackageJaxRS21Test.groovy +++ b/boost-gradle/src/test/groovy/BoostPackageJaxRS21Test.groovy @@ -51,8 +51,6 @@ public class BoostPackageJaxRS21Test extends AbstractBoostTest { @Test public void testPackageSuccess() throws IOException { - assertEquals(SUCCESS, result.task(":installLiberty").getOutcome()) - assertEquals(SUCCESS, result.task(":libertyCreate").getOutcome()) assertEquals(SUCCESS, result.task(":boostPackage").getOutcome()) assertEquals(SUCCESS, result.task(":boostStart").getOutcome()) diff --git a/boost-gradle/src/test/groovy/BoostPackageSpring15Test.groovy b/boost-gradle/src/test/groovy/BoostPackageSpring15Test.groovy deleted file mode 100644 index 3369007b..00000000 --- a/boost-gradle/src/test/groovy/BoostPackageSpring15Test.groovy +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import org.junit.Test - -import static org.junit.Assert.assertTrue - -public class PackageSpring15Test extends AbstractBoostTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "PackageSpring15Test") - buildFilename = "springApp-15.gradle" - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "boostStart", "boostStop", "-i", "-s") - .build() - } - - @Test - public void testPackageSuccess() throws IOException { - testPackageTask() - assertTrue(new File(testProjectDir, "build/libs/test-spring15.jar").exists()) - } - - @Test - public void testPackageContents() throws IOException { - testPackageContentsforSpring15() - } -} diff --git a/boost-gradle/src/test/groovy/BoostPackageSpring20Test.groovy b/boost-gradle/src/test/groovy/BoostPackageSpring20Test.groovy deleted file mode 100644 index 4544be23..00000000 --- a/boost-gradle/src/test/groovy/BoostPackageSpring20Test.groovy +++ /dev/null @@ -1,45 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import org.junit.Test - -import static org.junit.Assert.assertTrue - -public class PackageSpring20Test extends AbstractBoostTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "PackageSpring20Test") - buildFilename = "springApp-20.gradle" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "boostStart", "boostStop", "-i", "-s") - .build() - } - - @Test - public void testPackageSuccess() throws IOException { - testPackageTask() - assertTrue(new File(testProjectDir, "build/libs/gs-spring-boot-0.1.0.jar").exists()) - } - - @Test - public void testPackageContents() throws IOException { - testPackageContentsforSpring20() - } -} diff --git a/boost-gradle/src/test/groovy/BoostPackageSpringSSLTest.groovy b/boost-gradle/src/test/groovy/BoostPackageSpringSSLTest.groovy deleted file mode 100644 index 81663ba2..00000000 --- a/boost-gradle/src/test/groovy/BoostPackageSpringSSLTest.groovy +++ /dev/null @@ -1,103 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import org.junit.AfterClass -import org.junit.Test - -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; - -import org.apache.http.HttpResponse; -import org.apache.http.HttpStatus; - -import org.apache.http.client.ResponseHandler; -import org.apache.http.impl.client.BasicResponseHandler; -import org.apache.http.client.methods.HttpGet; -import org.apache.http.conn.ssl.NoopHostnameVerifier; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClients; -import org.gradle.testkit.runner.TaskOutcome - -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertTrue -import static org.gradle.testkit.runner.TaskOutcome.SUCCESS - -public class BoostPackageSpringSSLTest extends AbstractBoostTest { - - private static String URL = "https://localhost:8443/"; - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot-ssl") - testProjectDir = new File(integTestDir, "PackageSpringSSLTest") - buildFilename = "build.gradle" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("boostPackage", "boostStart", "-i", "-s") - .build() - - assertEquals(SUCCESS, result.task(":boostPackage").getOutcome()) - assertEquals(SUCCESS, result.task(":boostStart").getOutcome()) - } - - @AfterClass - public static void teardown() { - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("boostStop", "-i", "-s") - .build() - - assertEquals(SUCCESS, result.task(":boostStop").getOutcome()) - } - - @Test - public void testServlet() throws Exception { - - def nullTrustManager = [ - checkClientTrusted: { chain, authType -> }, - checkServerTrusted: { chain, authType -> }, - getAcceptedIssuers: { null } - ] - - def nullHostnameVerifier = [ - verify: { hostname, session -> true } - ] - - SSLContext sslContext = SSLContext.getInstance("SSL") - sslContext.init(null, [nullTrustManager as X509TrustManager] as TrustManager[], null) - - 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); - - assertTrue("Unexpected response body", body.contains("Greetings from Spring Boot!")); - } -} diff --git a/boost-gradle/src/test/groovy/DockerBuild15Test.groovy b/boost-gradle/src/test/groovy/DockerBuild15Test.groovy deleted file mode 100644 index f6816f02..00000000 --- a/boost-gradle/src/test/groovy/DockerBuild15Test.groovy +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -public class DockerBuild15Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerBuild15Test") - buildFilename = "docker15Test.gradle" - libertyImage = OL_SPRING_15_IMAGE - repository = "localhost:5000/test-image15" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerBuild20Test.groovy b/boost-gradle/src/test/groovy/DockerBuild20Test.groovy deleted file mode 100644 index d3c1f9ba..00000000 --- a/boost-gradle/src/test/groovy/DockerBuild20Test.groovy +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -public class DockerBuild20Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerBuild20Test") - buildFilename = "docker20Test.gradle" - libertyImage = OL_SPRING_20_IMAGE - repository = "localhost:5000/test-image20" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerBuildDockerizerClasspath15Test.groovy b/boost-gradle/src/test/groovy/DockerBuildDockerizerClasspath15Test.groovy deleted file mode 100644 index 0a826beb..00000000 --- a/boost-gradle/src/test/groovy/DockerBuildDockerizerClasspath15Test.groovy +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -public class DockerBuildDockerizerClasspath15Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerBuildDockerizerClasspath15Test") - buildFilename = "dockerDockerizerClasspath15Test.gradle" - libertyImage = OPEN_J9_IMAGE - repository = "localhost:5000/test-classpath15" - dockerPort = "8080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerBuildDockerizerClasspath20Test.groovy b/boost-gradle/src/test/groovy/DockerBuildDockerizerClasspath20Test.groovy deleted file mode 100644 index f2732fa9..00000000 --- a/boost-gradle/src/test/groovy/DockerBuildDockerizerClasspath20Test.groovy +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -public class DockerBuildDockerizerClasspath20Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerBuildDockerizerClasspath20Test") - buildFilename = "dockerDockerizerClasspath20Test.gradle" - libertyImage = OPEN_J9_IMAGE - repository = "localhost:5000/test-classpath20" - dockerPort = "8080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerBuildDockerizerJar15Test.groovy b/boost-gradle/src/test/groovy/DockerBuildDockerizerJar15Test.groovy deleted file mode 100644 index eb29fce5..00000000 --- a/boost-gradle/src/test/groovy/DockerBuildDockerizerJar15Test.groovy +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -public class DockerBuildDockerizerJar15Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerBuildDockerizerJar15Test") - buildFilename = "dockerDockerizerJar15Test.gradle" - libertyImage = OPEN_J9_IMAGE - repository = "localhost:5000/test-jar15" - dockerPort = "8080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerBuildDockerizerJar20Test.groovy b/boost-gradle/src/test/groovy/DockerBuildDockerizerJar20Test.groovy deleted file mode 100644 index c730f81a..00000000 --- a/boost-gradle/src/test/groovy/DockerBuildDockerizerJar20Test.groovy +++ /dev/null @@ -1,38 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass - -import com.github.dockerjava.core.DockerClientBuilder - -public class DockerBuildDockerizerJar20Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerBuildDockerizerJar20Test") - buildFilename = "dockerDockerizerJar20Test.gradle" - libertyImage = OPEN_J9_IMAGE - repository = "localhost:5000/test-jar20" - dockerPort = "8080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerClassifier15Test.groovy b/boost-gradle/src/test/groovy/DockerClassifier15Test.groovy deleted file mode 100644 index f454e09e..00000000 --- a/boost-gradle/src/test/groovy/DockerClassifier15Test.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -//Tests creating a Docker image with an extension -public class DockerClassifier15Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerClassifier15Test") - buildFilename = "dockerClassifier15Test.gradle" - libertyImage = OL_SPRING_15_IMAGE - repository = "test-docker15-test" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerClassifier20Test.groovy b/boost-gradle/src/test/groovy/DockerClassifier20Test.groovy deleted file mode 100644 index 62997247..00000000 --- a/boost-gradle/src/test/groovy/DockerClassifier20Test.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -//Tests creating a Docker image with an extension -public class DockerClassifier20Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerClassifier20Test") - buildFilename = "dockerClassifier20Test.gradle" - libertyImage = OL_SPRING_20_IMAGE - repository = "test-docker20-test" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } - -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerEmpty15Test.groovy b/boost-gradle/src/test/groovy/DockerEmpty15Test.groovy deleted file mode 100644 index 0ea6b78c..00000000 --- a/boost-gradle/src/test/groovy/DockerEmpty15Test.groovy +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -public class DockerEmpty15Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerEmpty15Test") - buildFilename = "dockerEmpty15Test.gradle" - libertyImage = OL_SPRING_15_IMAGE - repository = "test-docker15" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerEmpty20Test.groovy b/boost-gradle/src/test/groovy/DockerEmpty20Test.groovy deleted file mode 100644 index 91922a4f..00000000 --- a/boost-gradle/src/test/groovy/DockerEmpty20Test.groovy +++ /dev/null @@ -1,37 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -public class DockerEmpty20Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerEmpty20Test") - buildFilename = "dockerEmpty20Test.gradle" - libertyImage = OL_SPRING_20_IMAGE - repository = "test-docker20" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerPush15Test.groovy b/boost-gradle/src/test/groovy/DockerPush15Test.groovy deleted file mode 100644 index 3258e964..00000000 --- a/boost-gradle/src/test/groovy/DockerPush15Test.groovy +++ /dev/null @@ -1,101 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import static org.gradle.testkit.runner.TaskOutcome.SUCCESS -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertNull -import static org.junit.Assert.assertNotNull - -import org.gradle.testkit.runner.GradleRunner -import java.util.concurrent.TimeUnit -import org.junit.BeforeClass -import org.junit.Test - -import com.github.dockerjava.core.DockerClientBuilder -import com.github.dockerjava.api.model.Image -import com.github.dockerjava.core.command.PullImageResultCallback - -public class DockerPush15Test extends AbstractBoostDockerTest { - - private static String imageName = "localhost:5000/test-image15:latest" - - @BeforeClass - public static void setup() { - - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerPush15Test") - buildFilename = "docker15Test.gradle" - libertyImage = OL_SPRING_15_IMAGE - repository = "localhost:5000/test-image15" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("boostDockerPush", "-i", "-s") - .build() - } - - @Test - public void testPushSuccess() throws Exception { - assertEquals(SUCCESS, result.task(":boostDockerPush").getOutcome()) - } - - @Test - public void testPushDockerImageToLocalRegistry() throws Exception { - Image pushedImage = getImage(imageName) - assertNotNull(imageName + " was not built.", pushedImage) - - long sizeOfPushedImage = pushedImage.getSize() - String idOfPushedImage = pushedImage.getId() - - // Remove the local image. - removeImage(imageName) - - // Pull the image from the local repository which got pushed by the plugin. This - // is possible if the plugin successfully pushed to the registry. - dockerClient.pullImageCmd("${repository}").withTag("latest").exec(new PullImageResultCallback()) - .awaitCompletion(10, TimeUnit.SECONDS) - - Image pulledImage = getImage(imageName) - assertNotNull(repository + " was not pulled.", pulledImage) - - long sizeOfPulledImage = pulledImage.getSize() - String idOfPulledImage = pulledImage.getId() - - assertEquals("Expected image was not pulled, size doesn't match.", sizeOfPushedImage, sizeOfPulledImage) - assertEquals("Expected image was not pulled, id doesn't match.", idOfPushedImage, idOfPulledImage) - } - - private Image getImage(String repository) throws Exception { - List images = dockerClient.listImagesCmd().exec() - for (Image image : images) { - String[] repoTags = image.getRepoTags() - if (repoTags != null) { - String repoTag = repoTags[0] - if (repoTag != null && repoTag.equals(repository)) { - return image - } - } - } - return null; - } - - private void removeImage(String repository) throws Exception { - dockerClient.removeImageCmd(repository).exec() - Image removedImage = getImage(repository) - assertNull(repository + " was not removed.", removedImage) - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/DockerPush20Test.groovy b/boost-gradle/src/test/groovy/DockerPush20Test.groovy deleted file mode 100644 index 0d47f9c3..00000000 --- a/boost-gradle/src/test/groovy/DockerPush20Test.groovy +++ /dev/null @@ -1,102 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -import org.gradle.testkit.runner.GradleRunner -import static org.gradle.testkit.runner.TaskOutcome.SUCCESS -import org.junit.BeforeClass -import org.junit.Test -import java.util.concurrent.TimeUnit - -import com.github.dockerjava.core.DockerClientBuilder -import com.github.dockerjava.api.model.Image -import com.github.dockerjava.core.command.PullImageResultCallback - -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertNull -import static org.junit.Assert.assertNotNull - -public class DockerPush20Test extends AbstractBoostDockerTest { - - private static String imageName = "localhost:5000/test-image20:latest" - - @BeforeClass - public static void setup() { - - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "DockerPush20Test") - buildFilename = "docker20Test.gradle" - libertyImage = OL_SPRING_20_IMAGE - repository = "localhost:5000/test-image20" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("boostDockerPush", "-i", "-s") - .build() - } - - @Test - public void testPushSuccess() throws Exception { - assertEquals(SUCCESS, result.task(":boostDockerPush").getOutcome()) - } - - @Test - public void testPushDockerImageToLocalRegistry() throws Exception { - Image pushedImage = getImage(imageName) - assertNotNull(imageName + " was not built.", pushedImage) - - long sizeOfPushedImage = pushedImage.getSize() - String idOfPushedImage = pushedImage.getId() - - // Remove the local image. - removeImage(imageName) - - // Pull the image from the local repository which got pushed by the plugin. This - // is possible if the plugin successfully pushed to the registry. - dockerClient.pullImageCmd("${repository}").withTag("latest").exec(new PullImageResultCallback()) - .awaitCompletion(10, TimeUnit.SECONDS) - - Image pulledImage = getImage(imageName) - assertNotNull(repository + " was not pulled.", pulledImage) - - long sizeOfPulledImage = pulledImage.getSize() - String idOfPulledImage = pulledImage.getId() - - assertEquals("Expected image was not pulled, size doesn't match.", sizeOfPushedImage, sizeOfPulledImage) - assertEquals("Expected image was not pulled, id doesn't match.", idOfPushedImage, idOfPulledImage) - } - - private Image getImage(String repository) throws Exception { - List images = dockerClient.listImagesCmd().exec() - for (Image image : images) { - String[] repoTags = image.getRepoTags() - if (repoTags != null) { - String repoTag = repoTags[0] - if (repoTag != null && repoTag.equals(repository)) { - return image - } - } - } - return null; - } - - private void removeImage(String repository) throws Exception { - dockerClient.removeImageCmd(repository).exec() - Image removedImage = getImage(repository) - assertNull(repository + " was not removed.", removedImage) - } -} \ No newline at end of file diff --git a/boost-gradle/src/test/groovy/PackageAndDockerize15Test.groovy b/boost-gradle/src/test/groovy/PackageAndDockerize15Test.groovy deleted file mode 100644 index 3eba4f4b..00000000 --- a/boost-gradle/src/test/groovy/PackageAndDockerize15Test.groovy +++ /dev/null @@ -1,52 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.Test -import org.junit.BeforeClass -import static org.junit.Assert.assertTrue - -import com.github.dockerjava.core.DockerClientBuilder - -public class PackageAndDockerize15Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "PackageAndDockerize15Test") - buildFilename = "springApp-15.gradle" - libertyImage = OL_SPRING_15_IMAGE - repository = "test-spring15" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("boostDockerBuild", "boostPackage", "boostStart", "boostStop", "-i", "-s") - .build() - } - - @Test - public void testBuildSuccess() throws IOException { - testDockerPackageTask() - assertTrue(new File(testProjectDir, "build/libs/${repository}.jar").exists()) - } - - @Test - public void testPackageContents() throws IOException { - testPackageContentsforSpring15() - } -} diff --git a/boost-gradle/src/test/groovy/PackageAndDockerize20Test.groovy b/boost-gradle/src/test/groovy/PackageAndDockerize20Test.groovy deleted file mode 100644 index 43bb990f..00000000 --- a/boost-gradle/src/test/groovy/PackageAndDockerize20Test.groovy +++ /dev/null @@ -1,53 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ - -import org.gradle.testkit.runner.GradleRunner -import org.junit.Test -import org.junit.BeforeClass -import com.github.dockerjava.core.DockerClientBuilder - -import static org.junit.Assert.assertTrue - -public class PackageAndDockerize20Test extends AbstractBoostDockerTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "PackageAndDockerize20Test") - buildFilename = "springApp-20.gradle" - libertyImage = OL_SPRING_20_IMAGE - repository = "gs-spring-boot-0.1.0" - dockerPort = "9080" - - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - dockerFile = new File(testProjectDir, "Dockerfile") - dockerClient = DockerClientBuilder.getInstance().build() - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("boostDockerBuild", "boostPackage", "boostStart", "boostStop", "-i", "-s") - .build() - } - - @Test - public void testBuildSuccess() throws IOException { - testDockerPackageTask() - assertTrue(new File(testProjectDir, "build/libs/${repository}.jar").exists()) - } - - @Test - public void testPackageContents() throws IOException { - testPackageContentsforSpring20() - } -} diff --git a/boost-gradle/src/test/groovy/PackageExtensionTest.groovy b/boost-gradle/src/test/groovy/PackageExtensionTest.groovy deleted file mode 100644 index 2520cfef..00000000 --- a/boost-gradle/src/test/groovy/PackageExtensionTest.groovy +++ /dev/null @@ -1,43 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.gradle.testkit.runner.TaskOutcome -import org.junit.BeforeClass -import org.junit.Test - -import static org.junit.Assert.assertEquals -import static org.junit.Assert.assertTrue - - -public class PackageExtensionTest extends AbstractBoostTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "PackageExtensionTest") - buildFilename = "packageExtensionTest.gradle" - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "-i", "-s") - .build() - } - - @Test - public void testPackageSuccess() throws IOException { - assertEquals(TaskOutcome.SUCCESS, result.task(":boostPackage").getOutcome()) - - assertTrue(new File(testProjectDir, "build/libs/extensionTest.jar").exists()) - } -} diff --git a/boost-gradle/src/test/groovy/PackageSpringClassifier15Test.groovy b/boost-gradle/src/test/groovy/PackageSpringClassifier15Test.groovy deleted file mode 100644 index eb55d826..00000000 --- a/boost-gradle/src/test/groovy/PackageSpringClassifier15Test.groovy +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import org.junit.Test - -import static org.junit.Assert.assertTrue - -public class PackageSpringClassifier15Test extends AbstractBoostTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "PackageSpringClassifier15Test") - buildFilename = "springAppClassifier-15.gradle" - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "boostStart", "boostStop", "-i", "-s") - .build() - } - - @Test - public void testPackageSuccess() throws IOException { - testPackageTask() - File output = new File(testProjectDir, "build/libs/PackageSpringClassifier15Test-test.jar") - assertTrue(output.exists()) - testSpringBootEndpoint(output) - } - - @Test - public void testPackageContents() throws IOException { - testPackageContentsforSpring15() - } -} diff --git a/boost-gradle/src/test/groovy/PackageSpringClassifier20Test.groovy b/boost-gradle/src/test/groovy/PackageSpringClassifier20Test.groovy deleted file mode 100644 index 03624c7f..00000000 --- a/boost-gradle/src/test/groovy/PackageSpringClassifier20Test.groovy +++ /dev/null @@ -1,46 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import org.junit.Test - -import static org.junit.Assert.assertTrue - -public class PackageSpringClassifier20Test extends AbstractBoostTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "PackageSpringClassifier20Test") - buildFilename = "springAppClassifier-20.gradle" - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "boostStart", "boostStop", "-i", "-s") - .build() - } - - @Test - public void testPackageSuccess() throws IOException { - testPackageTask() - File output = new File(testProjectDir, "build/libs/gs-spring-boot-0.1.0-test.jar") - assertTrue(output.exists()) - testSpringBootEndpoint(output) - } - - @Test - public void testPackageContents() throws IOException { - testPackageContentsforSpring20() - } -} diff --git a/boost-gradle/src/test/groovy/PackageSpringWar20Test.groovy b/boost-gradle/src/test/groovy/PackageSpringWar20Test.groovy deleted file mode 100644 index b41e07b3..00000000 --- a/boost-gradle/src/test/groovy/PackageSpringWar20Test.groovy +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -import org.gradle.testkit.runner.GradleRunner -import org.junit.BeforeClass -import org.junit.Test - -import static org.junit.Assert.assertTrue - -public class PackageSpringWar20Test extends AbstractBoostTest { - - @BeforeClass - public static void setup() { - resourceDir = new File("build/resources/test/test-spring-boot") - testProjectDir = new File(integTestDir, "PackageSpringWar20Test") - buildFilename = "springWarApp-20.gradle" - createDir(testProjectDir) - createTestProject(testProjectDir, resourceDir, buildFilename) - - result = GradleRunner.create() - .withProjectDir(testProjectDir) - .forwardOutput() - .withArguments("build", "boostStart", "boostStop", "-i", "-s") - .build() - } - - @Test - public void testPackageSuccess() throws IOException { - testPackageTask() - assertTrue(new File(testProjectDir, "build/libs/gs-spring-boot-0.1.0.war").exists()) - } - - @Test - public void testPackageContents() throws IOException { - testPackageContentsforSpring20() - } -} diff --git a/boost-gradle/src/test/resources/test-jaxrs/settings.gradle b/boost-gradle/src/test/resources/test-jaxrs/settings.gradle new file mode 100644 index 00000000..e69de29b diff --git a/boost-gradle/src/test/resources/test-jaxrs/testJaxrs20.gradle b/boost-gradle/src/test/resources/test-jaxrs/testJaxrs20.gradle index 095ef018..1cc7bbc2 100644 --- a/boost-gradle/src/test/resources/test-jaxrs/testJaxrs20.gradle +++ b/boost-gradle/src/test/resources/test-jaxrs/testJaxrs20.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://repo.spring.io/plugins-snapshot' } } dependencies { - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") + classpath("boost:boost-gradle-plugin:$boostVersion") classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -31,12 +31,12 @@ targetCompatibility = 1.8 dependencyManagement { imports { - mavenBom "io.openliberty.boosters:ee7-bom:$boosterVersion" + mavenBom "boost.boosters:ee7-bom:$boosterVersion" } } dependencies { - compile "io.openliberty.boosters:jaxrs" + compile "boost.boosters:jaxrs" - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" + compile "$runtimeGroup:$runtimeArtifactId:$boosterVersion" } diff --git a/boost-gradle/src/test/resources/test-jaxrs/testJaxrs21.gradle b/boost-gradle/src/test/resources/test-jaxrs/testJaxrs21.gradle index 94b1412c..4ea1fb2a 100644 --- a/boost-gradle/src/test/resources/test-jaxrs/testJaxrs21.gradle +++ b/boost-gradle/src/test/resources/test-jaxrs/testJaxrs21.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://repo.spring.io/plugins-snapshot' } } dependencies { - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") + classpath("boost:boost-gradle-plugin:$boostVersion") classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -31,12 +31,12 @@ targetCompatibility = 1.8 dependencyManagement { imports { - mavenBom "io.openliberty.boosters:ee8-bom:$boosterVersion" + mavenBom "boost.boosters:ee8-bom:$boosterVersion" } } dependencies { - compile "io.openliberty.boosters:jaxrs" + compile "boost.boosters:jaxrs" - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" + compile "$runtimeGroup:$runtimeArtifactId:$boosterVersion" } diff --git a/boost-gradle/src/test/resources/test-jdbc/db2.gradle b/boost-gradle/src/test/resources/test-jdbc/db2.gradle index 6f5e8f65..71cb5b92 100644 --- a/boost-gradle/src/test/resources/test-jdbc/db2.gradle +++ b/boost-gradle/src/test/resources/test-jdbc/db2.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://repo.spring.io/plugins-snapshot' } } dependencies { - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") + classpath("boost:boost-gradle-plugin:$boostVersion") classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -31,17 +31,17 @@ targetCompatibility = 1.8 dependencyManagement { imports { - mavenBom "io.openliberty.boosters:ee8-bom:$boosterVersion" + mavenBom "boost.boosters:ee8-bom:$boosterVersion" } } dependencies { - compile "io.openliberty.boosters:jaxrs" - compile "io.openliberty.boosters:jdbc" + compile "boost.boosters:jaxrs" + compile "boost.boosters:jdbc" compile "com.ibm.db2.jcc:db2jcc:db2jcc4" compile("org.apache.httpcomponents:httpclient:4.5.6") compile("org.apache.httpcomponents:httpcore:4.4.10") compile "javax.servlet:javax.servlet-api:4.0.0" - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" + compile "$runtimeGroup:$runtimeArtifactId:$boosterVersion" } diff --git a/boost-gradle/src/test/resources/test-jdbc/derby-default.gradle b/boost-gradle/src/test/resources/test-jdbc/derby-default.gradle index 74d36ea1..46bc9dad 100644 --- a/boost-gradle/src/test/resources/test-jdbc/derby-default.gradle +++ b/boost-gradle/src/test/resources/test-jdbc/derby-default.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://repo.spring.io/plugins-snapshot' } } dependencies { - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") + classpath("boost:boost-gradle-plugin:$boostVersion") classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -31,16 +31,16 @@ targetCompatibility = 1.8 dependencyManagement { imports { - mavenBom "io.openliberty.boosters:ee8-bom:$boosterVersion" + mavenBom "boost.boosters:ee8-bom:$boosterVersion" } } dependencies { - compile "io.openliberty.boosters:jaxrs" - compile "io.openliberty.boosters:jdbc" + compile "boost.boosters:jaxrs" + compile "boost.boosters:jdbc" compile("org.apache.httpcomponents:httpclient:4.5.6") compile("org.apache.httpcomponents:httpcore:4.4.10") compile "javax.servlet:javax.servlet-api:4.0.0" - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" + compile "$runtimeGroup:$runtimeArtifactId:$boosterVersion" } diff --git a/boost-gradle/src/test/resources/test-jdbc/derby-defined.gradle b/boost-gradle/src/test/resources/test-jdbc/derby-defined.gradle index 0b880c21..29443fe0 100644 --- a/boost-gradle/src/test/resources/test-jdbc/derby-defined.gradle +++ b/boost-gradle/src/test/resources/test-jdbc/derby-defined.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://repo.spring.io/plugins-snapshot' } } dependencies { - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") + classpath("boost:boost-gradle-plugin:$boostVersion") classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -31,17 +31,17 @@ targetCompatibility = 1.8 dependencyManagement { imports { - mavenBom "io.openliberty.boosters:ee8-bom:$boosterVersion" + mavenBom "boost.boosters:ee8-bom:$boosterVersion" } } dependencies { - compile "io.openliberty.boosters:jaxrs" - compile "io.openliberty.boosters:jdbc" + compile "boost.boosters:jaxrs" + compile "boost.boosters:jdbc" compile "org.apache.derby:derby:10.11.1.1" compile("org.apache.httpcomponents:httpclient:4.5.6") compile("org.apache.httpcomponents:httpcore:4.4.10") compile "javax.servlet:javax.servlet-api:4.0.0" - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" + compile "$runtimeGroup:$runtimeArtifactId:$boosterVersion" } diff --git a/boost-gradle/src/test/resources/test-jdbc/mysql.gradle b/boost-gradle/src/test/resources/test-jdbc/mysql.gradle index 02b8904c..6c2afeff 100644 --- a/boost-gradle/src/test/resources/test-jdbc/mysql.gradle +++ b/boost-gradle/src/test/resources/test-jdbc/mysql.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://repo.spring.io/plugins-snapshot' } } dependencies { - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") + classpath("boost:boost-gradle-plugin:$boostVersion") classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -31,17 +31,17 @@ targetCompatibility = 1.8 dependencyManagement { imports { - mavenBom "io.openliberty.boosters:ee8-bom:$boosterVersion" + mavenBom "boost.boosters:ee8-bom:$boosterVersion" } } dependencies { - compile "io.openliberty.boosters:jaxrs" - compile "io.openliberty.boosters:jdbc" + compile "boost.boosters:jaxrs" + compile "boost.boosters:jdbc" compile "mysql:mysql-connector-java:8.0.15" compile("org.apache.httpcomponents:httpclient:4.5.6") compile("org.apache.httpcomponents:httpcore:4.4.10") compile "javax.servlet:javax.servlet-api:4.0.0" - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" + compile "$runtimeGroup:$runtimeArtifactId:$boosterVersion" } diff --git a/boost-gradle/src/test/resources/test-jdbc/settings.gradle b/boost-gradle/src/test/resources/test-jdbc/settings.gradle new file mode 100644 index 00000000..e69de29b diff --git a/boost-gradle/src/test/resources/test-jpa/settings.gradle b/boost-gradle/src/test/resources/test-jpa/settings.gradle new file mode 100644 index 00000000..e69de29b diff --git a/boost-gradle/src/test/resources/test-jpa/testJPA21.gradle b/boost-gradle/src/test/resources/test-jpa/testJPA21.gradle index 4b71d9f4..b0d171f0 100644 --- a/boost-gradle/src/test/resources/test-jpa/testJPA21.gradle +++ b/boost-gradle/src/test/resources/test-jpa/testJPA21.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://repo.spring.io/plugins-snapshot' } } dependencies { - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") + classpath("boost:boost-gradle-plugin:$boostVersion") classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -31,15 +31,15 @@ targetCompatibility = 1.8 dependencyManagement { imports { - mavenBom "io.openliberty.boosters:ee7-bom:$boosterVersion" + mavenBom "boost.boosters:ee7-bom:$boosterVersion" } } dependencies { - compile "io.openliberty.boosters:jpa" - compile "io.openliberty.boosters:jaxrs" + compile "boost.boosters:jpa" + compile "boost.boosters:jaxrs" compile "javax.activation:javax.activation-api:1.2.0" compile "javax.xml.bind:jaxb-api:2.3.0" - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" + compile "$runtimeGroup:$runtimeArtifactId:$boosterVersion" } diff --git a/boost-gradle/src/test/resources/test-jpa/testJPA22.gradle b/boost-gradle/src/test/resources/test-jpa/testJPA22.gradle index a7ae12c6..98b9c56f 100644 --- a/boost-gradle/src/test/resources/test-jpa/testJPA22.gradle +++ b/boost-gradle/src/test/resources/test-jpa/testJPA22.gradle @@ -8,7 +8,7 @@ buildscript { maven { url 'https://repo.spring.io/plugins-snapshot' } } dependencies { - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") + classpath("boost:boost-gradle-plugin:$boostVersion") classpath 'io.spring.gradle:dependency-management-plugin:1.0.6.RELEASE' } } @@ -31,15 +31,15 @@ targetCompatibility = 1.8 dependencyManagement { imports { - mavenBom "io.openliberty.boosters:ee8-bom:$boosterVersion" + mavenBom "boost.boosters:ee8-bom:$boosterVersion" } } dependencies { - compile "io.openliberty.boosters:jpa" - compile "io.openliberty.boosters:jaxrs" + compile "boost.boosters:jpa" + compile "boost.boosters:jaxrs" compile "javax.activation:javax.activation-api:1.2.0" compile "javax.xml.bind:jaxb-api:2.3.0" - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" + compile "$runtimeGroup:$runtimeArtifactId:$boosterVersion" } diff --git a/boost-gradle/src/test/resources/test-spring-boot-ssl/build.gradle b/boost-gradle/src/test/resources/test-spring-boot-ssl/build.gradle deleted file mode 100644 index 127450bb..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot-ssl/build.gradle +++ /dev/null @@ -1,39 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - classpath("org.apache.httpcomponents:httpclient:4.5.6") - classpath("org.apache.httpcomponents:httpcore:4.4.10") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'test-spring-boot-ssl' - mainClassName = 'hello.Application' -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") - compile("org.apache.httpcomponents:httpclient:4.5.6") - compile("org.apache.httpcomponents:httpcore:4.4.10") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/Application.java b/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/Application.java deleted file mode 100644 index 5a129e46..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/Application.java +++ /dev/null @@ -1,33 +0,0 @@ -package hello; - -import java.util.Arrays; - -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; - -@SpringBootApplication -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } - - @Bean - public CommandLineRunner commandLineRunner(ApplicationContext ctx) { - return args -> { - - System.out.println("Let's inspect the beans provided by Spring Boot:"); - - String[] beanNames = ctx.getBeanDefinitionNames(); - Arrays.sort(beanNames); - for (String beanName : beanNames) { - System.out.println(beanName); - } - - }; - } - -} 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 deleted file mode 100644 index 8a85245c..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/java/hello/HelloController.java +++ /dev/null @@ -1,14 +0,0 @@ -package hello; - -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.bind.annotation.RequestMapping; - -@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/resources/application.properties b/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/resources/application.properties deleted file mode 100644 index 37199bfd..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/resources/application.properties +++ /dev/null @@ -1,4 +0,0 @@ -server.port = 8443 -server.ssl.key-store = classpath:sample.jks -server.ssl.key-store-password = secret -server.ssl.key-password = password diff --git a/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/resources/sample.jks b/boost-gradle/src/test/resources/test-spring-boot-ssl/src/main/resources/sample.jks deleted file mode 100755 index 6aa9a28053a591e41453e665e5024e8a8cb78b3d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2264 zcmchYX*3iJ7sqE|hQS!q5Mv)4GM2$i#uAFqC`%7x7baWA*i&dRX>3`uq(XS?3XSYp z%38`&ib7E$8j~$cF^}gt?|I+noW8#w?uYxk=iGD8|K9Vzd#pVc0002(2k@T|2@MMI zqxqr2AhQO*TVi`j@((S;e;g;l$#dAA{>vf0kX$R(Qn4oKgGEYjZ5zti2dw?Z6A zh%LuFCNI?9o+Z1duJL-++e#cjO`zlK?u9s030=k_*wD1#-$FbIDRDnA^vo@fm( zzjt(3VJrGOr0iHXSTM|rYN#>RZ@Dp`PwB2zrDQffLvuoR2~V3ReYa0&vU^dXd8isV zsAf*@!8s%xBvHLseXn6f?1kefe(8uAmAbaF$x{Ykzb6c6jdUwY1$y4tFzsj7 zIghr!T#ODfu@Po!a29@kXQ8kY#(LE<0o7?7PQ|eMeY@Equ?R-6*f@Na3o&stDQ=6( zQzDSQhCnS(9Bu9W_~giknP0vECqUsr4_9y_}nEU`cy z4}dApnAip92wMwgzciAFpc3i}+-#Zlq+iF7d1y}d4Qsp8=%l1N8NIs161I`HmkcpQ zY4*CUCFJJf(2!M{`&qQ}3($KeTQ=)mMrBs`DOb;%Of0tC)9he_p~w&CO#DfCgx(%s z{@|D(brX_Gb}ZDLmGej*JgEl0Et>q~kgTXuJg-PwvRjNx8sBbIShxD=xOySzw{;^X zAvrh5HTg>Xq@<{#^!Kg}B?qz@b<{ebD)yaSf&RChBIJQo-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-boot/docker15Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/docker15Test.gradle deleted file mode 100644 index 41300aa3..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/docker15Test.gradle +++ /dev/null @@ -1,46 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.19.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -jar { - baseName = 'test-docker15' -} - -bootRepackage { - mainClass = 'hello.Application' -} - -boost { - docker { - repository = 'localhost:5000/test-image15' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/docker20Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/docker20Test.gradle deleted file mode 100644 index 33f09157..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/docker20Test.gradle +++ /dev/null @@ -1,43 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'test-docker20' - mainClassName = 'hello.Application' -} - -boost { - docker { - repository = 'localhost:5000/test-image20' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/dockerClassifier15Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/dockerClassifier15Test.gradle deleted file mode 100644 index 25a790e3..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/dockerClassifier15Test.gradle +++ /dev/null @@ -1,45 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.19.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -jar { - baseName = 'test-docker15' -} - -bootRepackage { - mainClass = 'hello.Application' - classifier = 'test' -} - -boost { - docker {} -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/dockerClassifier20Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/dockerClassifier20Test.gradle deleted file mode 100644 index 286c8121..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/dockerClassifier20Test.gradle +++ /dev/null @@ -1,42 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'test-docker20' - classifier = 'test' - mainClassName = 'hello.Application' -} - -boost { - docker {} -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerClasspath15Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerClasspath15Test.gradle deleted file mode 100644 index 61d1eb43..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerClasspath15Test.gradle +++ /dev/null @@ -1,47 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.19.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -jar { - baseName = 'test-docker15' -} - -bootRepackage { - mainClass = 'hello.Application' -} - -boost { - docker { - repository = 'localhost:5000/test-classpath15' - dockerizer = 'classpath' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerClasspath20Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerClasspath20Test.gradle deleted file mode 100644 index 4808066f..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerClasspath20Test.gradle +++ /dev/null @@ -1,44 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'test-docker20' - mainClassName = 'hello.Application' -} - -boost { - docker { - repository = 'localhost:5000/test-classpath20' - dockerizer = 'classpath' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerJar15Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerJar15Test.gradle deleted file mode 100644 index bfff0cab..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerJar15Test.gradle +++ /dev/null @@ -1,47 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.19.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -jar { - baseName = 'test-docker15' -} - -bootRepackage { - mainClass = 'hello.Application' -} - -boost { - docker { - repository = 'localhost:5000/test-jar15' - dockerizer = 'jar' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerJar20Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerJar20Test.gradle deleted file mode 100644 index e3329236..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/dockerDockerizerJar20Test.gradle +++ /dev/null @@ -1,44 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'test-docker20' - mainClassName = 'hello.Application' -} - -boost { - docker { - repository = 'localhost:5000/test-jar20' - dockerizer = 'jar' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/dockerEmpty15Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/dockerEmpty15Test.gradle deleted file mode 100644 index 4bda518c..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/dockerEmpty15Test.gradle +++ /dev/null @@ -1,44 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.19.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -jar { - baseName = 'test-docker15' -} - -bootRepackage { - mainClass = 'hello.Application' -} - -boost { - docker {} -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} \ No newline at end of file diff --git a/boost-gradle/src/test/resources/test-spring-boot/dockerEmpty20Test.gradle b/boost-gradle/src/test/resources/test-spring-boot/dockerEmpty20Test.gradle deleted file mode 100644 index cd9a82f9..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/dockerEmpty20Test.gradle +++ /dev/null @@ -1,41 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'test-docker20' - mainClassName = 'hello.Application' -} - -boost { - docker {} -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/packageExtensionTest.gradle b/boost-gradle/src/test/resources/test-spring-boot/packageExtensionTest.gradle deleted file mode 100644 index df743154..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/packageExtensionTest.gradle +++ /dev/null @@ -1,46 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'gs-spring-boot' - version = '0.1.0' - mainClassName = 'hello.Application' -} - -boost { - packaging { - packageName = 'extensionTest' - } -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") - - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/springApp-15.gradle b/boost-gradle/src/test/resources/test-spring-boot/springApp-15.gradle deleted file mode 100644 index e58ee879..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/springApp-15.gradle +++ /dev/null @@ -1,42 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.19.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -jar { - baseName = 'test-spring15' -} - -bootRepackage { - mainClass = 'hello.Application' -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") - - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/springApp-20.gradle b/boost-gradle/src/test/resources/test-spring-boot/springApp-20.gradle deleted file mode 100644 index c5db9cb9..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/springApp-20.gradle +++ /dev/null @@ -1,40 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'gs-spring-boot' - version = '0.1.0' - mainClassName = 'hello.Application' -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") - - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/springAppClassifier-15.gradle b/boost-gradle/src/test/resources/test-spring-boot/springAppClassifier-15.gradle deleted file mode 100644 index 8130b55c..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/springAppClassifier-15.gradle +++ /dev/null @@ -1,39 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:1.5.19.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootRepackage { - mainClass = 'hello.Application' - classifier = 'test' -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") - - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/springAppClassifier-20.gradle b/boost-gradle/src/test/resources/test-spring-boot/springAppClassifier-20.gradle deleted file mode 100644 index 1854fba2..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/springAppClassifier-20.gradle +++ /dev/null @@ -1,41 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'java' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootJar { - baseName = 'gs-spring-boot' - version = '0.1.0' - mainClassName = 'hello.Application' - classifier = 'test' -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") - - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/springWarApp-20.gradle b/boost-gradle/src/test/resources/test-spring-boot/springWarApp-20.gradle deleted file mode 100644 index c14fe02f..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/springWarApp-20.gradle +++ /dev/null @@ -1,40 +0,0 @@ -buildscript { - repositories { - mavenCentral() - mavenLocal() - maven { - url 'https://oss.sonatype.org/content/repositories/snapshots/' - } - } - dependencies { - classpath("org.springframework.boot:spring-boot-gradle-plugin:2.0.4.RELEASE") - classpath("io.openliberty.boost:boost-gradle-plugin:$boostVersion") - } -} - -apply plugin: 'war' -apply plugin: 'boost' -apply plugin: 'eclipse' -apply plugin: 'idea' -apply plugin: 'org.springframework.boot' -apply plugin: 'io.spring.dependency-management' - -bootWar { - baseName = 'gs-spring-boot' - version = '0.1.0' - mainClassName = 'hello.Application' -} - -repositories { - mavenCentral() - mavenLocal() -} - -sourceCompatibility = 1.8 -targetCompatibility = 1.8 - -dependencies { - compile("org.springframework.boot:spring-boot-starter-web") - - libertyRuntime "$runtimeGroup:$runtimeArtifactId:$runtimeVersion" -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/src/main/java/hello/Application.java b/boost-gradle/src/test/resources/test-spring-boot/src/main/java/hello/Application.java deleted file mode 100644 index 5a129e46..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/src/main/java/hello/Application.java +++ /dev/null @@ -1,33 +0,0 @@ -package hello; - -import java.util.Arrays; - -import org.springframework.boot.CommandLineRunner; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.ApplicationContext; -import org.springframework.context.annotation.Bean; - -@SpringBootApplication -public class Application { - - public static void main(String[] args) { - SpringApplication.run(Application.class, args); - } - - @Bean - public CommandLineRunner commandLineRunner(ApplicationContext ctx) { - return args -> { - - System.out.println("Let's inspect the beans provided by Spring Boot:"); - - String[] beanNames = ctx.getBeanDefinitionNames(); - Arrays.sort(beanNames); - for (String beanName : beanNames) { - System.out.println(beanName); - } - - }; - } - -} diff --git a/boost-gradle/src/test/resources/test-spring-boot/src/main/java/hello/HelloController.java b/boost-gradle/src/test/resources/test-spring-boot/src/main/java/hello/HelloController.java deleted file mode 100644 index 8a85245c..00000000 --- a/boost-gradle/src/test/resources/test-spring-boot/src/main/java/hello/HelloController.java +++ /dev/null @@ -1,14 +0,0 @@ -package hello; - -import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.bind.annotation.RequestMapping; - -@RestController -public class HelloController { - - @RequestMapping("/") - public String index() { - return "Greetings from Spring Boot!"; - } - -} From d2bad1e563df21151da561b30dc0aa41d4e19bbc Mon Sep 17 00:00:00 2001 From: mattbsox Date: Wed, 14 Aug 2019 13:32:33 -0500 Subject: [PATCH 03/10] Creating runtime-liberty project for OL and WLP runtimes and common files --- .../boost-runtimes/runtime-liberty/pom.xml | 23 +++++ .../runtime-liberty-common/pom.xml | 27 ++++++ .../runtime-openliberty/pom.xml | 93 +++++++++++++++++++ .../runtimes/openliberty/LibertyRuntime.java | 0 .../LibertyServerConfigGenerator.java | 0 .../openliberty/boosters/LibertyBoosterI.java | 0 .../boosters/LibertyCDIBoosterConfig.java | 0 .../boosters/LibertyJAXRSBoosterConfig.java | 0 .../boosters/LibertyJDBCBoosterConfig.java | 0 .../boosters/LibertyJPABoosterConfig.java | 0 .../boosters/LibertyJSONBBoosterConfig.java | 0 .../boosters/LibertyJSONPBoosterConfig.java | 0 .../LibertyMPConfigBoosterConfig.java | 0 .../LibertyMPFaultToleranceBoosterConfig.java | 0 .../LibertyMPHealthBoosterConfig.java | 0 .../LibertyMPMetricsBoosterConfig.java | 0 .../LibertyMPOpenAPIBoosterConfig.java | 0 .../LibertyMPOpenTracingBoosterConfig.java | 0 .../LibertyMPRestClientBoosterConfig.java | 0 .../services/boost.common.runtimes.RuntimeI | 0 .../runtimes/boosters/CDIBoosterTest.java | 0 .../runtimes/boosters/JAXRSBoosterTest.java | 0 .../runtimes/boosters/JDBCBoosterTest.java | 0 .../runtimes/boosters/JSONBBoosterTest.java | 0 .../runtimes/boosters/JSONPBoosterTest.java | 0 .../boosters/MPConfigBoosterTest.java | 0 .../boosters/MPFaultToleranceBoosterTest.java | 0 .../boosters/MPHealthBoosterTest.java | 0 .../boosters/MPMetricsBoosterTest.java | 0 .../boosters/MPOpenAPIBoosterTest.java | 0 .../boosters/MPOpenTracingBoosterTest.java | 0 .../boosters/MPRestClientBoosterTest.java | 0 .../LibertyServerConfigGeneratorTest.java | 0 .../boost/runtimes/utils/BoosterUtil.java | 0 .../boost/runtimes/utils/CommonLogger.java | 0 .../boost/runtimes/utils/ConfigFileUtils.java | 0 .../boost/runtimes/utils/DOMUtils.java | 0 .../runtime-openliberty/pom.xml | 93 ------------------- 38 files changed, 143 insertions(+), 93 deletions(-) create mode 100644 boost-maven/boost-runtimes/runtime-liberty/pom.xml create mode 100644 boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/pom.xml create mode 100644 boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJAXRSBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONBBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPFaultToleranceBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPMetricsBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenAPIBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java (100%) rename boost-maven/boost-runtimes/{ => runtime-liberty}/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java (100%) delete mode 100644 boost-maven/boost-runtimes/runtime-openliberty/pom.xml diff --git a/boost-maven/boost-runtimes/runtime-liberty/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/pom.xml new file mode 100644 index 00000000..29fac0eb --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/pom.xml @@ -0,0 +1,23 @@ + + + 4.0.0 + + + boost + boost-runtimes + 0.1-SNAPSHOT + + + runtime-liberty + pom + + + runtime-openliberty + + + + + + diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/pom.xml new file mode 100644 index 00000000..88770638 --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/pom.xml @@ -0,0 +1,27 @@ + + + 4.0.0 + + boost.runtimes + liberty-common + 0.1-SNAPSHOT + jar + + + UTF-8 + UTF-8 + 1.8 + 1.8 + + + + + boost + boost-common + 0.1.3-SNAPSHOT + + + + \ No newline at end of file diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml new file mode 100644 index 00000000..f5387cea --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml @@ -0,0 +1,93 @@ + + + 4.0.0 + + boost.runtimes + openliberty + 0.1-SNAPSHOT + jar + + + UTF-8 + UTF-8 + 1.8 + 1.8 + + + + + boost + boost-common + 0.1.3-SNAPSHOT + + + boost + boost-maven-plugin + 0.1.3-SNAPSHOT + + + net.wasdev.wlp.maven.plugins + liberty-maven-plugin + 2.6.3 + + + org.apache.maven + maven-plugin-api + 2.0 + + + org.apache.maven.plugin-tools + maven-plugin-annotations + 3.4 + provided + + + org.twdata.maven + mojo-executor + 2.3.0 + + + com.spotify + docker-client + 8.11.7 + + + org.eclipse.aether + aether-api + 0.9.0.M2 + + + junit + junit + 4.12 + test + + + com.github.stefanbirkner + system-rules + 1.16.0 + test + + org.codehaus.mojo + plugin-support + 1.0-alpha-1 + + + org.apache.maven + maven-project + + + org.apache.maven + maven-artifact + + + org.apache.maven + maven-plugin-api + + + + + + diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJAXRSBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJAXRSBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJAXRSBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJAXRSBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONBBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONBBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONBBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONBBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPFaultToleranceBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPFaultToleranceBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPFaultToleranceBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPFaultToleranceBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPMetricsBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPMetricsBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPMetricsBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPMetricsBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenAPIBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenAPIBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenAPIBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenAPIBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java diff --git a/boost-maven/boost-runtimes/runtime-openliberty/pom.xml b/boost-maven/boost-runtimes/runtime-openliberty/pom.xml deleted file mode 100644 index 49a52b33..00000000 --- a/boost-maven/boost-runtimes/runtime-openliberty/pom.xml +++ /dev/null @@ -1,93 +0,0 @@ - - - 4.0.0 - - boost.runtimes - openliberty - 1.0-M1-SNAPSHOT - jar - - - UTF-8 - UTF-8 - 1.8 - 1.8 - - - - - boost - boost-common - 0.1.3-SNAPSHOT - - - boost - boost-maven-plugin - 0.1.3-SNAPSHOT - - - net.wasdev.wlp.maven.plugins - liberty-maven-plugin - 2.6.3 - - - org.apache.maven - maven-plugin-api - 2.0 - - - org.apache.maven.plugin-tools - maven-plugin-annotations - 3.4 - provided - - - org.twdata.maven - mojo-executor - 2.3.0 - - - com.spotify - docker-client - 8.11.7 - - - org.eclipse.aether - aether-api - 0.9.0.M2 - - - junit - junit - 4.12 - test - - - com.github.stefanbirkner - system-rules - 1.16.0 - test - - - org.codehaus.mojo - plugin-support - 1.0-alpha-1 - - - org.apache.maven - maven-project - - - org.apache.maven - maven-artifact - - - org.apache.maven - maven-plugin-api - - - - - - From cacb1789bdf43aa81eeaa3d23a9a50a7c0e8a341 Mon Sep 17 00:00:00 2001 From: mattbsox Date: Wed, 14 Aug 2019 14:14:12 -0500 Subject: [PATCH 04/10] Moving LibertyBoosters and LibertyServerConfigGenerator to common runtime library --- boost-maven/boost-runtimes/pom.xml | 2 +- boost-maven/boost-runtimes/runtime-liberty/pom.xml | 3 ++- .../runtimes/liberty}/LibertyServerConfigGenerator.java | 0 .../boost/runtimes/liberty}/boosters/LibertyBoosterI.java | 0 .../runtimes/liberty}/boosters/LibertyCDIBoosterConfig.java | 0 .../liberty}/boosters/LibertyJAXRSBoosterConfig.java | 0 .../liberty}/boosters/LibertyJDBCBoosterConfig.java | 0 .../runtimes/liberty}/boosters/LibertyJPABoosterConfig.java | 0 .../liberty}/boosters/LibertyJSONBBoosterConfig.java | 0 .../liberty}/boosters/LibertyJSONPBoosterConfig.java | 0 .../liberty}/boosters/LibertyMPConfigBoosterConfig.java | 0 .../boosters/LibertyMPFaultToleranceBoosterConfig.java | 0 .../liberty}/boosters/LibertyMPHealthBoosterConfig.java | 0 .../liberty}/boosters/LibertyMPMetricsBoosterConfig.java | 0 .../liberty}/boosters/LibertyMPOpenAPIBoosterConfig.java | 0 .../boosters/LibertyMPOpenTracingBoosterConfig.java | 0 .../liberty}/boosters/LibertyMPRestClientBoosterConfig.java | 0 .../runtime-liberty/runtime-openliberty/pom.xml | 6 ++++++ 18 files changed, 9 insertions(+), 2 deletions(-) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/LibertyServerConfigGenerator.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyBoosterI.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyCDIBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyJAXRSBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyJDBCBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyJPABoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyJSONBBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyJSONPBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyMPConfigBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyMPFaultToleranceBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyMPHealthBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyMPMetricsBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyMPOpenAPIBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyMPOpenTracingBoosterConfig.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/boosters/LibertyMPRestClientBoosterConfig.java (100%) diff --git a/boost-maven/boost-runtimes/pom.xml b/boost-maven/boost-runtimes/pom.xml index 4a475322..37556cc0 100644 --- a/boost-maven/boost-runtimes/pom.xml +++ b/boost-maven/boost-runtimes/pom.xml @@ -13,7 +13,7 @@ pom - runtime-openliberty + runtime-liberty diff --git a/boost-maven/boost-runtimes/runtime-liberty/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/pom.xml index 29fac0eb..c4b4fc12 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/pom.xml +++ b/boost-maven/boost-runtimes/runtime-liberty/pom.xml @@ -6,13 +6,14 @@ boost boost-runtimes - 0.1-SNAPSHOT + 0.1.3-SNAPSHOT runtime-liberty pom + runtime-liberty-common runtime-openliberty - + runtime-tomee diff --git a/boost-maven/boost-runtimes/runtime-liberty/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/pom.xml index c4b4fc12..6ccdc8c1 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/pom.xml +++ b/boost-maven/boost-runtimes/runtime-liberty/pom.xml @@ -15,6 +15,7 @@ runtime-liberty-common runtime-openliberty + diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/build.gradle b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/build.gradle new file mode 100644 index 00000000..4f6a1b09 --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/build.gradle @@ -0,0 +1,30 @@ +apply plugin: 'java' +apply plugin: 'maven' + +repositories { + mavenLocal() + mavenCentral() +} + +dependencies { + compile "boost:boost-common:0.1.3-SNAPSHOT" + compile "boost:boost-gradle-plugin:0.1.1-SNAPSHOT" + compile "commons-io:commons-io:2.6" + compile gradleApi() +} + +group = 'boost.runtimes' +archivesBaseName = 'openliberty-gradle' +version = '0.1.3-SNAPSHOT' + +dependencies { + compile group: 'org.codehaus.plexus', name: 'plexus-utils', version: '1.5.7' + compile 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.6-SNAPSHOT' + compile localGroovy() +} + +jar { + from ('./src/main/resources') { + include 'META-INF/services/boost.common.runtimes.GradleRuntimeI' + } +} \ No newline at end of file diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/pom.xml new file mode 100644 index 00000000..d961961b --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/pom.xml @@ -0,0 +1,91 @@ + + + 4.0.0 + + boost.runtimes + openliberty-gradle + 0.1-SNAPSHOT + jar + + + UTF-8 + UTF-8 + 1.8 + 1.8 + + + + + Gradle Releases + https://repo.gradle.org/gradle/libs-releases-local/ + + + + + + boost + boost-common + 0.1.3-SNAPSHOT + + + boost + boost-gradle-plugin + 0.1.1-SNAPSHOT + + + net.wasdev.wlp.gradle.plugins + liberty-gradle-plugin + 2.6.6-SNAPSHOT + + + org.gradle + gradle-core + 5.1.1 + + + org.gradle + gradle-model-core + 5.1.1 + + + org.gradle + gradle-tooling-api + 5.1.1 + + + org.gradle + gradle-base-services + 5.1.1 + + + commons-io + commons-io + 2.6 + + + org.codehaus.groovy + groovy + 2.5.8 + + + org.codehaus.plexus + plexus-utils + 1.5.7 + + + junit + junit + 4.12 + test + + + com.github.stefanbirkner + system-rules + 1.16.0 + test + + + + diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java new file mode 100644 index 00000000..3cf2fbde --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java @@ -0,0 +1,293 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty; + +import java.io.BufferedReader; +import java.io.File; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.lang.reflect.Array; +import java.lang.reflect.Field; +import java.util.Arrays; +import java.util.ArrayList; +import java.util.List; +import java.util.Properties; + +import org.apache.commons.io.FileUtils; + +import org.codehaus.plexus.util.xml.Xpp3Dom; + +import org.gradle.api.Action; +import org.gradle.api.GradleException; +import org.gradle.api.Project; +import org.gradle.api.artifacts.Configuration; +import org.gradle.api.plugins.WarPlugin; +import org.gradle.api.tasks.bundling.War; + +import groovy.lang.Closure; + +import boost.common.BoostException; +import boost.common.boosters.AbstractBoosterConfig; +import boost.common.config.BoostProperties; +import boost.common.config.BoosterConfigurator; +import boost.common.config.ConfigConstants; +import boost.gradle.runtimes.GradleRuntimeI; +import boost.gradle.utils.BoostLogger; +import boost.gradle.utils.GradleProjectUtil; +import boost.runtimes.openliberty.boosters.LibertyBoosterI; + +import net.wasdev.wlp.gradle.plugins.extensions.LibertyExtension; + +public class LibertyGradleRuntime implements GradleRuntimeI { + + private final String serverName = "BoostServer"; + private final String OPEN_LIBERTY_VERSION = "19.0.0.3"; + + private String projectBuildDir; + private String libertyServerPath; + + public LibertyGradleRuntime() {} + + public void configureRuntimePlugin(Project project) throws GradleException { + project.getPluginManager().apply("net.wasdev.wlp.gradle.plugins.Liberty"); + + project.getTasks().getByName("libertyPackage").dependsOn("installApps", "installFeature"); + project.getTasks().getByName("installApps").mustRunAfter("installFeature"); + + project.getDependencies().add("libertyRuntime", "io.openliberty:openliberty-runtime:" + OPEN_LIBERTY_VERSION); + //The rest of this method is used to set the server name in the ServerExtension. + + //Creating a closure to call on the ServerExtension in the LibertyExtension + //Other properties aside from the server name can be configured here as well + Closure serverClosure = new Closure(this) { + @Override + public Object call() { + try { + Field nameField = getDelegate().getClass().getDeclaredField("name"); + nameField.setAccessible(true); + nameField.set(getDelegate(), serverName); + } catch (Exception e) { + throw new GradleException("Error configuring Liberty Gradle Plugin.", e); + } + + return this.getDelegate(); + } + }; + //Configuring the LibertyExtension's server ServerExtension + project.getExtensions().configure("liberty", new Action() { + @Override + public void execute(LibertyExtension liberty) { + liberty.server(serverClosure); + } + }); + + this.projectBuildDir = project.getBuildDir().toString(); + this.libertyServerPath = projectBuildDir + "/wlp/usr/servers/" + serverName; + } + + public void doPackage(List boosterConfigs, Object project, Object pluginTask) throws BoostException { + Project gradleProject = (Project)project; + System.setProperty(BoostProperties.INTERNAL_COMPILER_TARGET, gradleProject.findProperty("targetCompatibility").toString()); + try { + packageLiberty(boosterConfigs, gradleProject); + } catch (GradleException e) { + throw new BoostException("Error packaging Liberty server", e); + } + } + + private void packageLiberty(List boosterConfigs, Project project) throws BoostException { + try { + runTask("installLiberty", project); + runTask("libertyCreate", project); + + // targeting a liberty install + copyBoosterDependencies(boosterConfigs, project); + + generateServerConfig(boosterConfigs, project); + + installMissingFeatures(project); + + // Create the Liberty runnable jar + createUberJar(project); + } catch(Exception e) { + throw new BoostException("Error packaging Liberty server", e); + } + + } + + /** + * Get all booster dependencies and copy them to the Liberty server. + * + * @throws GradleException + * + */ + private void copyBoosterDependencies(List boosterConfigs, Project project) throws IOException { + List dependenciesToCopy = BoosterConfigurator.getDependenciesToCopy(boosterConfigs, + BoostLogger.getInstance()); + + project.getConfigurations().maybeCreate("boosterDependencies"); + for (String dep : dependenciesToCopy) { + project.getDependencies().add("boosterDependencies", dep); + } + + File resouresDir = new File(libertyServerPath, "resources"); + + for (File dep : project.getConfigurations().getByName("boosterDependencies").resolve()) { + FileUtils.copyFileToDirectory(dep, resouresDir); + } + } + + /** + * Generate config for the Liberty server based on the Gradle project. + * + * @throws GradleException + */ + private void generateServerConfig(List boosterConfigs, Project project) throws GradleException { + + try { + // Generate server config + generateLibertyServerConfig(boosterConfigs, project); + + } catch (Exception e) { + throw new GradleException("Unable to generate server configuration for the Liberty server.", e); + } + } + + private List getWarNames(Project project) { + String warName = null; + + if (project.getPlugins().hasPlugin("war")) { + WarPlugin warPlugin = (WarPlugin)(project.getPlugins().findPlugin("war")); + War warTask = (War)(project.getTasks().findByPath(warPlugin.WAR_TASK_NAME)); + warName = warTask.getArchiveFileName().get().substring(0, warTask.getArchiveFileName().get().length() - 4); + } + + return Arrays.asList(warName); + } + + /** + * Configure the Liberty runtime + * + * @param boosterConfigurators + * @throws Exception + */ + private void generateLibertyServerConfig(List boosterConfigurators, Project project) throws Exception { + + List warNames = getWarNames(project); + LibertyServerConfigGenerator libertyConfig = new LibertyServerConfigGenerator(libertyServerPath, + BoostLogger.getInstance()); + + // Add default http endpoint configuration + Properties boostConfigProperties = BoostProperties.getConfiguredBoostProperties(BoostLogger.getInstance()); + + String host = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HOST, "*"); + libertyConfig.addHostname(host); + + String httpPort = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HTTP_PORT, "9080"); + libertyConfig.addHttpPort(httpPort); + + String httpsPort = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HTTPS_PORT, "9443"); + libertyConfig.addHttpsPort(httpsPort); + + // Add war configuration if necessary + if (!warNames.isEmpty()) { + for (String warName : warNames) { + libertyConfig.addApplication(warName); + } + } else { + throw new Exception( + "No war files were found. The project must have a war packaging type or specify war dependencies."); + } + + // Loop through configuration objects and add config and + // the corresponding Liberty feature + for (AbstractBoosterConfig configurator : boosterConfigurators) { + if (configurator instanceof LibertyBoosterI) { + ((LibertyBoosterI) configurator).addServerConfig(libertyConfig); + libertyConfig.addFeature(((LibertyBoosterI) configurator).getFeature()); + } + } + + libertyConfig.writeToServer(); + } + + //Liberty Gradle Plugin Execution + + /** + * Invoke the liberty-gradle-plugin to run the install-feature goal. + * + * This will install any missing features defined in the server.xml or + * configDropins. + * + */ + private void installMissingFeatures(Project project) throws GradleException { + runTask("installFeature", project); + } + + /** + * Invoke the liberty-gradle-plugin to package the server into a runnable Liberty + * JAR + */ + private void createUberJar(Project project) throws BoostException { + try { + runTask("libertyPackage", project); + } catch (GradleException e) { + throw new BoostException("Error creating Liberty uber jar", e); + } + } + + public void doDebug(Object project, Object pluginTask) throws BoostException { + try { + runTask("libertyDebug", (Project)project); + } catch (GradleException e) { + throw new BoostException("Error debugging Liberty server", e); + } + } + + public void doRun(Object project, Object pluginTask) throws BoostException { + try { + runTask("LibertyRun", (Project)project); + } catch (GradleException e) { + throw new BoostException("Error running Liberty server", e); + } + } + + public void doStart(Object project, Object pluginTask) throws BoostException { + try { + runTask("libertyStart", (Project)project); + } catch (GradleException e) { + throw new BoostException("Error starting Liberty server", e); + } + } + + public void doStop(Object project, Object pluginTask) throws BoostException { + try { + runTask("libertyStop", (Project)project); + } catch (GradleException e) { + throw new BoostException("Error stopping Liberty server", e); + } + } + + private void runTask(String taskName, Project project) throws GradleException { + //String command = project.getProjectDir().toString() + "/gradlew"; + try { + ProcessBuilder pb = new ProcessBuilder("gradle", taskName, "-i", "-s"); + System.out.println("Executing task " + pb.command().get(1)); + pb.directory(project.getProjectDir()); + Process p = pb.start(); + p.waitFor(); + } catch (IOException | InterruptedException e) { + throw new GradleException("Unable to execute the " + taskName + " task.", e); + } + } + +} diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI new file mode 100644 index 00000000..f4bcc36b --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI @@ -0,0 +1 @@ +boost.runtimes.openliberty.LibertyGradleRuntime \ No newline at end of file diff --git a/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java b/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java index c815290b..eb5d8cd5 100644 --- a/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java +++ b/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java @@ -25,6 +25,7 @@ import org.apache.maven.model.Plugin; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.project.MavenProject; import org.twdata.maven.mojoexecutor.MojoExecutor.ExecutionEnvironment; import boost.common.BoostException; @@ -32,45 +33,42 @@ import boost.common.config.BoostProperties; import boost.common.config.BoosterConfigurator; import boost.common.runtimes.RuntimeI; -import boost.maven.runtimes.RuntimeParams; +import boost.maven.plugin.AbstractMojo; import boost.maven.utils.BoostLogger; public class TomeeRuntime implements RuntimeI { - private final List boosterConfigs; - private final ExecutionEnvironment env; - private final String tomeeMavenPluginGroupId = "org.apache.tomee.maven"; private final String tomeeMavenPluginArtifactId = "tomee-maven-plugin"; - private final String installDir; - private final String configDir; - private final Plugin mavenDepPlugin; + private final String mavenDependencyPluginGroupId = "org.apache.maven.plugins"; + private final String mavenDependencyPluginArtifactId = "maven-dependency-plugin"; - public TomeeRuntime() { - this.boosterConfigs = null; - this.env = null; + private String installDir; + private String configDir; - this.installDir = null; - this.configDir = null; + private MavenProject project; + private ExecutionEnvironment env; - this.mavenDepPlugin = null; - } + public TomeeRuntime() {} - public TomeeRuntime(RuntimeParams params) { - this.boosterConfigs = params.getBoosterConfigs(); - this.env = params.getEnv(); + public ExecutionEnvironment getExecutionEnvironment() { + return env; + } - this.installDir = params.getProjectBuildDir() + "/apache-tomee/"; - this.configDir = installDir + "conf"; - this.mavenDepPlugin = params.getMavenDepPlugin(); + private Plugin getMavenDependencyPlugin() throws MojoExecutionException { + return plugin(groupId(mavenDependencyPluginGroupId), artifactId(mavenDependencyPluginArtifactId)); } private Plugin getPlugin() throws MojoExecutionException { return plugin(groupId(tomeeMavenPluginGroupId), artifactId(tomeeMavenPluginArtifactId), version("8.0.0-M2")); } - public void doPackage() throws BoostException { + public void doPackage(List boosterConfigs, Object mavenProject, Object pluginTask) throws BoostException { try { + project = (MavenProject)mavenProject; + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); + this.installDir = project.getBuild().getDirectory() + "/apache-tomee/"; + this.configDir = installDir + "conf"; createTomeeServer(); configureTomeeServer(boosterConfigs); copyTomeeJarDependencies(boosterConfigs); @@ -85,7 +83,7 @@ public void doPackage() throws BoostException { */ private void createTomeeServer() throws MojoExecutionException { executeMojo(getPlugin(), goal("build"), configuration(element(name("context"), "ROOT"), - element(name("tomeeVersion"), "8.0.0-M2"), element(name("tomeeClassifier"), "plus")), env); + element(name("tomeeVersion"), "8.0.0-M2"), element(name("tomeeClassifier"), "plus")), getExecutionEnvironment()); } /** @@ -128,13 +126,13 @@ private void copyTomeeJarDependencies(List boosterConfigs for (String dep : tomeeDependencyJarsToCopy) { String[] dependencyInfo = dep.split(":"); - executeMojo(mavenDepPlugin, goal("copy"), + executeMojo(getMavenDependencyPlugin(), goal("copy"), configuration(element(name("outputDirectory"), installDir + "boost"), element(name("artifactItems"), element(name("artifactItem"), element(name("groupId"), dependencyInfo[0]), element(name("artifactId"), dependencyInfo[1]), element(name("version"), dependencyInfo[2])))), - env); + getExecutionEnvironment()); } } @@ -147,41 +145,44 @@ private void createUberJar() throws MojoExecutionException { element(name("classpaths"), "[]"), element(name("context"), "ROOT"), element(name("tomeeVersion"), "8.0.0-M2"), element(name("tomeeClassifier"), "plus"), element(name("catalinaBase"), installDir), element(name("config"), configDir)), - env); + getExecutionEnvironment()); } - public void doDebug(boolean clean) throws BoostException { + public void doDebug(Object mavenProject, Object pluginTask) throws BoostException { // TODO No debug in TomEE yet } - public void doRun(boolean clean) throws BoostException { + public void doRun(Object mavenProject, Object pluginTask) throws BoostException { try { + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); executeMojo(getPlugin(), goal("run"), configuration(element(name("tomeeAlreadyInstalled"), "true"), element(name("context"), "ROOT"), element(name("tomeeVersion"), "8.0.0-M2"), element(name("tomeeClassifier"), "plus")), - env); + getExecutionEnvironment()); } catch (MojoExecutionException e) { throw new BoostException("Error running TomEE server", e); } } - public void doStart(boolean clean, int verifyTimeout, int serverStartTimeout) throws BoostException { + public void doStart(Object mavenProject, Object pluginTask) throws BoostException { try { + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); executeMojo(getPlugin(), goal("start"), configuration(element(name("tomeeAlreadyInstalled"), "true"), element(name("context"), "ROOT"), element(name("tomeeVersion"), "8.0.0-M2"), element(name("tomeeClassifier"), "plus")), - env); + getExecutionEnvironment()); } catch (MojoExecutionException e) { throw new BoostException("Error starting TomEE server", e); } } - public void doStop() throws BoostException { + public void doStop(Object mavenProject, Object pluginTask) throws BoostException { try { + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); executeMojo(getPlugin(), goal("stop"), configuration(element(name("tomeeAlreadyInstalled"), "true"), element(name("context"), "ROOT"), element(name("tomeeVersion"), "8.0.0-M2"), element(name("tomeeClassifier"), "plus")), - env); + getExecutionEnvironment()); } catch (MojoExecutionException e) { throw new BoostException("Error stopping TomEE server", e); } From 097fe704ec75191e86e7609ba32791a7e5d72142 Mon Sep 17 00:00:00 2001 From: mattbsox Date: Mon, 19 Aug 2019 16:00:23 -0500 Subject: [PATCH 06/10] Adding debug logic to TomEE --- .../src/main/java/boost/runtimes/tomee/TomeeRuntime.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java b/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java index eb5d8cd5..b60bfd3c 100644 --- a/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java +++ b/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java @@ -149,7 +149,14 @@ private void createUberJar() throws MojoExecutionException { } public void doDebug(Object mavenProject, Object pluginTask) throws BoostException { - // TODO No debug in TomEE yet + try { + executeMojo(getPlugin(), goal("debug"), + configuration(element(name("tomeeAlreadyInstalled"), "true"), element(name("context"), "ROOT"), + element(name("tomeeVersion"), "8.0.0-M2"), element(name("tomeeClassifier"), "plus")), + getExecutionEnvironment()); + } catch (MojoExecutionException e) { + throw new BoostException("Error running TomEE server in debug", e); + } } public void doRun(Object mavenProject, Object pluginTask) throws BoostException { From b8abeb802bba153a1a32c9c18f08d792f5a4f8d0 Mon Sep 17 00:00:00 2001 From: mattbsox Date: Tue, 20 Aug 2019 11:36:17 -0500 Subject: [PATCH 07/10] Moving booster tests, creating a common Liberty runtime, adding wlp runtime --- .../boost-boms/booster-runtimes-bom/pom.xml | 8 ++- boost-maven/boost-runtimes/pom.xml | 1 - .../boost-runtimes/runtime-liberty/pom.xml | 6 +- .../runtime-liberty-common/pom.xml | 69 +++++++++++++++++- .../runtimes/liberty}/LibertyRuntime.java | 14 ++-- .../runtimes/boosters/CDIBoosterTest.java | 0 .../runtimes/boosters/JAXRSBoosterTest.java | 0 .../runtimes/boosters/JDBCBoosterTest.java | 0 .../runtimes/boosters/JSONBBoosterTest.java | 0 .../runtimes/boosters/JSONPBoosterTest.java | 0 .../boosters/MPConfigBoosterTest.java | 0 .../boosters/MPFaultToleranceBoosterTest.java | 0 .../boosters/MPHealthBoosterTest.java | 0 .../boosters/MPMetricsBoosterTest.java | 0 .../boosters/MPOpenAPIBoosterTest.java | 0 .../boosters/MPOpenTracingBoosterTest.java | 0 .../boosters/MPRestClientBoosterTest.java | 0 .../LibertyServerConfigGeneratorTest.java | 0 .../boost/runtimes/utils/BoosterUtil.java | 0 .../boost/runtimes/utils/CommonLogger.java | 0 .../boost/runtimes/utils/ConfigFileUtils.java | 0 .../boost/runtimes/utils/DOMUtils.java | 0 .../runtime-openliberty/pom.xml | 72 ------------------- .../openliberty/OpenLibertyRuntime.java | 19 +++++ .../services/boost.common.runtimes.RuntimeI | 2 +- .../runtime-liberty/runtime-wlp/pom.xml | 25 +++++++ .../runtimes/openliberty/WLPRuntime.java | 19 +++++ .../services/boost.common.runtimes.RuntimeI | 1 + 28 files changed, 149 insertions(+), 87 deletions(-) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty/src/main/java/boost/runtimes/openliberty => runtime-liberty-common/src/main/java/boost/runtimes/liberty}/LibertyRuntime.java (96%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java (100%) rename boost-maven/boost-runtimes/runtime-liberty/{runtime-openliberty => runtime-liberty-common}/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java (100%) create mode 100644 boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/OpenLibertyRuntime.java create mode 100644 boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/pom.xml create mode 100644 boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/src/main/java/boost/runtimes/openliberty/WLPRuntime.java create mode 100644 boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI diff --git a/boost-maven/boost-boms/booster-runtimes-bom/pom.xml b/boost-maven/boost-boms/booster-runtimes-bom/pom.xml index d8f86067..5734e859 100644 --- a/boost-maven/boost-boms/booster-runtimes-bom/pom.xml +++ b/boost-maven/boost-boms/booster-runtimes-bom/pom.xml @@ -28,8 +28,12 @@ openliberty 1.0-M1-SNAPSHOT - + + boost.runtimes + wlp + 0.1-SNAPSHOT + provided + boost.runtimes tomee diff --git a/boost-maven/boost-runtimes/pom.xml b/boost-maven/boost-runtimes/pom.xml index 6f1a2a0a..7b74c6f7 100644 --- a/boost-maven/boost-runtimes/pom.xml +++ b/boost-maven/boost-runtimes/pom.xml @@ -14,7 +14,6 @@ runtime-liberty - runtime-tomee diff --git a/boost-maven/boost-runtimes/runtime-liberty/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/pom.xml index 6ccdc8c1..df5d890f 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/pom.xml +++ b/boost-maven/boost-runtimes/runtime-liberty/pom.xml @@ -15,11 +15,7 @@ runtime-liberty-common runtime-openliberty - - - - + runtime-wlp diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/pom.xml index 88770638..79b0f583 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/pom.xml +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/pom.xml @@ -16,12 +16,79 @@ 1.8 - + boost boost-common 0.1.3-SNAPSHOT + + boost + boost-maven-plugin + 0.1.3-SNAPSHOT + + + net.wasdev.wlp.maven.plugins + liberty-maven-plugin + 2.6.3 + + + org.apache.maven + maven-plugin-api + 2.0 + + + org.apache.maven.plugin-tools + maven-plugin-annotations + 3.4 + provided + + + org.twdata.maven + mojo-executor + 2.3.0 + + + com.spotify + docker-client + 8.11.7 + + + org.eclipse.aether + aether-api + 0.9.0.M2 + + + junit + junit + 4.12 + test + + + com.github.stefanbirkner + system-rules + 1.16.0 + test + + + org.codehaus.mojo + plugin-support + 1.0-alpha-1 + + + org.apache.maven + maven-project + + + org.apache.maven + maven-artifact + + + org.apache.maven + maven-plugin-api + + + \ No newline at end of file diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/main/java/boost/runtimes/liberty/LibertyRuntime.java similarity index 96% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/main/java/boost/runtimes/liberty/LibertyRuntime.java index 2ca85d4e..c04c3d48 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/LibertyRuntime.java +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/main/java/boost/runtimes/liberty/LibertyRuntime.java @@ -43,13 +43,13 @@ import boost.maven.utils.MavenProjectUtil; import boost.runtimes.openliberty.boosters.LibertyBoosterI; -public class LibertyRuntime implements RuntimeI { +public abstract class LibertyRuntime implements RuntimeI { private final String serverName = "BoostServer"; private final String serversDir = "/liberty/wlp/usr/servers/"; - private final String runtimeGroupId = "io.openliberty"; - private final String runtimeArtifactId = "openliberty-runtime"; - private final String runtimeVersion = "19.0.0.3"; + private final String runtimeGroupId; + private final String runtimeArtifactId; + private final String runtimeVersion; private String libertyServerPath; @@ -63,7 +63,11 @@ public class LibertyRuntime implements RuntimeI { private String mavenDependencyPluginGroupId = "org.apache.maven.plugins"; private String mavenDependencyPluginArtifactId = "maven-dependency-plugin"; - public LibertyRuntime() {} + public LibertyRuntime(String runtimeGroupId, String runtimeArtifactId, String runtimeVersion) { + this.runtimeGroupId = runtimeGroupId; + this.runtimeArtifactId = runtimeArtifactId; + this.runtimeVersion = runtimeVersion; + } private Plugin getPlugin() throws MojoExecutionException { return plugin(groupId(libertyMavenPluginGroupId), artifactId(libertyMavenPluginArtifactId), diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/CDIBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/JAXRSBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/JDBCBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/JSONBBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/JSONPBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPConfigBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPFaultToleranceBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPHealthBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPMetricsBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenAPIBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPOpenTracingBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/boosters/MPRestClientBoosterTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/config/LibertyServerConfigGeneratorTest.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/utils/BoosterUtil.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/utils/CommonLogger.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/utils/ConfigFileUtils.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java rename to boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/test/java/io/openliberty/boost/runtimes/utils/DOMUtils.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml index 28215659..3477449e 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml @@ -17,83 +17,11 @@ - - boost - boost-common - 0.1.3-SNAPSHOT - - - boost - boost-maven-plugin - 0.1.3-SNAPSHOT - - - net.wasdev.wlp.maven.plugins - liberty-maven-plugin - 2.6.3 - boost.runtimes liberty-common 0.1-SNAPSHOT - - org.apache.maven - maven-plugin-api - 2.0 - - - org.apache.maven.plugin-tools - maven-plugin-annotations - 3.4 - provided - - - org.twdata.maven - mojo-executor - 2.3.0 - - - com.spotify - docker-client - 8.11.7 - - - org.eclipse.aether - aether-api - 0.9.0.M2 - - - junit - junit - 4.12 - test - - - com.github.stefanbirkner - system-rules - 1.16.0 - test - - - org.codehaus.mojo - plugin-support - 1.0-alpha-1 - - - org.apache.maven - maven-project - - - org.apache.maven - maven-artifact - - - org.apache.maven - maven-plugin-api - - - diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/OpenLibertyRuntime.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/OpenLibertyRuntime.java new file mode 100644 index 00000000..180d3558 --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/java/boost/runtimes/openliberty/OpenLibertyRuntime.java @@ -0,0 +1,19 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty; + +public class OpenLibertyRuntime extends LibertyRuntime { + + public OpenLibertyRuntime() { + super("io.openliberty", "openliberty-runtime", "19.0.0.3"); + } + +} diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI index 159f4bd2..409569f3 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI @@ -1 +1 @@ -boost.runtimes.openliberty.LibertyRuntime \ No newline at end of file +boost.runtimes.openliberty.OpenLibertyRuntime \ No newline at end of file diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/pom.xml new file mode 100644 index 00000000..a2de90c7 --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/pom.xml @@ -0,0 +1,25 @@ + + + 4.0.0 + + boost.runtimes + wlp + 0.1-SNAPSHOT + + + UTF-8 + UTF-8 + 1.8 + 1.8 + + + + + boost.runtimes + liberty-common + 0.1-SNAPSHOT + + + + diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/src/main/java/boost/runtimes/openliberty/WLPRuntime.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/src/main/java/boost/runtimes/openliberty/WLPRuntime.java new file mode 100644 index 00000000..675c643f --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/src/main/java/boost/runtimes/openliberty/WLPRuntime.java @@ -0,0 +1,19 @@ +/******************************************************************************* + * Copyright (c) 2019 IBM Corporation and others. + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * IBM Corporation - initial API and implementation + *******************************************************************************/ +package boost.runtimes.openliberty; + +public class WLPRuntime extends LibertyRuntime { + + public WLPRuntime() { + super("com.ibm.websphere.appserver.runtime", "wlp-webProfile8", "19.0.0.7"); + } + +} diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI b/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI new file mode 100644 index 00000000..c4092749 --- /dev/null +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/src/main/resources/META-INF/services/boost.common.runtimes.RuntimeI @@ -0,0 +1 @@ +boost.runtimes.openliberty.WLPRuntime \ No newline at end of file From 0022ed084f38a47a24c2087cd6d2cbcc5d539884 Mon Sep 17 00:00:00 2001 From: mattbsox Date: Tue, 20 Aug 2019 11:36:49 -0500 Subject: [PATCH 08/10] Moving OpenLiberty Gradle runtime back to boost-gradle --- boost-gradle/openliberty-gradle/build.gradle | 9 +- .../openliberty/LibertyGradleRuntime.java | 1 + .../LibertyServerConfigGenerator.java | 244 ------------------ .../openliberty/boosters/LibertyBoosterI.java | 20 -- .../boosters/LibertyCDIBoosterConfig.java | 39 --- .../boosters/LibertyJDBCBoosterConfig.java | 127 --------- .../boosters/LibertyJPABoosterConfig.java | 44 ---- .../boosters/LibertyJSONPBoosterConfig.java | 41 --- .../boosters/LibertyJaxRSBoosterConfig.java | 44 ---- .../LibertyMPConfigBoosterConfig.java | 41 --- .../LibertyMPHealthBoosterConfig.java | 41 --- .../LibertyMPOpenTracingBoosterConfig.java | 42 --- .../LibertyMPRestClientBoosterConfig.java | 42 --- .../runtime-openliberty-gradle/build.gradle | 1 + .../runtime-openliberty-gradle/pom.xml | 25 +- .../openliberty/LibertyGradleRuntime.java | 0 .../boost.gradle.runtimes.GradleRuntimeI | 0 17 files changed, 10 insertions(+), 751 deletions(-) delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJaxRSBoosterConfig.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java delete mode 100644 boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java rename {boost-maven/boost-runtimes/runtime-liberty => boost-gradle}/runtime-openliberty-gradle/build.gradle (92%) rename {boost-maven/boost-runtimes/runtime-liberty => boost-gradle}/runtime-openliberty-gradle/pom.xml (78%) rename {boost-maven/boost-runtimes/runtime-liberty => boost-gradle}/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java (100%) rename {boost-maven/boost-runtimes/runtime-liberty => boost-gradle}/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI (100%) diff --git a/boost-gradle/openliberty-gradle/build.gradle b/boost-gradle/openliberty-gradle/build.gradle index 4f6a1b09..4a81e0b9 100644 --- a/boost-gradle/openliberty-gradle/build.gradle +++ b/boost-gradle/openliberty-gradle/build.gradle @@ -8,8 +8,11 @@ repositories { dependencies { compile "boost:boost-common:0.1.3-SNAPSHOT" + compile "boost.runtimes:liberty-common:0.1-SNAPSHOT" compile "boost:boost-gradle-plugin:0.1.1-SNAPSHOT" + compile 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.6-SNAPSHOT' compile "commons-io:commons-io:2.6" + compile localGroovy() compile gradleApi() } @@ -17,12 +20,6 @@ group = 'boost.runtimes' archivesBaseName = 'openliberty-gradle' version = '0.1.3-SNAPSHOT' -dependencies { - compile group: 'org.codehaus.plexus', name: 'plexus-utils', version: '1.5.7' - compile 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.6-SNAPSHOT' - compile localGroovy() -} - jar { from ('./src/main/resources') { include 'META-INF/services/boost.common.runtimes.GradleRuntimeI' diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java index 3cf2fbde..ccaa2f34 100644 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java +++ b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java @@ -44,6 +44,7 @@ import boost.gradle.utils.BoostLogger; import boost.gradle.utils.GradleProjectUtil; import boost.runtimes.openliberty.boosters.LibertyBoosterI; +import boost.runtimes.openliberty.LibertyServerConfigGenerator; import net.wasdev.wlp.gradle.plugins.extensions.LibertyExtension; diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java deleted file mode 100644 index 7a5f227c..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyServerConfigGenerator.java +++ /dev/null @@ -1,244 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2018, 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty; - -import static boost.common.config.ConfigConstants.*; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Properties; -import java.util.Set; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; - -import boost.common.BoostLoggerI; -import boost.common.config.BoostProperties; -import boost.common.utils.BoostUtil; - -/** - * Create a Liberty server.xml - * - */ -public class LibertyServerConfigGenerator { - - private final String serverPath; - private final String libertyInstallPath; - - private final BoostLoggerI logger; - - private Document serverXml; - private Element featureManager; - private Element serverRoot; - private Element httpEndpoint; - - private Set featuresAdded; - - private Properties bootstrapProperties; - - private final Properties boostConfigProperties; - - public LibertyServerConfigGenerator(String serverPath, BoostLoggerI logger) throws ParserConfigurationException { - - this.serverPath = serverPath; - this.libertyInstallPath = serverPath + "/../../.."; // Three directories - // back from - // 'wlp/usr/servers/BoostServer' - this.logger = logger; - - boostConfigProperties = BoostProperties.getConfiguredBoostProperties(logger); - - generateServerXml(); - - featuresAdded = new HashSet(); - bootstrapProperties = new Properties(); - } - - private void generateServerXml() throws ParserConfigurationException { - DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance().newDocumentBuilder(); - - // Create top level server config element - serverXml = docBuilder.newDocument(); - serverRoot = serverXml.createElement("server"); - serverRoot.setAttribute("description", "Liberty server generated by Liberty Boost"); - serverXml.appendChild(serverRoot); - - // Create featureManager config element - featureManager = serverXml.createElement(FEATURE_MANAGER); - serverRoot.appendChild(featureManager); - - // Create httpEndpoint config element - httpEndpoint = serverXml.createElement(HTTP_ENDPOINT); - httpEndpoint.setAttribute("id", DEFAULT_HTTP_ENDPOINT); - serverRoot.appendChild(httpEndpoint); - } - - /** - * Add a Liberty feature to the server configuration - * - */ - public void addFeature(String featureName) { - if (!featuresAdded.contains(featureName)) { - Element feature = serverXml.createElement(FEATURE); - feature.appendChild(serverXml.createTextNode(featureName)); - featureManager.appendChild(feature); - featuresAdded.add(featureName); - } - } - - /** - * Add a list of features to the server configuration - * - */ - public void addFeatures(List features) { - - for (String featureName : features) { - addFeature(featureName); - } - } - - /** - * Write the server.xml and bootstrap.properties to the server config - * directory - * - * @throws TransformerException - * @throws IOException - */ - public void writeToServer() throws TransformerException, IOException { - // Replace auto-generated server.xml - TransformerFactory transformerFactory = TransformerFactory.newInstance(); - Transformer transformer = transformerFactory.newTransformer(); - transformer.setOutputProperty(OutputKeys.METHOD, "xml"); - transformer.setOutputProperty(OutputKeys.INDENT, "yes"); - transformer.setOutputProperty("{http://xml.apache.org/xslt}indent-amount", "4"); - transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); - DOMSource source = new DOMSource(serverXml); - StreamResult result = new StreamResult(new File(serverPath + "/server.xml")); - transformer.transform(source, result); - - // Generate bootstrap.properties - if (!bootstrapProperties.isEmpty()) { - - OutputStream output = null; - try { - output = new FileOutputStream(serverPath + "/bootstrap.properties"); - bootstrapProperties.store(output, null); - } finally { - if (output != null) { - output.close(); - } - } - } - - // Try setting all bootstrap properties to system properties for test - // purposes - for (String key : bootstrapProperties.stringPropertyNames()) { - System.setProperty(key, bootstrapProperties.getProperty(key)); - } - } - - public void addBootstrapProperties(Properties properties) throws IOException { - - if (properties != null) { - for (String key : properties.stringPropertyNames()) { - String value = properties.getProperty(key); - - addBoostrapProperty(key, value); - } - } - } - - private void addBoostrapProperty(String key, String value) throws IOException { - - // Using this to hold the properties we want to encrypt and the type of - // encryption we want to use - Map propertiesToEncrypt = BoostProperties.getPropertiesToEncrypt(); - - if (propertiesToEncrypt.containsKey(key) && value != null && !value.equals("")) { - // Getting properties that might not have been passed with the other - // properties that will be written to boostrap.properties - // Don't want to add certain properties to the boostrap properties - // so we'll grab them here - Properties supportedProperties = BoostProperties.getConfiguredBoostProperties(logger); - value = BoostUtil.encrypt(libertyInstallPath, value, propertiesToEncrypt.get(key), - supportedProperties.getProperty(BoostProperties.AES_ENCRYPTION_KEY), logger); - } - - bootstrapProperties.put(key, value); - } - - public void addKeystore(Map keystoreProps, Map keyProps) { - Element keystore = serverXml.createElement(KEYSTORE); - keystore.setAttribute("id", DEFAULT_KEYSTORE); - - for (String key : keystoreProps.keySet()) { - keystore.setAttribute(key, keystoreProps.get(key)); - } - - if (!keyProps.isEmpty()) { - Element keyEntry = serverXml.createElement(KEY_ENTRY); - - for (String key : keyProps.keySet()) { - keyEntry.setAttribute(key, keyProps.get(key)); - } - - keystore.appendChild(keyEntry); - } - - serverRoot.appendChild(keystore); - } - - public void addApplication(String appName) { - Element appCfg = serverXml.createElement(APPLICATION); - appCfg.setAttribute(CONTEXT_ROOT, "/"); - appCfg.setAttribute(LOCATION, appName + "." + WAR_PKG_TYPE); - appCfg.setAttribute(TYPE, WAR_PKG_TYPE); - serverRoot.appendChild(appCfg); - - } - - public void addHostname(String hostname) throws Exception { - httpEndpoint.setAttribute("host", BoostUtil.makeVariable(BoostProperties.ENDPOINT_HOST)); - - addBoostrapProperty(BoostProperties.ENDPOINT_HOST, hostname); - } - - public void addHttpPort(String httpPort) throws Exception { - httpEndpoint.setAttribute("httpPort", BoostUtil.makeVariable(BoostProperties.ENDPOINT_HTTP_PORT)); - - addBoostrapProperty(BoostProperties.ENDPOINT_HTTP_PORT, httpPort); - } - - public void addHttpsPort(String httpsPort) throws Exception { - httpEndpoint.setAttribute("httpsPort", BoostUtil.makeVariable(BoostProperties.ENDPOINT_HTTPS_PORT)); - - addBoostrapProperty(BoostProperties.ENDPOINT_HTTPS_PORT, httpsPort); - } - - public Document getServerXmlDoc() { - return serverXml; - } -} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java deleted file mode 100644 index 0109b495..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyBoosterI.java +++ /dev/null @@ -1,20 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import boost.common.BoostException; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; - -public interface LibertyBoosterI { - - public String getFeature(); - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) throws BoostException; -} \ No newline at end of file diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java deleted file mode 100644 index 202ea448..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyCDIBoosterConfig.java +++ /dev/null @@ -1,39 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.CDI_20; - -import java.util.Map; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.CDIBoosterConfig; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -public class LibertyCDIBoosterConfig extends CDIBoosterConfig implements LibertyBoosterI { - - public LibertyCDIBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { - super(dependencies, logger); - } - - public String getFeature() { - if (getVersion().equals(MP_20_VERSION)) { - return CDI_20; - } - return null; - } - - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { - - } -} \ No newline at end of file diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java deleted file mode 100644 index a699cc1a..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJDBCBoosterConfig.java +++ /dev/null @@ -1,127 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.*; - -import java.util.Map; -import java.util.Properties; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.JDBCBoosterConfig; -import boost.common.config.BoostProperties; -import boost.common.utils.BoostUtil; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -import org.w3c.dom.Document; -import org.w3c.dom.Element; -import org.w3c.dom.NodeList; - -public class LibertyJDBCBoosterConfig extends JDBCBoosterConfig implements LibertyBoosterI { - - public LibertyJDBCBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { - super(dependencies, logger); - - } - - @Override - public String getFeature() { - String compilerVersion = System.getProperty(BoostProperties.INTERNAL_COMPILER_TARGET); - - if ("1.8".equals(compilerVersion) || "8".equals(compilerVersion) || "9".equals(compilerVersion) - || "10".equals(compilerVersion)) { - return JDBC_42; - } else if ("11".equals(compilerVersion)) { - return JDBC_43; - } else { - return JDBC_41; // Default to the spec for Liberty's - // minimum supported JRE (version 7 - // as of 17.0.0.3) - } - } - - @Override - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) throws BoostException { - try { - addDataSource(getProductName(), getDatasourceProperties(), libertyServerConfigGenerator, - libertyServerConfigGenerator.getServerXmlDoc()); - } catch (Exception e) { - throw new BoostException("Error when configuring JDBC data source."); - } - } - - private void addDataSource(String productName, Properties serverProperties, - LibertyServerConfigGenerator libertyServerConfigGenerator, Document serverXml) throws Exception { - - String driverJar = null; - String datasourcePropertiesElement = null; - - if (productName.equals(JDBCBoosterConfig.DERBY)) { - driverJar = DERBY_JAR; - datasourcePropertiesElement = PROPERTIES_DERBY_EMBEDDED; - } else if (productName.equals(JDBCBoosterConfig.DB2)) { - driverJar = DB2_JAR; - datasourcePropertiesElement = PROPERTIES_DB2_JCC; - } else if (productName.equals(JDBCBoosterConfig.MYSQL)) { - driverJar = MYSQL_JAR; - datasourcePropertiesElement = PROPERTIES; - } - - Element serverRoot = serverXml.getDocumentElement(); - - // Find the root server element - NodeList list = serverXml.getChildNodes(); - for (int i = 0; i < list.getLength(); i++) { - if (list.item(i).getNodeName().equals("server")) { - serverRoot = (Element) list.item(i); - } - } - - // Add library - Element lib = serverXml.createElement(LIBRARY); - lib.setAttribute("id", JDBC_LIBRARY_1); - Element fileLoc = serverXml.createElement(FILESET); - fileLoc.setAttribute("dir", RESOURCES); - fileLoc.setAttribute("includes", driverJar); - lib.appendChild(fileLoc); - serverRoot.appendChild(lib); - - // Add datasource - Element dataSource = serverXml.createElement(DATASOURCE); - dataSource.setAttribute("id", DEFAULT_DATASOURCE); - dataSource.setAttribute(JDBC_DRIVER_REF, JDBC_DRIVER_1); - - // Add all configured datasource properties - Element props = serverXml.createElement(datasourcePropertiesElement); - addDatasourceProperties(serverProperties, props); - dataSource.appendChild(props); - - serverRoot.appendChild(dataSource); - - // Add jdbc driver - Element jdbcDriver = serverXml.createElement(JDBC_DRIVER); - jdbcDriver.setAttribute("id", JDBC_DRIVER_1); - jdbcDriver.setAttribute(LIBRARY_REF, JDBC_LIBRARY_1); - serverRoot.appendChild(jdbcDriver); - - // Add properties to bootstrap.properties - libertyServerConfigGenerator.addBootstrapProperties(serverProperties); - } - - private void addDatasourceProperties(Properties serverProperties, Element propertiesElement) { - for (String property : serverProperties.stringPropertyNames()) { - String attribute = property.replace(BoostProperties.DATASOURCE_PREFIX, ""); - propertiesElement.setAttribute(attribute, BoostUtil.makeVariable(property)); - } - } -} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java deleted file mode 100644 index 69498982..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJPABoosterConfig.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.JPA_21; -import static boost.common.config.ConfigConstants.JPA_22; - -import java.util.Map; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.JPABoosterConfig; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -public class LibertyJPABoosterConfig extends JPABoosterConfig implements LibertyBoosterI { - - public LibertyJPABoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { - super(dependencies, logger); - } - - @Override - public String getFeature() { - if (getVersion().equals(EE_7_VERSION)) { - return JPA_21; - } else if (getVersion().equals(EE_8_VERSION)) { - return JPA_22; - } - return null; - } - - @Override - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { - - } -} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java deleted file mode 100644 index 851d6881..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJSONPBoosterConfig.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.JSONP_11; - -import java.util.Map; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.JSONPBoosterConfig; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -public class LibertyJSONPBoosterConfig extends JSONPBoosterConfig implements LibertyBoosterI { - - public LibertyJSONPBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { - super(dependencies, logger); - } - - @Override - public String getFeature() { - if (getVersion().equals(MP_20_VERSION)) { - return JSONP_11; - } - return null; - } - - @Override - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { - - } -} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJaxRSBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJaxRSBoosterConfig.java deleted file mode 100644 index f9c1c85a..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyJaxRSBoosterConfig.java +++ /dev/null @@ -1,44 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.JAXRS_20; -import static boost.common.config.ConfigConstants.JAXRS_21; - -import java.util.Map; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.JAXRSBoosterConfig; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -public class LibertyJaxRSBoosterConfig extends JAXRSBoosterConfig implements LibertyBoosterI { - - public LibertyJaxRSBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { - super(dependencies, logger); - } - - @Override - public String getFeature() { - if (getVersion().equals(EE_7_VERSION)) { - return JAXRS_20; - } else if (getVersion().equals(EE_8_VERSION)) { - return JAXRS_21; - } - return null; - } - - @Override - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { - - } -} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java deleted file mode 100644 index 071c7917..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPConfigBoosterConfig.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.MPCONFIG_13; - -import java.util.Map; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.MPConfigBoosterConfig; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -public class LibertyMPConfigBoosterConfig extends MPConfigBoosterConfig implements LibertyBoosterI { - - public LibertyMPConfigBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { - super(dependencies, logger); - } - - @Override - public String getFeature() { - if (getVersion().equals(MP_20_VERSION)) { - return MPCONFIG_13; - } - return null; - } - - @Override - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { - - } -} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java deleted file mode 100644 index 3144ff2d..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPHealthBoosterConfig.java +++ /dev/null @@ -1,41 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.MPHEALTH_10; - -import java.util.Map; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.MPHealthBoosterConfig; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -public class LibertyMPHealthBoosterConfig extends MPHealthBoosterConfig implements LibertyBoosterI { - - public LibertyMPHealthBoosterConfig(Map dependencies, BoostLoggerI logger) throws BoostException { - super(dependencies, logger); - } - - @Override - public String getFeature() { - if (getVersion().equals(MP_20_VERSION)) { - return MPHEALTH_10; - } - return null; - } - - @Override - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { - - } -} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java deleted file mode 100644 index b90b5143..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPOpenTracingBoosterConfig.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.MPOPENTRACING_11; - -import java.util.Map; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.MPOpenTracingBoosterConfig; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -public class LibertyMPOpenTracingBoosterConfig extends MPOpenTracingBoosterConfig implements LibertyBoosterI { - - public LibertyMPOpenTracingBoosterConfig(Map dependencies, BoostLoggerI logger) - throws BoostException { - super(dependencies, logger); - } - - @Override - public String getFeature() { - if (getVersion().equals(MP_20_VERSION)) { - return MPOPENTRACING_11; - } - return null; - } - - @Override - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { - - } -} diff --git a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java b/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java deleted file mode 100644 index fb13d9fa..00000000 --- a/boost-gradle/openliberty-gradle/src/main/java/boost/runtimes/openliberty/boosters/LibertyMPRestClientBoosterConfig.java +++ /dev/null @@ -1,42 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty.boosters; - -import static boost.common.config.ConfigConstants.MPRESTCLIENT_11; - -import java.util.Map; - -import boost.common.BoostException; -import boost.common.BoostLoggerI; -import boost.common.boosters.MPRestClientBoosterConfig; -import boost.runtimes.openliberty.LibertyServerConfigGenerator; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -public class LibertyMPRestClientBoosterConfig extends MPRestClientBoosterConfig implements LibertyBoosterI { - - public LibertyMPRestClientBoosterConfig(Map dependencies, BoostLoggerI logger) - throws BoostException { - super(dependencies, logger); - } - - @Override - public String getFeature() { - if (getVersion().equals(MP_20_VERSION)) { - return MPRESTCLIENT_11; - } - return null; - } - - @Override - public void addServerConfig(LibertyServerConfigGenerator libertyServerConfigGenerator) { - - } -} diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/build.gradle b/boost-gradle/runtime-openliberty-gradle/build.gradle similarity index 92% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/build.gradle rename to boost-gradle/runtime-openliberty-gradle/build.gradle index 4f6a1b09..13965c8d 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/build.gradle +++ b/boost-gradle/runtime-openliberty-gradle/build.gradle @@ -8,6 +8,7 @@ repositories { dependencies { compile "boost:boost-common:0.1.3-SNAPSHOT" + compile "boost.runtimes:liberty-common:0.1-SNAPSHOT" compile "boost:boost-gradle-plugin:0.1.1-SNAPSHOT" compile "commons-io:commons-io:2.6" compile gradleApi() diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/pom.xml b/boost-gradle/runtime-openliberty-gradle/pom.xml similarity index 78% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/pom.xml rename to boost-gradle/runtime-openliberty-gradle/pom.xml index d961961b..d076b6ba 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/pom.xml +++ b/boost-gradle/runtime-openliberty-gradle/pom.xml @@ -34,31 +34,16 @@ boost-gradle-plugin 0.1.1-SNAPSHOT + + boost.runtimes + liberty-common + 0.1-SNAPSHOT + net.wasdev.wlp.gradle.plugins liberty-gradle-plugin 2.6.6-SNAPSHOT - - org.gradle - gradle-core - 5.1.1 - - - org.gradle - gradle-model-core - 5.1.1 - - - org.gradle - gradle-tooling-api - 5.1.1 - - - org.gradle - gradle-base-services - 5.1.1 - commons-io commons-io diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java b/boost-gradle/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java rename to boost-gradle/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI b/boost-gradle/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI similarity index 100% rename from boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI rename to boost-gradle/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI From b1fd41a5ba775e7403fa25907cd36c45e285d4b9 Mon Sep 17 00:00:00 2001 From: mattbsox Date: Wed, 21 Aug 2019 09:52:35 -0500 Subject: [PATCH 09/10] Fixing TomEE debug goal, removing old/duplicate files, and updating copyrights --- .../runtime-openliberty-gradle/build.gradle | 31 -- .../runtime-openliberty-gradle/pom.xml | 76 ----- .../openliberty/LibertyGradleRuntime.java | 293 ------------------ .../boost.gradle.runtimes.GradleRuntimeI | 1 - .../java/boost/maven/plugin/AbstractMojo.java | 1 - .../java/boost/maven/plugin/DebugMojo.java | 5 +- .../main/java/boost/maven/plugin/RunMojo.java | 2 +- .../java/boost/maven/plugin/StartMojo.java | 2 +- .../java/boost/maven/plugin/StopMojo.java | 2 +- .../boost/maven/runtimes/RuntimeParams.java | 87 ------ .../runtimes/liberty/LibertyRuntime.java | 1 - .../boost/runtimes/tomee/TomeeRuntime.java | 1 + 12 files changed, 7 insertions(+), 495 deletions(-) delete mode 100644 boost-gradle/runtime-openliberty-gradle/build.gradle delete mode 100644 boost-gradle/runtime-openliberty-gradle/pom.xml delete mode 100644 boost-gradle/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java delete mode 100644 boost-gradle/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI delete mode 100644 boost-maven/boost-maven-plugin/src/main/java/boost/maven/runtimes/RuntimeParams.java diff --git a/boost-gradle/runtime-openliberty-gradle/build.gradle b/boost-gradle/runtime-openliberty-gradle/build.gradle deleted file mode 100644 index 13965c8d..00000000 --- a/boost-gradle/runtime-openliberty-gradle/build.gradle +++ /dev/null @@ -1,31 +0,0 @@ -apply plugin: 'java' -apply plugin: 'maven' - -repositories { - mavenLocal() - mavenCentral() -} - -dependencies { - compile "boost:boost-common:0.1.3-SNAPSHOT" - compile "boost.runtimes:liberty-common:0.1-SNAPSHOT" - compile "boost:boost-gradle-plugin:0.1.1-SNAPSHOT" - compile "commons-io:commons-io:2.6" - compile gradleApi() -} - -group = 'boost.runtimes' -archivesBaseName = 'openliberty-gradle' -version = '0.1.3-SNAPSHOT' - -dependencies { - compile group: 'org.codehaus.plexus', name: 'plexus-utils', version: '1.5.7' - compile 'net.wasdev.wlp.gradle.plugins:liberty-gradle-plugin:2.6.6-SNAPSHOT' - compile localGroovy() -} - -jar { - from ('./src/main/resources') { - include 'META-INF/services/boost.common.runtimes.GradleRuntimeI' - } -} \ No newline at end of file diff --git a/boost-gradle/runtime-openliberty-gradle/pom.xml b/boost-gradle/runtime-openliberty-gradle/pom.xml deleted file mode 100644 index d076b6ba..00000000 --- a/boost-gradle/runtime-openliberty-gradle/pom.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - 4.0.0 - - boost.runtimes - openliberty-gradle - 0.1-SNAPSHOT - jar - - - UTF-8 - UTF-8 - 1.8 - 1.8 - - - - - Gradle Releases - https://repo.gradle.org/gradle/libs-releases-local/ - - - - - - boost - boost-common - 0.1.3-SNAPSHOT - - - boost - boost-gradle-plugin - 0.1.1-SNAPSHOT - - - boost.runtimes - liberty-common - 0.1-SNAPSHOT - - - net.wasdev.wlp.gradle.plugins - liberty-gradle-plugin - 2.6.6-SNAPSHOT - - - commons-io - commons-io - 2.6 - - - org.codehaus.groovy - groovy - 2.5.8 - - - org.codehaus.plexus - plexus-utils - 1.5.7 - - - junit - junit - 4.12 - test - - - com.github.stefanbirkner - system-rules - 1.16.0 - test - - - - diff --git a/boost-gradle/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java b/boost-gradle/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java deleted file mode 100644 index 3cf2fbde..00000000 --- a/boost-gradle/runtime-openliberty-gradle/src/main/java/boost/runtimes/openliberty/LibertyGradleRuntime.java +++ /dev/null @@ -1,293 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.runtimes.openliberty; - -import java.io.BufferedReader; -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.lang.reflect.Array; -import java.lang.reflect.Field; -import java.util.Arrays; -import java.util.ArrayList; -import java.util.List; -import java.util.Properties; - -import org.apache.commons.io.FileUtils; - -import org.codehaus.plexus.util.xml.Xpp3Dom; - -import org.gradle.api.Action; -import org.gradle.api.GradleException; -import org.gradle.api.Project; -import org.gradle.api.artifacts.Configuration; -import org.gradle.api.plugins.WarPlugin; -import org.gradle.api.tasks.bundling.War; - -import groovy.lang.Closure; - -import boost.common.BoostException; -import boost.common.boosters.AbstractBoosterConfig; -import boost.common.config.BoostProperties; -import boost.common.config.BoosterConfigurator; -import boost.common.config.ConfigConstants; -import boost.gradle.runtimes.GradleRuntimeI; -import boost.gradle.utils.BoostLogger; -import boost.gradle.utils.GradleProjectUtil; -import boost.runtimes.openliberty.boosters.LibertyBoosterI; - -import net.wasdev.wlp.gradle.plugins.extensions.LibertyExtension; - -public class LibertyGradleRuntime implements GradleRuntimeI { - - private final String serverName = "BoostServer"; - private final String OPEN_LIBERTY_VERSION = "19.0.0.3"; - - private String projectBuildDir; - private String libertyServerPath; - - public LibertyGradleRuntime() {} - - public void configureRuntimePlugin(Project project) throws GradleException { - project.getPluginManager().apply("net.wasdev.wlp.gradle.plugins.Liberty"); - - project.getTasks().getByName("libertyPackage").dependsOn("installApps", "installFeature"); - project.getTasks().getByName("installApps").mustRunAfter("installFeature"); - - project.getDependencies().add("libertyRuntime", "io.openliberty:openliberty-runtime:" + OPEN_LIBERTY_VERSION); - //The rest of this method is used to set the server name in the ServerExtension. - - //Creating a closure to call on the ServerExtension in the LibertyExtension - //Other properties aside from the server name can be configured here as well - Closure serverClosure = new Closure(this) { - @Override - public Object call() { - try { - Field nameField = getDelegate().getClass().getDeclaredField("name"); - nameField.setAccessible(true); - nameField.set(getDelegate(), serverName); - } catch (Exception e) { - throw new GradleException("Error configuring Liberty Gradle Plugin.", e); - } - - return this.getDelegate(); - } - }; - //Configuring the LibertyExtension's server ServerExtension - project.getExtensions().configure("liberty", new Action() { - @Override - public void execute(LibertyExtension liberty) { - liberty.server(serverClosure); - } - }); - - this.projectBuildDir = project.getBuildDir().toString(); - this.libertyServerPath = projectBuildDir + "/wlp/usr/servers/" + serverName; - } - - public void doPackage(List boosterConfigs, Object project, Object pluginTask) throws BoostException { - Project gradleProject = (Project)project; - System.setProperty(BoostProperties.INTERNAL_COMPILER_TARGET, gradleProject.findProperty("targetCompatibility").toString()); - try { - packageLiberty(boosterConfigs, gradleProject); - } catch (GradleException e) { - throw new BoostException("Error packaging Liberty server", e); - } - } - - private void packageLiberty(List boosterConfigs, Project project) throws BoostException { - try { - runTask("installLiberty", project); - runTask("libertyCreate", project); - - // targeting a liberty install - copyBoosterDependencies(boosterConfigs, project); - - generateServerConfig(boosterConfigs, project); - - installMissingFeatures(project); - - // Create the Liberty runnable jar - createUberJar(project); - } catch(Exception e) { - throw new BoostException("Error packaging Liberty server", e); - } - - } - - /** - * Get all booster dependencies and copy them to the Liberty server. - * - * @throws GradleException - * - */ - private void copyBoosterDependencies(List boosterConfigs, Project project) throws IOException { - List dependenciesToCopy = BoosterConfigurator.getDependenciesToCopy(boosterConfigs, - BoostLogger.getInstance()); - - project.getConfigurations().maybeCreate("boosterDependencies"); - for (String dep : dependenciesToCopy) { - project.getDependencies().add("boosterDependencies", dep); - } - - File resouresDir = new File(libertyServerPath, "resources"); - - for (File dep : project.getConfigurations().getByName("boosterDependencies").resolve()) { - FileUtils.copyFileToDirectory(dep, resouresDir); - } - } - - /** - * Generate config for the Liberty server based on the Gradle project. - * - * @throws GradleException - */ - private void generateServerConfig(List boosterConfigs, Project project) throws GradleException { - - try { - // Generate server config - generateLibertyServerConfig(boosterConfigs, project); - - } catch (Exception e) { - throw new GradleException("Unable to generate server configuration for the Liberty server.", e); - } - } - - private List getWarNames(Project project) { - String warName = null; - - if (project.getPlugins().hasPlugin("war")) { - WarPlugin warPlugin = (WarPlugin)(project.getPlugins().findPlugin("war")); - War warTask = (War)(project.getTasks().findByPath(warPlugin.WAR_TASK_NAME)); - warName = warTask.getArchiveFileName().get().substring(0, warTask.getArchiveFileName().get().length() - 4); - } - - return Arrays.asList(warName); - } - - /** - * Configure the Liberty runtime - * - * @param boosterConfigurators - * @throws Exception - */ - private void generateLibertyServerConfig(List boosterConfigurators, Project project) throws Exception { - - List warNames = getWarNames(project); - LibertyServerConfigGenerator libertyConfig = new LibertyServerConfigGenerator(libertyServerPath, - BoostLogger.getInstance()); - - // Add default http endpoint configuration - Properties boostConfigProperties = BoostProperties.getConfiguredBoostProperties(BoostLogger.getInstance()); - - String host = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HOST, "*"); - libertyConfig.addHostname(host); - - String httpPort = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HTTP_PORT, "9080"); - libertyConfig.addHttpPort(httpPort); - - String httpsPort = (String) boostConfigProperties.getOrDefault(BoostProperties.ENDPOINT_HTTPS_PORT, "9443"); - libertyConfig.addHttpsPort(httpsPort); - - // Add war configuration if necessary - if (!warNames.isEmpty()) { - for (String warName : warNames) { - libertyConfig.addApplication(warName); - } - } else { - throw new Exception( - "No war files were found. The project must have a war packaging type or specify war dependencies."); - } - - // Loop through configuration objects and add config and - // the corresponding Liberty feature - for (AbstractBoosterConfig configurator : boosterConfigurators) { - if (configurator instanceof LibertyBoosterI) { - ((LibertyBoosterI) configurator).addServerConfig(libertyConfig); - libertyConfig.addFeature(((LibertyBoosterI) configurator).getFeature()); - } - } - - libertyConfig.writeToServer(); - } - - //Liberty Gradle Plugin Execution - - /** - * Invoke the liberty-gradle-plugin to run the install-feature goal. - * - * This will install any missing features defined in the server.xml or - * configDropins. - * - */ - private void installMissingFeatures(Project project) throws GradleException { - runTask("installFeature", project); - } - - /** - * Invoke the liberty-gradle-plugin to package the server into a runnable Liberty - * JAR - */ - private void createUberJar(Project project) throws BoostException { - try { - runTask("libertyPackage", project); - } catch (GradleException e) { - throw new BoostException("Error creating Liberty uber jar", e); - } - } - - public void doDebug(Object project, Object pluginTask) throws BoostException { - try { - runTask("libertyDebug", (Project)project); - } catch (GradleException e) { - throw new BoostException("Error debugging Liberty server", e); - } - } - - public void doRun(Object project, Object pluginTask) throws BoostException { - try { - runTask("LibertyRun", (Project)project); - } catch (GradleException e) { - throw new BoostException("Error running Liberty server", e); - } - } - - public void doStart(Object project, Object pluginTask) throws BoostException { - try { - runTask("libertyStart", (Project)project); - } catch (GradleException e) { - throw new BoostException("Error starting Liberty server", e); - } - } - - public void doStop(Object project, Object pluginTask) throws BoostException { - try { - runTask("libertyStop", (Project)project); - } catch (GradleException e) { - throw new BoostException("Error stopping Liberty server", e); - } - } - - private void runTask(String taskName, Project project) throws GradleException { - //String command = project.getProjectDir().toString() + "/gradlew"; - try { - ProcessBuilder pb = new ProcessBuilder("gradle", taskName, "-i", "-s"); - System.out.println("Executing task " + pb.command().get(1)); - pb.directory(project.getProjectDir()); - Process p = pb.start(); - p.waitFor(); - } catch (IOException | InterruptedException e) { - throw new GradleException("Unable to execute the " + taskName + " task.", e); - } - } - -} diff --git a/boost-gradle/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI b/boost-gradle/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI deleted file mode 100644 index f4bcc36b..00000000 --- a/boost-gradle/runtime-openliberty-gradle/src/main/resources/META-INF/services/boost.gradle.runtimes.GradleRuntimeI +++ /dev/null @@ -1 +0,0 @@ -boost.runtimes.openliberty.LibertyGradleRuntime \ No newline at end of file diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/AbstractMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/AbstractMojo.java index e4a4c018..9a7aa4a8 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/AbstractMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/AbstractMojo.java @@ -41,7 +41,6 @@ import boost.common.boosters.AbstractBoosterConfig; import boost.common.config.BoosterConfigurator; import boost.common.runtimes.RuntimeI; -import boost.maven.runtimes.RuntimeParams; import boost.maven.utils.BoostLogger; import boost.maven.utils.MavenProjectUtil; diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/DebugMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/DebugMojo.java index f38df95b..8564ada8 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/DebugMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/DebugMojo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. + * Copyright (c) 2018, 2019 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11,6 +11,7 @@ package boost.maven.plugin; import org.apache.maven.plugin.MojoExecutionException; +import org.apache.maven.plugins.annotations.*; import org.apache.maven.plugins.annotations.Mojo; import org.apache.maven.plugins.annotations.Parameter; @@ -21,7 +22,7 @@ * debugger connects to debug port 7777. * */ -@Mojo(name = "debug") +@Mojo(name = "debug", requiresDependencyResolution = ResolutionScope.COMPILE_PLUS_RUNTIME, requiresDependencyCollection = ResolutionScope.COMPILE_PLUS_RUNTIME) public class DebugMojo extends AbstractMojo { /** diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/RunMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/RunMojo.java index 0a15d244..ba95d40e 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/RunMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/RunMojo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. + * Copyright (c) 2018, 2019 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StartMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StartMojo.java index 354736c4..4ac7c071 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StartMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StartMojo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. + * Copyright (c) 2018, 2019 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StopMojo.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StopMojo.java index 5f1fe3fe..00524df4 100644 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StopMojo.java +++ b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/plugin/StopMojo.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2018 IBM Corporation and others. + * Copyright (c) 2018, 2019 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at diff --git a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/runtimes/RuntimeParams.java b/boost-maven/boost-maven-plugin/src/main/java/boost/maven/runtimes/RuntimeParams.java deleted file mode 100644 index 7c95f680..00000000 --- a/boost-maven/boost-maven-plugin/src/main/java/boost/maven/runtimes/RuntimeParams.java +++ /dev/null @@ -1,87 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2019 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -package boost.maven.runtimes; - -import java.util.List; - -import org.apache.maven.model.Plugin; -import org.apache.maven.plugin.logging.Log; -import org.apache.maven.project.MavenProject; - -import org.eclipse.aether.RepositorySystem; -import org.eclipse.aether.RepositorySystemSession; -import org.eclipse.aether.repository.RemoteRepository; -import org.twdata.maven.mojoexecutor.MojoExecutor.ExecutionEnvironment; - -import boost.common.boosters.AbstractBoosterConfig; - -public class RuntimeParams { - - List boosterConfigs; - ExecutionEnvironment env; - MavenProject project; - Log log; - RepositorySystem repoSystem; - RepositorySystemSession repoSession; - List remoteRepos; - Plugin mavenDepPlugin; - String projectBuildDir; - - public RuntimeParams(List boosterConfigs, ExecutionEnvironment env, MavenProject project, - Log log, RepositorySystem repoSystem, RepositorySystemSession repoSession, - List remoteRepos, Plugin mavenDepPlugin) { - this.log = log; - this.boosterConfigs = boosterConfigs; - this.env = env; - this.project = project; - this.projectBuildDir = project.getBuild().getDirectory(); - this.repoSystem = repoSystem; - this.repoSession = repoSession; - this.remoteRepos = remoteRepos; - this.mavenDepPlugin = mavenDepPlugin; - } - - public Log getLog() { - return this.log; - } - - public List getBoosterConfigs() { - return this.boosterConfigs; - } - - public ExecutionEnvironment getEnv() { - return this.env; - } - - public MavenProject getProject() { - return this.project; - } - - public String getProjectBuildDir() { - return this.projectBuildDir; - } - - public RepositorySystem getRepoSystem() { - return this.repoSystem; - } - - public RepositorySystemSession getRepoSession() { - return this.repoSession; - } - - public List getRemoteRepos() { - return this.remoteRepos; - } - - public Plugin getMavenDepPlugin() { - return this.mavenDepPlugin; - } -} diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/main/java/boost/runtimes/liberty/LibertyRuntime.java b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/main/java/boost/runtimes/liberty/LibertyRuntime.java index c04c3d48..02546ecd 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/main/java/boost/runtimes/liberty/LibertyRuntime.java +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-liberty-common/src/main/java/boost/runtimes/liberty/LibertyRuntime.java @@ -38,7 +38,6 @@ import boost.common.config.ConfigConstants; import boost.common.runtimes.RuntimeI; import boost.maven.plugin.AbstractMojo; -import boost.maven.runtimes.RuntimeParams; import boost.maven.utils.BoostLogger; import boost.maven.utils.MavenProjectUtil; import boost.runtimes.openliberty.boosters.LibertyBoosterI; diff --git a/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java b/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java index b60bfd3c..943b0b9b 100644 --- a/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java +++ b/boost-maven/boost-runtimes/runtime-tomee/src/main/java/boost/runtimes/tomee/TomeeRuntime.java @@ -150,6 +150,7 @@ private void createUberJar() throws MojoExecutionException { public void doDebug(Object mavenProject, Object pluginTask) throws BoostException { try { + env = ((AbstractMojo)pluginTask).getExecutionEnvironment(); executeMojo(getPlugin(), goal("debug"), configuration(element(name("tomeeAlreadyInstalled"), "true"), element(name("context"), "ROOT"), element(name("tomeeVersion"), "8.0.0-M2"), element(name("tomeeClassifier"), "plus")), From c14eb025d46bed9205151b68e07075e07336b757 Mon Sep 17 00:00:00 2001 From: mattbsox Date: Wed, 21 Aug 2019 13:46:19 -0500 Subject: [PATCH 10/10] Fixing artifact versions --- .../runtime-liberty/runtime-openliberty/pom.xml | 2 +- .../boost-runtimes/runtime-liberty/runtime-wlp/pom.xml | 2 +- boost-maven/boost-runtimes/runtime-wlp/pom.xml | 10 ---------- 3 files changed, 2 insertions(+), 12 deletions(-) delete mode 100644 boost-maven/boost-runtimes/runtime-wlp/pom.xml diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml index 3477449e..aeb3a913 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-openliberty/pom.xml @@ -6,7 +6,7 @@ boost.runtimes openliberty - 0.1-SNAPSHOT + 1.0-M1-SNAPSHOT jar diff --git a/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/pom.xml b/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/pom.xml index a2de90c7..162fe127 100644 --- a/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/pom.xml +++ b/boost-maven/boost-runtimes/runtime-liberty/runtime-wlp/pom.xml @@ -5,7 +5,7 @@ boost.runtimes wlp - 0.1-SNAPSHOT + 1.0-M1-SNAPSHOT UTF-8 diff --git a/boost-maven/boost-runtimes/runtime-wlp/pom.xml b/boost-maven/boost-runtimes/runtime-wlp/pom.xml deleted file mode 100644 index 8c10f554..00000000 --- a/boost-maven/boost-runtimes/runtime-wlp/pom.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - 4.0.0 - - boost.runtimes - wlp - 1.0-M1-SNAPSHOT - -