Skip to content

Commit

Permalink
polish #2524
Browse files Browse the repository at this point in the history
  • Loading branch information
hengyunabc committed Jan 2, 2024
1 parent fee635f commit 6b38b6a
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 24 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ jobs:
- name: Setup java
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'maven'
java-version: ${{ matrix.java }}
distribution: "zulu"
cache: "maven"
- name: Build with Maven
run: mvn clean package -P full
run: mvn clean install -P full

windows_build:
runs-on: windows-2019
Expand All @@ -29,11 +29,11 @@ jobs:
- name: Setup java
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'maven'
java-version: ${{ matrix.java }}
distribution: "zulu"
cache: "maven"
- name: Build with Maven
run: mvn clean package -P full
run: mvn clean install -P full

macos_build:
runs-on: macos-latest
Expand All @@ -45,8 +45,8 @@ jobs:
- name: Setup java
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
distribution: 'zulu'
cache: 'maven'
java-version: ${{ matrix.java }}
distribution: "zulu"
cache: "maven"
- name: Build with Maven
run: mvn clean package -P full
run: mvn clean install -P full
20 changes: 19 additions & 1 deletion arthas-spring-boot-starter/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
<name>${project.artifactId}</name>
<url>https://github.com/alibaba/arthas</url>

<properties>
<it.pom.includes>*/pom.xml</it.pom.includes>
</properties>

<dependencyManagement>
<dependencies>
<dependency>
Expand Down Expand Up @@ -64,6 +68,19 @@
</dependency>
</dependencies>

<profiles>
<profile>
<id>jdk-lt-17</id>
<activation>
<jdk>[1.8,17)</jdk>
</activation>
<properties>
<!-- spring boot3 测试只支持 jdk 17 及之后版本 -->
<it.pom.includes>arthas-spring-boot-starter-example/pom.xml</it.pom.includes>
</properties>
</profile>
</profiles>

<build>
<plugins>
<plugin>
Expand All @@ -79,12 +96,13 @@
<streamLogs>true</streamLogs>
<preBuildHookScript>setup</preBuildHookScript>
<postBuildHookScript>verify</postBuildHookScript>
<pomIncludes><pomInclude>${it.pom.includes}</pomInclude></pomIncludes>
</configuration>
<executions>
<execution>
<id>integration-test</id>
<phase>test</phase>
<goals>
<goal>install</goal>
<goal>run</goal>
</goals>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,17 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>@spring-boot.version@</version>
<version>@spring-boot3.version@</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<groupId>com.example</groupId>
<artifactId>arthas-spring-boot-starter-example</artifactId>
<artifactId>arthas-spring-boot3-starter-example</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>arthas-spring-boot-starter-example</name>
<name>arthas-spring-boot3-starter-example</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>
<java.version>17</java.version>
</properties>

<dependencies>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package com.example.arthasspringbootstarterexample;
package com.example.arthasspringboot3starterexample;

import java.util.concurrent.TimeUnit;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class ArthasSpringBootStarterExampleApplication {
public class ArthasSpringBoot3StarterExampleApplication {

public static void main(String[] args) throws InterruptedException {
SpringApplication.run(ArthasSpringBootStarterExampleApplication.class, args);
SpringApplication.run(ArthasSpringBoot3StarterExampleApplication.class, args);
System.out.println("xxxxxxxxxxxxxxxxxx");
TimeUnit.SECONDS.sleep(3);
System.exit(0);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.example.arthasspringbootstarterexample;
package com.example.arthasspringbootstarterexample3;

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
class ArthasSpringBootStarterExampleApplicationTests {
class ArthasSpringBoot3StarterExampleApplicationTests {

@Test
void contextLoads() {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
com.alibaba.arthas.spring.ArthasConfiguration
com.alibaba.arthas.spring.endpoints.ArthasEndPointAutoConfiguration

0 comments on commit 6b38b6a

Please sign in to comment.