From bb53fde97845aff0a2a2dfd7cbb77fba21dfc316 Mon Sep 17 00:00:00 2001 From: Albumen Kevin Date: Tue, 8 Nov 2022 18:48:48 +0800 Subject: [PATCH] Add dependencies check (#10896) --- .github/workflows/build-and-test-pr.yml | 16 +++ .licenserc.yaml | 115 ++++++++++++++++++ .../dubbo/rpc/support/RpcUtilsTest.java | 4 +- 3 files changed, 133 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-test-pr.yml b/.github/workflows/build-and-test-pr.yml index 2d76db5fc8..28c669e39d 100644 --- a/.github/workflows/build-and-test-pr.yml +++ b/.github/workflows/build-and-test-pr.yml @@ -26,6 +26,22 @@ jobs: uses: apache/skywalking-eyes@main env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: "Set up JDK 17" + uses: actions/setup-java@v3 + with: + distribution: 'zulu' + java-version: 17 + - name: "Compile Dubbo (Linux)" + run: | + ./mvnw --batch-mode --no-snapshot-updates -e --no-transfer-progress --fail-fast -T 2C clean install -DskipTests=true -DskipIntegrationTests=true -Dcheckstyle.skip=true -Dcheckstyle_unix.skip=true -Drat.skip=true -Dmaven.javadoc.skip=true + - name: Check Dependencies' License + uses: apache/skywalking-eyes/dependency@main + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + config: .licenserc.yaml + mode: check + build-source: runs-on: ubuntu-latest outputs: diff --git a/.licenserc.yaml b/.licenserc.yaml index 00b7286672..fcbf54b12b 100644 --- a/.licenserc.yaml +++ b/.licenserc.yaml @@ -80,3 +80,118 @@ header: comment: on-failure license-location-threshold: 130 + +dependency: + files: + - pom.xml + - dubbo-dependencies-bom/pom.xml + licenses: + - name: com.alibaba.spring:spring-context-support + license: Apache-2.0 + - name: com.fasterxml.jackson.core:jackson-annotations + license: Apache-2.0 + - name: com.fasterxml.jackson.core:jackson-core + license: Apache-2.0 + - name: com.fasterxml.jackson.core:jackson-databind + license: Apache-2.0 + - name: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml + license: Apache-2.0 + - name: com.fasterxml.jackson.datatype:jackson-datatype-jsr310 + license: Apache-2.0 + - name: com.google.code.gson:gson + license: Apache-2.0 + - name: com.google.guava:listenablefuture + license: Apache-2.0 + - name: com.salesforce.servicelibs:grpc-contrib + license: BSD 3-clause + - name: com.squareup.okhttp3:logging-interceptor + license: Apache-2.0 + - name: com.squareup.okhttp3:okhttp + license: Apache-2.0 + - name: com.squareup.okio:okio + license: Apache-2.0 + - name: com.sun.xml.fastinfoset:FastInfoset + license: Apache-2.0 + - name: io.envoyproxy.controlplane:api + license: Apache-2.0 + - name: io.swagger:swagger-annotations + license: Apache-2.0 + - name: io.swagger:swagger-models + license: Apache-2.0 + - name: org.springframework.boot:spring-boot + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-actuator + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-autoconfigure + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-configuration-processor + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter-actuator + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter-logging + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter-tomcat + license: Apache-2.0 + - name: org.springframework.boot:spring-boot-starter-web + license: Apache-2.0 + - name: org.slf4j:slf4j-api + license: MIT + - name: org.slf4j:slf4j-log4j12 + license: MIT + - name: org.jboss.resteasy:resteasy-jaxrs + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-client + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-netty4 + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-jdk-http + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-jackson-provider + license: Apache-2.0 + - name: org.jboss.resteasy:resteasy-jaxb-provider + license: Apache-2.0 + - name: net.jcip:jcip-annotations + license: Apache-2.0 + - name: org.apache.zookeeper:zookeeper + license: Apache-2.0 + - name: org.apache.zookeeper:zookeeper-jute + license: Apache-2.0 + - name: net.bytebuddy:byte-buddy + license: Apache-2.0 + - name: javax.enterprise:cdi-api + license: Apache-2.0 + - name: org.codehaus.plexus:plexus-component-annotations + license: Apache-2.0 + - name: org.slf4j:jcl-over-slf4j + license: Apache-2.0 + - name: org.slf4j:jul-to-slf4j + license: Apache-2.0 + # multi license + - name: org.javassist:javassist + license: Apache-2.0 + - name: javax.annotation:javax.annotation-api + license: CDDL-1.0 + - name: com.salesforce.servicelibs:jprotoc + license: CDDL-1.0 + - name: org.checkerframework:checker-compat-qual + license: MIT + - name: ch.qos.logback:logback-classic + license: EPL-1.0 + - name: ch.qos.logback:logback-core + license: EPL-1.0 + - name: javax.servlet:javax.servlet-api + license: CDDL-1.1 + - name: com.sun.activation:javax.activation + license: CDDL-1.1 + - name: javax.activation:activation + license: CDDL-1.1 + - name: jakarta.annotation:jakarta.annotation-api + license: EPL-2.0 + - name: org.glassfish:jakarta.el + license: EPL-2.0 + - name: org.jboss.spec.javax.annotation:jboss-annotations-api_1.2_spec + license: CDDL-1.1 + excludes: + - name: javax.xml.bind:jsr173_api diff --git a/dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/support/RpcUtilsTest.java b/dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/support/RpcUtilsTest.java index a6748a74d8..f93d896c22 100644 --- a/dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/support/RpcUtilsTest.java +++ b/dubbo-rpc/dubbo-rpc-api/src/test/java/org/apache/dubbo/rpc/support/RpcUtilsTest.java @@ -370,8 +370,8 @@ public class RpcUtilsTest { Assertions.assertNotNull(parameterTypes5); Assertions.assertEquals(3, parameterTypes5.length); Assertions.assertEquals(String.class, parameterTypes5[0]); - Assertions.assertEquals(String.class, parameterTypes5[1]); - Assertions.assertEquals(String.class, parameterTypes5[2]); + Assertions.assertEquals(void.class, parameterTypes5[1]); + Assertions.assertEquals(Object.class, parameterTypes5[2]); } @ParameterizedTest