Browse Source

[Improvement][Test] Block the usage of powermock and move mockito dependencies from sub-modules to root pom (#12311)

* move mockito dependencies from sub-modules to root pom

* Add check in CI to block the usage of powermock
3.2.0-release
Eric Gao 2 years ago committed by GitHub
parent
commit
2f37da0dbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      .pre-commit-config.yaml
  2. 12
      dolphinscheduler-alert/dolphinscheduler-alert-server/pom.xml
  3. 14
      dolphinscheduler-api/pom.xml
  4. 2
      dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/LoggerServiceTest.java
  5. 8
      dolphinscheduler-bom/pom.xml
  6. 12
      dolphinscheduler-common/pom.xml
  7. 6
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/pom.xml
  8. 19
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-clickhouse/pom.xml
  9. 19
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-db2/pom.xml
  10. 7
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-hive/pom.xml
  11. 18
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-mysql/pom.xml
  12. 17
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-oracle/pom.xml
  13. 18
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-postgresql/pom.xml
  14. 17
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/pom.xml
  15. 17
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-spark/pom.xml
  16. 20
      dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-sqlserver/pom.xml
  17. 8
      dolphinscheduler-datasource-plugin/pom.xml
  18. 14
      dolphinscheduler-master/pom.xml
  19. 14
      dolphinscheduler-service/pom.xml
  20. 14
      dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/pom.xml
  21. 9
      dolphinscheduler-task-plugin/pom.xml
  22. 5
      dolphinscheduler-worker/pom.xml
  23. 13
      pom.xml

2
.pre-commit-config.yaml

@ -60,6 +60,6 @@ repos:
# Spotless Hooks # Spotless Hooks
- id: spotless - id: spotless
name: spotless lint name: spotless lint
entry: ./mvnw spotless:apply entry: ./mvnw spotless:check
language: script language: script
pass_filenames: false pass_filenames: false

12
dolphinscheduler-alert/dolphinscheduler-alert-server/pom.xml

@ -96,18 +96,6 @@
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId> <artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

14
dolphinscheduler-api/pom.xml

@ -156,12 +156,6 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.apache.curator</groupId> <groupId>org.apache.curator</groupId>
<artifactId>curator-test</artifactId> <artifactId>curator-test</artifactId>
@ -201,14 +195,6 @@
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.12.4</version>
<!-- TODO: move this dependency to root pom after removing powermock in the whole project -->
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
<testResources> <testResources>

2
dolphinscheduler-api/src/test/java/org/apache/dolphinscheduler/api/service/LoggerServiceTest.java

@ -128,8 +128,6 @@ public class LoggerServiceTest {
// success // success
taskInstance.setHost("127.0.0.1:8080"); taskInstance.setHost("127.0.0.1:8080");
taskInstance.setLogPath("/temp/log"); taskInstance.setLogPath("/temp/log");
// if use @RunWith(PowerMockRunner.class) mock object,sonarcloud will not calculate the coverage,
// so no assert will be added here
Mockito.when(logClient.getLogBytes(Mockito.anyString(), Mockito.anyInt(), Mockito.anyString())) Mockito.when(logClient.getLogBytes(Mockito.anyString(), Mockito.anyInt(), Mockito.anyString()))
.thenReturn(new byte[0]); .thenReturn(new byte[0]);
loggerService.getLogBytes(1); loggerService.getLogBytes(1);

8
dolphinscheduler-bom/pom.xml

@ -666,14 +666,6 @@
<scope>import</scope> <scope>import</scope>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.12.4</version>
<!-- TODO: remove this dependency management after removing powermock -->
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.lz4</groupId> <groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId> <artifactId>lz4-java</artifactId>

12
dolphinscheduler-common/pom.xml

@ -55,18 +55,6 @@
<groupId>com.google.guava</groupId> <groupId>com.google.guava</groupId>
<artifactId>guava</artifactId> <artifactId>guava</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.12.4</version>
<!-- TODO: move this dependency to root pom after removing powermock in the whole project -->
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>

6
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-api/pom.xml

@ -137,12 +137,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<type>jar</type>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>com.zaxxer</groupId> <groupId>com.zaxxer</groupId>

19
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-clickhouse/pom.xml

@ -15,22 +15,20 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"> 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> <parent>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-datasource-clickhouse</artifactId> <artifactId>dolphinscheduler-datasource-clickhouse</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId> <artifactId>dolphinscheduler-spi</artifactId>
@ -47,8 +45,8 @@
<artifactId>clickhouse-jdbc</artifactId> <artifactId>clickhouse-jdbc</artifactId>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>jaxb-api</artifactId>
<groupId>javax.xml.bind</groupId> <groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
</exclusion> </exclusion>
<exclusion> <exclusion>
<groupId>com.fasterxml.jackson.core</groupId> <groupId>com.fasterxml.jackson.core</groupId>
@ -69,12 +67,5 @@
<groupId>org.lz4</groupId> <groupId>org.lz4</groupId>
<artifactId>lz4-java</artifactId> <artifactId>lz4-java</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

19
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-db2/pom.xml

@ -15,22 +15,20 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"> 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> <parent>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-datasource-db2</artifactId> <artifactId>dolphinscheduler-datasource-db2</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId> <artifactId>dolphinscheduler-spi</artifactId>
@ -42,14 +40,5 @@
<artifactId>dolphinscheduler-datasource-api</artifactId> <artifactId>dolphinscheduler-datasource-api</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

7
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-hive/pom.xml

@ -322,12 +322,5 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

18
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-mysql/pom.xml

@ -15,22 +15,20 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"> 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> <parent>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-datasource-mysql</artifactId> <artifactId>dolphinscheduler-datasource-mysql</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId> <artifactId>dolphinscheduler-spi</artifactId>
@ -47,13 +45,5 @@
<groupId>mysql</groupId> <groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId> <artifactId>mysql-connector-java</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

17
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-oracle/pom.xml

@ -15,22 +15,20 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"> 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> <parent>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-datasource-oracle</artifactId> <artifactId>dolphinscheduler-datasource-oracle</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId> <artifactId>dolphinscheduler-spi</artifactId>
@ -47,12 +45,5 @@
<groupId>com.oracle.database.jdbc</groupId> <groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId> <artifactId>ojdbc8</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

18
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-postgresql/pom.xml

@ -15,22 +15,20 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"> 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> <parent>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-datasource-postgresql</artifactId> <artifactId>dolphinscheduler-datasource-postgresql</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId> <artifactId>dolphinscheduler-spi</artifactId>
@ -47,13 +45,5 @@
<groupId>org.postgresql</groupId> <groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

17
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-presto/pom.xml

@ -15,22 +15,20 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"> 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> <parent>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-datasource-presto</artifactId> <artifactId>dolphinscheduler-datasource-presto</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId> <artifactId>dolphinscheduler-spi</artifactId>
@ -45,12 +43,5 @@
<groupId>com.facebook.presto</groupId> <groupId>com.facebook.presto</groupId>
<artifactId>presto-jdbc</artifactId> <artifactId>presto-jdbc</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

17
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-spark/pom.xml

@ -15,22 +15,20 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"> 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> <parent>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-datasource-spark</artifactId> <artifactId>dolphinscheduler-datasource-spark</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name>
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-spi</artifactId> <artifactId>dolphinscheduler-spi</artifactId>
@ -53,12 +51,5 @@
<artifactId>dolphinscheduler-datasource-api</artifactId> <artifactId>dolphinscheduler-datasource-api</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<type>jar</type>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

20
dolphinscheduler-datasource-plugin/dolphinscheduler-datasource-sqlserver/pom.xml

@ -15,20 +15,18 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
<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"> 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> <parent>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-datasource-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-datasource-sqlserver</artifactId> <artifactId>dolphinscheduler-datasource-sqlserver</artifactId>
<name>${project.artifactId}</name>
<packaging>jar</packaging> <packaging>jar</packaging>
<name>${project.artifactId}</name>
<dependencies> <dependencies>
<dependency> <dependency>
@ -47,18 +45,10 @@
<artifactId>mssql-jdbc</artifactId> <artifactId>mssql-jdbc</artifactId>
<exclusions> <exclusions>
<exclusion> <exclusion>
<artifactId>azure-keyvault</artifactId>
<groupId>com.microsoft.azure</groupId> <groupId>com.microsoft.azure</groupId>
<artifactId>azure-keyvault</artifactId>
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

8
dolphinscheduler-datasource-plugin/pom.xml

@ -65,13 +65,5 @@
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-common</artifactId> <artifactId>dolphinscheduler-common</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.12.4</version>
<!-- TODO: move this dependency to root pom after removing powermock in the whole project -->
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

14
dolphinscheduler-master/pom.xml

@ -247,11 +247,6 @@
</exclusion> </exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
@ -268,15 +263,6 @@
<groupId>org.springframework.cloud</groupId> <groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId> <artifactId>spring-cloud-starter-kubernetes-fabric8-config</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.12.4</version>
<!-- TODO: move this dependency to root pom after removing powermock in the whole project -->
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>

14
dolphinscheduler-service/pom.xml

@ -63,20 +63,6 @@
<artifactId>dolphinscheduler-task-api</artifactId> <artifactId>dolphinscheduler-task-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.12.4</version>
<!-- TODO: move this dependency to root pom after removing powermock in the whole project -->
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>com.cronutils</groupId> <groupId>com.cronutils</groupId>
<artifactId>cron-utils</artifactId> <artifactId>cron-utils</artifactId>

14
dolphinscheduler-task-plugin/dolphinscheduler-task-pigeon/pom.xml

@ -15,17 +15,16 @@
~ See the License for the specific language governing permissions and ~ See the License for the specific language governing permissions and
~ limitations under the License. ~ limitations under the License.
--> -->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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"> 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> <parent>
<artifactId>dolphinscheduler-task-plugin</artifactId>
<groupId>org.apache.dolphinscheduler</groupId> <groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-task-plugin</artifactId>
<version>dev-SNAPSHOT</version> <version>dev-SNAPSHOT</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>dolphinscheduler-task-pigeon</artifactId> <artifactId>dolphinscheduler-task-pigeon</artifactId>
<packaging>jar</packaging> <packaging>jar</packaging>
<dependencies> <dependencies>
@ -82,10 +81,5 @@
<groupId>org.apache.httpcomponents</groupId> <groupId>org.apache.httpcomponents</groupId>
<artifactId>httpcore</artifactId> <artifactId>httpcore</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
</project> </project>

9
dolphinscheduler-task-plugin/pom.xml

@ -78,13 +78,4 @@
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
<dependencies>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>3.12.4</version>
<!-- TODO: move this dependency to root pom after removing powermock in the whole project -->
<scope>test</scope>
</dependency>
</dependencies>
</project> </project>

5
dolphinscheduler-worker/pom.xml

@ -90,11 +90,6 @@
<groupId>com.amazonaws</groupId> <groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk-s3</artifactId> <artifactId>aws-java-sdk-s3</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>

13
pom.xml

@ -63,7 +63,7 @@
<spring.boot.version>2.6.1</spring.boot.version> <spring.boot.version>2.6.1</spring.boot.version>
<java.version>1.8</java.version> <java.version>1.8</java.version>
<junit.version>5.9.0</junit.version> <junit.version>5.9.0</junit.version>
<mockito.version>3.9.0</mockito.version> <mockito.version>3.12.4</mockito.version>
<spotbugs.version>3.1.12</spotbugs.version> <spotbugs.version>3.1.12</spotbugs.version>
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version> <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
<maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version> <maven-assembly-plugin.version>3.3.0</maven-assembly-plugin.version>
@ -331,6 +331,12 @@
<version>${mockito.version}</version> <version>${mockito.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>${mockito.version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.mockito</groupId> <groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId> <artifactId>mockito-junit-jupiter</artifactId>
@ -648,6 +654,11 @@
<searchRegex>import\s+[^\*\s]+\*;(\r\n|\r|\n)</searchRegex> <searchRegex>import\s+[^\*\s]+\*;(\r\n|\r|\n)</searchRegex>
<replacement>$1</replacement> <replacement>$1</replacement>
</replaceRegex> </replaceRegex>
<replaceRegex>
<name>Block powermock</name>
<searchRegex>import\s+org\.powermock\.[^\*\s]*(|\*);(\r\n|\r|\n)</searchRegex>
<replacement>$1</replacement>
</replaceRegex>
</java> </java>
<pom> <pom>
<sortPom> <sortPom>

Loading…
Cancel
Save