Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// https://plugins.gradle.org/plugin/org.springframework.boot
plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'java'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand Down
2 changes: 1 addition & 1 deletion dev/io.openliberty.springboot.fat40.aop.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand Down
2 changes: 1 addition & 1 deletion dev/io.openliberty.springboot.fat40.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// https://plugins.gradle.org/plugin/org.springframework.boot
plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'java'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -28,5 +28,5 @@ apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'

dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
providedRuntime('org.springframework.boot:spring-boot-tomcat-runtime')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
}
4 changes: 2 additions & 2 deletions dev/io.openliberty.springboot.fat40.data.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -30,7 +30,7 @@ dependencies {
implementation('org.springframework.boot:spring-boot-starter-data-jpa')
implementation('org.hibernate.orm:hibernate-community-dialects:7.1.0.Final')
runtimeOnly 'com.h2database:h2'
providedRuntime('org.springframework.boot:spring-boot-tomcat-runtime')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
providedCompile 'org.hibernate.orm:hibernate-core:7.1.0.Final'
providedCompile 'jakarta.transaction:jakarta.transaction-api'
providedCompile 'jakarta.persistence:jakarta.persistence-api'
Expand Down
4 changes: 2 additions & 2 deletions dev/io.openliberty.springboot.fat40.http.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -30,5 +30,5 @@ apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'

dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
providedCompile('org.springframework.boot:spring-boot-starter-tomcat')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -30,5 +30,5 @@ apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'

dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
providedCompile('org.springframework.boot:spring-boot-starter-tomcat')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
}
2 changes: 1 addition & 1 deletion dev/io.openliberty.springboot.fat40.java.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// https://plugins.gradle.org/plugin/org.springframework.boot
plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'java'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand Down
4 changes: 2 additions & 2 deletions dev/io.openliberty.springboot.fat40.jms.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -31,5 +31,5 @@ dependencies {
implementation('org.springframework.integration:spring-integration-jms')
implementation('org.springframework.boot:spring-boot-starter-jdbc')
providedCompile('jakarta.jms:jakarta.jms-api:3.1.0')
providedRuntime('org.springframework.boot:spring-boot-tomcat-runtime')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
}
4 changes: 2 additions & 2 deletions dev/io.openliberty.springboot.fat40.mbean.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -28,5 +28,5 @@ apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'

dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
providedRuntime('org.springframework.boot:spring-boot-tomcat-runtime')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// https://plugins.gradle.org/plugin/org.springframework.boot
plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'java'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// https://plugins.gradle.org/plugin/org.springframework.boot
plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'java'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -27,6 +27,5 @@ apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'
dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
implementation('org.springframework.boot:spring-boot-starter-jdbc')

providedRuntime('org.springframework.boot:spring-boot-tomcat-runtime')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -27,7 +27,9 @@ apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'

dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
providedRuntime('org.springframework.boot:spring-boot-tomcat-runtime')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime') {
exclude group: 'jakarta.annotation', module: 'jakarta.annotation-api'
}
implementation ('org.springframework.boot:spring-boot-starter-validation') {
exclude group: 'org.hibernate.validator', module: 'hibernate-validator'
}
Expand Down
4 changes: 2 additions & 2 deletions dev/io.openliberty.springboot.fat40.war.app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// https://plugins.gradle.org/plugin/org.springframework.boot
plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -29,5 +29,5 @@ apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'

dependencies {
implementation('org.springframework.boot:spring-boot-starter-web')
providedCompile('org.springframework.boot:spring-boot-starter-tomcat')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
********************************************************************************/

plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'java'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// https://plugins.gradle.org/plugin/org.springframework.boot
plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'java'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

// https://plugins.gradle.org/plugin/org.springframework.boot
plugins {
id 'org.springframework.boot' version '4.0.0-RC2'
id 'org.springframework.boot' version '4.0.0'
id 'war'
id 'io.spring.dependency-management' version '1.1.7'
}
Expand All @@ -29,5 +29,5 @@ apply from: '../wlp-gradle/subprojects/maven-central-mirror.gradle'

dependencies {
implementation('org.springframework.boot:spring-boot-starter-websocket')
providedRuntime('org.springframework.boot:spring-boot-tomcat-runtime')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat-runtime')
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,75 +10,24 @@
*******************************************************************************/
package com.ibm.ws.springboot.support.fat;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.Enumeration;
import java.util.jar.JarEntry;
import java.util.jar.JarFile;
import java.util.jar.JarOutputStream;

import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;

import com.ibm.websphere.simplicity.RemoteFile;

import componenttest.annotation.MinimumJavaLevel;
import componenttest.custom.junit.runner.FATRunner;

@RunWith(FATRunner.class)
@MinimumJavaLevel(javaLevel = 17)
public abstract class ValidationAbstractTests extends AbstractSpringTests {

@BeforeClass
public static void modifyTestApp() {
try {
RemoteFile rFile = server.getFileFromLibertyServerRoot("apps/" + SPRING_BOOT_40_APP_VALIDATION);
File f = new File(rFile.getAbsolutePath());
removeLibProvided(f);
} catch (Exception e) {
throw new RuntimeException(e);
}
}

private static void removeLibProvided(File f) throws IOException {
try (JarFile jarFile = new JarFile(f);
JarOutputStream jarOutputStream = new JarOutputStream(new FileOutputStream(new File(f.getParentFile(), getModifiedApplicationName())))) {
Enumeration<JarEntry> entries = jarFile.entries();
while (entries.hasMoreElements()) {
JarEntry originalEntry = entries.nextElement();
JarEntry newEntry = originalEntry;
String entryName = originalEntry.getName();
if (entryName.startsWith("WEB-INF/lib-provided/")) {
// remove all content of lib-provided
continue;
}
jarOutputStream.putNextEntry(newEntry);
byte[] buffer = new byte[1024];
int bytesRead;
try (InputStream entryIn = jarFile.getInputStream(originalEntry)) {
while ((bytesRead = entryIn.read(buffer)) != -1) {
jarOutputStream.write(buffer, 0, bytesRead);
}
}
}
}
}

private static String getModifiedApplicationName() {
return "provided.removed." + SPRING_BOOT_40_APP_VALIDATION;
}

@Before
public void setDefaultPort() {
server.setHttpDefaultPort(DEFAULT_HTTP_PORT);
}

@Override
public String getApplication() {
return getModifiedApplicationName();
return SPRING_BOOT_40_APP_VALIDATION;
}

@Override
Expand Down