-
Notifications
You must be signed in to change notification settings - Fork 91
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
<springBootApplication/> issue fix #1844
Open
arunvenmany-ibm
wants to merge
2
commits into
OpenLiberty:main
Choose a base branch
from
arunvenmany-ibm:spring-boot-application-node-bug-fix
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,8 +48,9 @@ jobs: | |
- name: Checkout ci.common | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: OpenLiberty/ci.common | ||
repository: arunvenmany-ibm/ci.common | ||
path: ci.common | ||
ref: spring-boot-application-node-bug-fix | ||
- name: Checkout ci.ant | ||
uses: actions/checkout@v3 | ||
with: | ||
|
@@ -102,7 +103,7 @@ jobs: | |
- name: Clone ci.ant, ci.common, ci.maven repos to C drive | ||
run: | | ||
cp -r D:/a/ci.maven/ci.maven C:/ci.maven | ||
git clone https://github.com/OpenLiberty/ci.common.git C:/ci.common | ||
git clone https://github.com/arunvenmany-ibm/ci.common.git --branch spring-boot-application-node-bug-fix --single-branch C:/ci.common | ||
git clone https://github.com/OpenLiberty/ci.ant.git C:/ci.ant | ||
- name: Set up Maven | ||
uses: stCarolas/[email protected] | ||
|
1 change: 1 addition & 0 deletions
1
...c/it/springboot-3-deploy-multiple-springboot-application-nodes-fail-it/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.buildResult = failure |
128 changes: 128 additions & 0 deletions
128
...n-plugin/src/it/springboot-3-deploy-multiple-springboot-application-nodes-fail-it/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,128 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>io.openliberty.tools.it</groupId> | ||
<artifactId>tests</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</parent> | ||
|
||
<artifactId>springboot-3-deploy-multiple-springboot-application-nodes-fail-it</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.13.1</version> | ||
<scope>test</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
<version>2.14.0</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<!-- Test support for classifier configuration parameter --> | ||
<configuration> | ||
<classifier>exec</classifier> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>io.openliberty.tools</groupId> | ||
<artifactId>liberty-maven-plugin</artifactId> | ||
<version>@pom.version@</version> | ||
<configuration> | ||
<assemblyArtifact> | ||
<groupId>${runtimeGroupId}</groupId> | ||
<artifactId>${runtimeKernelId}</artifactId> | ||
<version>${runtimeVersion}</version> | ||
<type>zip</type> | ||
</assemblyArtifact> | ||
<serverName>test</serverName> | ||
<serverXmlFile>src/test/resources/server.xml</serverXmlFile> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>install-liberty-server</id> | ||
<phase>compile</phase> | ||
<goals> | ||
<goal>install-server</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>create-server</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>create</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>install-feature</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>install-feature</goal> | ||
</goals> | ||
<configuration> | ||
<features> | ||
<acceptLicense>true</acceptLicense> | ||
</features> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>3.1.2</version> | ||
<configuration> | ||
<workingDirectory>${project.build.directory}</workingDirectory> | ||
<argLine>-enableassertions</argLine> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>integration-test</id> | ||
<goals> | ||
<goal>integration-test</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>verify</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>verify</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-surefire-plugin</artifactId> | ||
<version>3.1.2</version> | ||
<configuration> | ||
<skip>true</skip> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
7 changes: 7 additions & 0 deletions
7
...boot-3-deploy-multiple-springboot-application-nodes-fail-it/src/test/resources/server.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<server description="default server"> | ||
<featureManager> | ||
<feature>appSecurityClient-1.0</feature> | ||
<feature>jaxws</feature> | ||
<platform>badname</platform> | ||
</featureManager> | ||
</server> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,9 @@ public void testThinApplicationExistsInAppsDirectory() throws Exception { | |
|
||
File f = new File("target/liberty/wlp/usr/servers/test/apps/thin-springboot-3-appsdirectory-apps-it-1.0.0.Final-exec.jar"); | ||
assertTrue(f.getCanonicalFile() + " doesn't exist. Plugin failed to place the file at right destination.", f.exists()); | ||
File f2 = new File("target/liberty/wlp/usr/servers/test/configDropins/defaults"); | ||
assertTrue(f2.getCanonicalFile() + " folder doesn't exist. Plugin failed to create the config dropins folder ", f2.exists()); | ||
assertTrue(f2.getCanonicalFile() + " folder doesn't contain any files. Plugin failed to place config xml at right destination.", f2.list().length == 1); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we verify the contents of the generated file? |
||
} | ||
|
||
@Test | ||
|
172 changes: 172 additions & 0 deletions
172
...rc/it/springboot-3-tests/springboot-3-appsdirectory-server-xml-springboot-node-it/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>springboot-3-appsdirectory-server-xml-springboot-node-it</artifactId> | ||
<version>1.0.0.Final</version> | ||
<packaging>jar</packaging> | ||
|
||
<parent> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-parent</artifactId> | ||
<version>3.1.3</version> | ||
<relativePath /> <!-- lookup parent from repository --> | ||
</parent> | ||
|
||
<properties> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<maven.compiler.source>17</maven.compiler.source> | ||
<maven.compiler.target>17</maven.compiler.target> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-web</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.13.2</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<!-- Support for JDK 9 and above--> | ||
<dependency> | ||
<groupId>javax.xml.bind</groupId> | ||
<artifactId>jaxb-api</artifactId> | ||
<version>2.3.1</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.sun.xml.bind</groupId> | ||
<artifactId>jaxb-core</artifactId> | ||
<version>2.3.0.1</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.activation</groupId> | ||
<artifactId>activation</artifactId> | ||
<version>1.1.1</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-maven-plugin</artifactId> | ||
<!-- Test support for classifier configuration parameter --> | ||
<configuration> | ||
<classifier>exec</classifier> | ||
</configuration> | ||
</plugin> | ||
|
||
<plugin> | ||
<groupId>io.openliberty.tools</groupId> | ||
<artifactId>liberty-maven-plugin</artifactId> | ||
<version>@pom.version@</version> | ||
|
||
<!-- Specify configuration, executions for liberty-maven-plugin --> | ||
<configuration> | ||
<serverName>test</serverName> | ||
<serverXmlFile>src/test/resources/server.xml</serverXmlFile> | ||
<runtimeArtifact> | ||
<groupId>com.ibm.websphere.appserver.runtime</groupId> | ||
<artifactId>wlp-jakartaee10</artifactId> | ||
<version>23.0.0.10</version> | ||
<type>zip</type> | ||
</runtimeArtifact> | ||
<appsDirectory>apps</appsDirectory> | ||
<deployPackages>spring-boot-project</deployPackages> | ||
</configuration> | ||
|
||
<executions> | ||
<execution> | ||
<id>stop-server-before-clean</id> | ||
<phase>pre-clean</phase> | ||
<goals> | ||
<goal>stop</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>create-server</id> | ||
<phase>prepare-package</phase> | ||
<goals> | ||
<goal>install-server</goal> | ||
<goal>create</goal> | ||
<goal>install-feature</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>install-apps</id> | ||
<phase>package</phase> | ||
<goals> | ||
<goal>deploy</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>test-start-server</id> | ||
<phase>pre-integration-test</phase> | ||
<goals> | ||
<goal>test-start</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>test-stop-server</id> | ||
<phase>post-integration-test</phase> | ||
<goals> | ||
<goal>test-stop</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
|
||
<plugin> | ||
<artifactId>maven-failsafe-plugin</artifactId> | ||
<version>3.1.2</version> | ||
<configuration> | ||
<runOrder>alphabetical</runOrder> | ||
<redirectTestOutputToFile>true</redirectTestOutputToFile> | ||
<forkCount>1</forkCount> | ||
<reuseForks>true</reuseForks> | ||
<forkedProcessTimeoutInSeconds>2400</forkedProcessTimeoutInSeconds> | ||
<argLine>-enableassertions</argLine> | ||
<workingDirectory>${project.build.directory}</workingDirectory> | ||
<includes> | ||
<include>**/*IT.java</include> | ||
</includes> | ||
<systemPropertyVariables> | ||
<mavenPluginVersion>@pom.version@</mavenPluginVersion> | ||
<runtimeVersion>${runtimeVersion}</runtimeVersion> | ||
</systemPropertyVariables> | ||
<trimStackTrace>false</trimStackTrace> | ||
</configuration> | ||
<executions> | ||
<execution> | ||
<id>default-integration-test</id> | ||
<phase>integration-test</phase> | ||
<goals> | ||
<goal>integration-test</goal> | ||
</goals> | ||
</execution> | ||
<execution> | ||
<id>default-verify</id> | ||
<phase>verify</phase> | ||
<goals> | ||
<goal>verify</goal> | ||
</goals> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
</project> |
35 changes: 35 additions & 0 deletions
35
...-appsdirectory-server-xml-springboot-node-it/src/main/java/application/SpringBootApp.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/** | ||
* (C) Copyright IBM Corporation 2024. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package application; | ||
|
||
import org.springframework.boot.SpringApplication; | ||
import org.springframework.boot.autoconfigure.SpringBootApplication; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@SpringBootApplication | ||
@RestController | ||
public class SpringBootApp { | ||
public static void main(String[] args) { | ||
SpringApplication.run(SpringBootApp.class, args); | ||
} | ||
|
||
@RequestMapping("/spring") | ||
public String hello() { | ||
return "HELLO SPRING BOOT!!"; | ||
} | ||
} |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you have a bad platform name here? And I don't see multiple springBootApplication elements here which is what the test is supposed to be for.