Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle deprecation fixes testing #930

Merged
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ jobs:
working-directory: build/reports/tests
env:
BUILD_REPORTS_PATH: /buildReports/${{runner.os}}/java${{matrix.java}}/${{matrix.RUNTIME}}-${{matrix.RUNTIME_VERSION}}/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: buildReportsArtifactLinux
Expand Down Expand Up @@ -167,7 +167,7 @@ jobs:
if: ${{ failure() }}
working-directory: C:/ci.gradle
run: cp -r build/reports/tests/test D:/buildReports/${{runner.os}}/java${{matrix.java}}/${{matrix.RUNTIME}}-${{matrix.RUNTIME_VERSION}}/
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: buildReportsArtifactWindows
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,18 @@ repositories {
mavenLocal()
mavenCentral()
maven {
url 'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/'
url = 'https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/maven/repository/'
}
maven {
url 'https://oss.sonatype.org/content/repositories/snapshots/'
url = 'https://oss.sonatype.org/content/repositories/snapshots/'
}
}

buildscript {
repositories {
mavenLocal()
maven {
url "https://plugins.gradle.org/m2/"
url = "https://plugins.gradle.org/m2/"
}
}
dependencies {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2017, 2024.
* (C) Copyright IBM Corporation 2017, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -677,7 +677,8 @@ abstract class AbstractServerTask extends AbstractLibertyTask {
application.appendNode('applicationFilename', appObj.getArchiveFileName().get())
}
if (appObj instanceof War) {
application.appendNode('warSourceDirectory', project.webAppDirName)
War war=appObj
application.appendNode('warSourceDirectory', war.webAppDirectory.getAsFile().get())
}
} else if (appObj instanceof File) {
application.appendNode('appsDirectory', appDir)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2015, 2023.
* (C) Copyright IBM Corporation 2015, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,8 +21,8 @@ import org.gradle.api.logging.LogLevel
class CleanTask extends AbstractServerTask {
CleanTask() {
configure({
description 'Deletes files from some directories from the Liberty server'
group 'Liberty'
description = 'Deletes files from some directories from the Liberty server'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2017, 2024.
* (C) Copyright IBM Corporation 2017, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,8 +29,8 @@ class CompileJSPTask extends AbstractFeatureTask {

CompileJSPTask() {
configure({
description 'Compile the JSP files in the src/main/webapp directory. '
group 'Liberty'
description = 'Compile the JSP files in the src/main/webapp directory. '
group = 'Liberty'
})
}

Expand Down Expand Up @@ -118,10 +118,10 @@ class CompileJSPTask extends AbstractFeatureTask {
}
}

if (project.hasProperty('sourceCompatibility')) {
if (project.getExtensions().getByName('java').hasProperty("sourceCompatibility")) {
logger.info("Found sourceCompatibility")
compile.setSource((String) project.getProperties().get('sourceCompatibility'))
}
compile.setSource((String) project.getExtensions().getByName('java').getProperties().get('sourceCompatibility'))
cherylking marked this conversation as resolved.
Show resolved Hide resolved
}
}

private void setJspVersion(CompileJSPs compile, Set<String> installedFeatures) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2024.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -29,8 +29,8 @@ class CreateTask extends AbstractServerTask {

CreateTask() {
configure({
description 'Creates a Liberty server.'
group 'Liberty'
description = 'Creates a Liberty server.'
group = 'Liberty'
})
outputs.upToDateWhen {
getServerDir(project).exists() && (new File(getServerDir(project), 'server.xml')).exists() && !isServerDirChanged(project)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2024.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -57,8 +57,8 @@ class DeployTask extends AbstractServerTask {

DeployTask() {
configure({
description "Copy applications generated by the Gradle project to a Liberty server's dropins or apps directory."
group 'Liberty'
description = "Copy applications generated by the Gradle project to a Liberty server's dropins or apps directory."
group = 'Liberty'
project.afterEvaluate {
springBootVersion = findSpringBootVersion(project)
springBootTask = findSpringBootTask(project, springBootVersion)
Expand Down Expand Up @@ -133,7 +133,7 @@ class DeployTask extends AbstractServerTask {
} else {
archiveBaseName = task.getArchiveBaseName().get()
fileName = getArchiveName(task)
Files.copy(task.archivePath.toPath(), new File(getServerDir(project), "/" + appsDir + "/" + getArchiveName(task)).toPath(), StandardCopyOption.REPLACE_EXISTING)
Files.copy(task.archiveFile.get().getAsFile().toPath(), new File(getServerDir(project), "/" + appsDir + "/" + getArchiveName(task)).toPath(), StandardCopyOption.REPLACE_EXISTING)
validateAppConfig(getArchiveName(task), archiveBaseName, appsDir)
}
validateAppConfig(fileName, archiveBaseName, appsDir)
Expand Down Expand Up @@ -167,10 +167,10 @@ class DeployTask extends AbstractServerTask {
String archiveOutputPath;

if (isSpringBoot2plus(springBootVersion)) {
archiveOutputPath = springBootTask.archivePath.getAbsolutePath()
archiveOutputPath = springBootTask.archiveFile.get().getAsFile().getAbsolutePath()
}
else if(isSpringBoot1(springBootVersion)) {
archiveOutputPath = springBootTask.archivePath.getAbsolutePath()
archiveOutputPath = springBootTask.archiveFile.get().getAsFile().getAbsolutePath()
if (project.bootRepackage.classifier != null && !project.bootRepackage.classifier.isEmpty()) {
archiveOutputPath = archiveOutputPath.substring(0, archiveOutputPath.lastIndexOf(".")) + "-" + project.bootRepackage.classifier + "." + springBootTask.getArchiveExtension().get()
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2019, 2024.
* (C) Copyright IBM Corporation 2019, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -68,8 +68,8 @@ class DevTask extends AbstractFeatureTask {

DevTask() {
configure({
description 'Runs a Liberty server in dev mode'
group 'Liberty'
description = 'Runs a Liberty server in dev mode'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2020.
* (C) Copyright IBM Corporation 2020, 2025
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -21,8 +21,8 @@ class DevcTask extends DevTask {

DevcTask() {
configure({
description 'Runs a Liberty server in dev mode inside of a Docker container'
group 'Liberty'
description = 'Runs a Liberty server in dev mode inside of a Docker container'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2015, 2019.
* (C) Copyright IBM Corporation 2015, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,8 @@ class DumpTask extends AbstractServerTask {

DumpTask() {
configure({
description 'Dumps diagnostic information from the Liberty server into an archive.'
group 'Liberty'
description = 'Dumps diagnostic information from the Liberty server into an archive.'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2021, 2024.
* (C) Copyright IBM Corporation 2021, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -49,8 +49,8 @@ class GenerateFeaturesTask extends AbstractFeatureTask {

GenerateFeaturesTask() {
configure({
description 'Generate the features used by an application and add to the configuration of a Liberty server'
group 'Liberty'
description = 'Generate the features used by an application and add to the configuration of a Liberty server'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2024.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -33,8 +33,8 @@ class InstallFeatureTask extends AbstractFeatureTask {

InstallFeatureTask() {
configure({
description 'Install a new feature to the Liberty server'
group 'Liberty'
description = 'Install a new feature to the Liberty server'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2024.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,8 +42,8 @@ class InstallLibertyTask extends AbstractLibertyTask {

InstallLibertyTask() {
configure({
description 'Installs Liberty from a repository'
group 'Liberty'
description = 'Installs Liberty from a repository'
group = 'Liberty'
})
outputs.upToDateWhen {
// ensure a Liberty installation exists at the install directory
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2015, 2019.
* (C) Copyright IBM Corporation 2015, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,8 @@ class JavaDumpTask extends AbstractServerTask {

JavaDumpTask() {
configure({
description 'Dumps diagnostic information from the Liberty server JVM.'
group 'Liberty'
description = 'Dumps diagnostic information from the Liberty server JVM.'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2024.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -62,8 +62,8 @@ class PackageTask extends AbstractServerTask {

PackageTask() {
configure({
description 'Generates a Liberty server archive.'
group 'Liberty'
description = 'Generates a Liberty server archive.'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2021.
* (C) Copyright IBM Corporation 2021, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -31,8 +31,8 @@ class PrepareFeatureTask extends AbstractPrepareTask {

PrepareFeatureTask() {
configure({
description 'Prepare a user feature for upload to a maven repository'
group 'Liberty'
description = 'Prepare a user feature for upload to a maven repository'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2023.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,8 +23,8 @@ class RunTask extends AbstractServerTask {

RunTask() {
configure({
description "Runs a Liberty server under the Gradle process."
group 'Liberty'
description = "Runs a Liberty server under the Gradle process."
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2024.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -27,8 +27,8 @@ class StartTask extends AbstractServerTask {

StartTask() {
configure({
description 'Starts the Liberty server.'
group 'Liberty'
description = 'Starts the Liberty server.'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2023.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -22,8 +22,8 @@ class StatusTask extends AbstractServerTask {

StatusTask() {
configure({
description 'Checks if the Liberty server is running.'
group 'Liberty'
description = 'Checks if the Liberty server is running.'
group = 'Liberty'
})
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright IBM Corporation 2014, 2023.
* (C) Copyright IBM Corporation 2014, 2025.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -23,8 +23,8 @@ class StopTask extends AbstractServerTask {

StopTask() {
configure({
description 'Stops the Liberty server.'
group 'Liberty'
description = 'Stops the Liberty server.'
group = 'Liberty'
})
}

Expand Down
Loading
Loading