From 6411f90305e1e71fa7cead0ecc7d9cd7cd80f4f1 Mon Sep 17 00:00:00 2001 From: navaneethsnair1 Date: Wed, 8 May 2024 17:54:01 +0530 Subject: [PATCH] plugin-update automate --- src/main/content/_assets/js/builds.js | 16 ++++++++++++++++ src/main/content/start.html | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/main/content/_assets/js/builds.js b/src/main/content/_assets/js/builds.js index 93624d2cd8..82e38ae633 100644 --- a/src/main/content/_assets/js/builds.js +++ b/src/main/content/_assets/js/builds.js @@ -24,6 +24,7 @@ var starter_domain = isNotProdSite() ? 'https://starter-staging.rh9j6zz75er.us-east.codeengine.appdomain.cloud' : 'https://start.openliberty.io'; var starter_info_url = starter_domain + '/api/start/info'; var starter_submit_url = starter_domain + '/api/start'; +var starter_plugin_url= starter_domain+ '/api/start/plugin-versions'; var failed_builds_request = false; // Controls what build zips are exposed on openliberty.io. This will need to be updated @@ -1595,3 +1596,18 @@ $(window).on('load', function () { } }); }); + +$(window).on('load', function () { + $.ajax({ + url: starter_plugin_url, + type: 'GET', + dataType: 'json', + success: function(data) { + $('#maven_version').text(data.mavenVersion); + $('#gradle_version').text(data.gradleVersion); + }, + error: function(error) { + console.error('Error fetching Maven and Gradle plugin versions:', error); + } + }); +}); diff --git a/src/main/content/start.html b/src/main/content/start.html index 7dc4b18295..8c9236ee6c 100644 --- a/src/main/content/start.html +++ b/src/main/content/start.html @@ -162,7 +162,7 @@

{% t st
Copied to clipboard
-
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version>3.10.2</version>
</plugin>
+
<plugin>
<groupId>io.openliberty.tools</groupId>
<artifactId>liberty-maven-plugin</artifactId>
<version></version>
</plugin>

{% t start.add_to_existing_app.maven_guide_text %} @@ -177,7 +177,7 @@

{% t st
Copied to clipboard
-
buildscript { 
repositories {
mavenCentral()
}
dependencies {
classpath 'io.openliberty.tools:liberty-gradle-plugin:'3.8.2'
}
}
+
buildscript { 
repositories {
mavenCentral()
}
dependencies {
classpath 'io.openliberty.tools:liberty-gradle-plugin:''
}
}

The plugin also needs to be applied in the build file in order to be utilized.