工程设计-shardingsphere源码解读

Posted luozhonghua2000

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了工程设计-shardingsphere源码解读相关的知识,希望对你有一定的参考价值。

编译

编译-shardingsphere源码解读(1)_luozhonghua2000的博客-CSDN博客

工程

看工程设计主要从主POM坐标看起,这里主要涉及的jar依赖供应链和是否安全,是否存在漏洞

1,看坐标版本properties标签,版本和版本之间是有依赖的

2,看插件pluginManagement,这里主要是工程生成和打包规则

3,看模块设计,每个模块依赖关系,是否独立可编译

下面具体说明以上三个问题

<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You 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.
  -->

<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>org.apache</groupId>
        <artifactId>apache</artifactId>
        <version>21</version>
    </parent>
    <groupId>org.apache.shardingsphere</groupId>
    <artifactId>shardingsphere</artifactId>
    <version>5.0.0-RC1-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>$project.artifactId</name>
    
    <modules>
        <module>shardingsphere-agent</module>
        <module>shardingsphere-sql-parser</module>
        <module>shardingsphere-distsql-parser</module>
        <module>shardingsphere-db-protocol</module>
        <module>shardingsphere-infra</module>
        
        <module>shardingsphere-jdbc</module>
      <!--  <module>shardingsphere-proxy</module>-->
        
        <module>shardingsphere-features</module>
        <module>shardingsphere-scaling</module>
        <module>shardingsphere-transaction</module>
        <module>shardingsphere-governance</module>
        
        <module>shardingsphere-test</module>
        <module>shardingsphere-distribution</module>
    </modules>
    
    <properties>
        <java.version>1.8</java.version>
        <maven.version.range>[3.0.4,)</maven.version.range>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.build.locale>zh_CN</project.build.locale>
        
        <guava.version>29.0-jre</guava.version>
        <gson.version>2.8.6</gson.version>
        <slf4j.version>1.7.7</slf4j.version>
        
        <antlr4.version>4.7.2</antlr4.version>
        
        <groovy.version>2.4.19</groovy.version>
        <snakeyaml.version>1.16</snakeyaml.version>
        
        <netty.version>4.1.45.Final</netty.version>
        <commons-codec.version>1.10</commons-codec.version>
        <commons-cli.version>1.4</commons-cli.version>
        <commons-collections4.version>4.2</commons-collections4.version>
        <commons-io.version>2.8.0</commons-io.version>
        
        <javax.transaction.version>1.1</javax.transaction.version>
        <atomikos.version>4.0.6</atomikos.version>
        <seata.version>1.0.0</seata.version>
        <narayana.version>5.9.1.Final</narayana.version>
        <jboss-transaction-spi.version>7.6.0.Final</jboss-transaction-spi.version>
        <jboss-logging.version>3.2.1.Final</jboss-logging.version>
        <btm.version>2.1.3</btm.version>
        
        <curator.version>5.1.0</curator.version>
        <jetcd.version>0.5.0</jetcd.version>
        
        <lombok.version>1.18.16</lombok.version>
        
        <springframework.version>[4.3.6.RELEASE,5.0.0.M1)</springframework.version>
        <spring-boot.version>[1.5.20.RELEASE,2.0.0.M1)</spring-boot.version>
        
        <junit.version>4.12</junit.version>
        <hamcrest.version>1.3</hamcrest.version>
        <mockito.version>2.7.21</mockito.version>
        <logback.version>1.2.0</logback.version>
        
        <hikari-cp.version>3.4.2</hikari-cp.version>
        <commons-dbcp2.version>2.2.0</commons-dbcp2.version>
        <commons-pool.version>1.6</commons-pool.version>
        <h2.version>1.4.196</h2.version>
        <mysql-connector-java.version>5.1.47</mysql-connector-java.version>
        <postgresql.version>42.2.5</postgresql.version>
        <mssql.version>6.1.7.jre8-preview</mssql.version>
        <mariadb-java-client.version>2.4.2</mariadb-java-client.version>
        <bytebuddy.version>1.10.16</bytebuddy.version>
        
        <elasticjob.version>3.0.0-beta</elasticjob.version>
        
        <calcite.version>1.26.0</calcite.version>
        <embedded-mysql.version>4.6.1</embedded-mysql.version>
        <embedded-postgresql.version>2.10</embedded-postgresql.version>
        
        <!-- Plugin versions -->
        <apache-rat-plugin.version>0.12</apache-rat-plugin.version>
        <takari-maven-plugin.version>0.6.1</takari-maven-plugin.version>
        <maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
        <maven-assembly-plugin.version>3.1.0</maven-assembly-plugin.version>
        <maven-resources-plugin.version>2.7</maven-resources-plugin.version>
        <maven-jar-plugin.version>2.6</maven-jar-plugin.version>
        <maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <maven-release-plugin.version>2.5.3</maven-release-plugin.version>
        <maven-site-plugin.version>3.4</maven-site-plugin.version>
        <maven-enforcer-plugin.version>1.4</maven-enforcer-plugin.version>
        <maven-project-info-reports-plugin.version>2.8</maven-project-info-reports-plugin.version>
        <maven-plugin-plugin.version>3.4</maven-plugin-plugin.version>
        <maven-javadoc-plugin.version>2.10.3</maven-javadoc-plugin.version>
        <maven-source-plugin.version>2.4</maven-source-plugin.version>
        <maven-jxr-plugin.version>2.5</maven-jxr-plugin.version>
        <lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
        <coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
        <cobertura-maven-plugin.version>2.7</cobertura-maven-plugin.version>
        <jacoco-maven-plugin.version>0.8.5</jacoco-maven-plugin.version>
        <findbugs-maven-plugin.version>3.0.2</findbugs-maven-plugin.version>
        <maven-checkstyle-plugin.version>3.1.0</maven-checkstyle-plugin.version>
        <maven-pmd-plugin.version>3.5</maven-pmd-plugin.version>
        <jdepend-maven-plugin.version>2.0</jdepend-maven-plugin.version>
        <taglist-maven-plugin.version>2.4</taglist-maven-plugin.version>
        <os-maven-plugin.version>1.5.0.Final</os-maven-plugin.version>
        <dockerfile-maven.version>1.4.6</dockerfile-maven.version>
        <docker-compose-maven-plugin.version>4.0.0</docker-compose-maven-plugin.version>
        
        <javadocExecutable>$java.home/../bin/javadoc</javadocExecutable>
        <maven.deploy.skip>false</maven.deploy.skip>
    </properties>
    
    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy</artifactId>
                <version>$bytebuddy.version</version>
            </dependency>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>$guava.version</version>
            </dependency>
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>$gson.version</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>$slf4j.version</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jcl-over-slf4j</artifactId>
                <version>$slf4j.version</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>jul-to-slf4j</artifactId>
                <version>$slf4j.version</version>
            </dependency>
            
            <dependency>
                <groupId>org.antlr</groupId>
                <artifactId>antlr4-runtime</artifactId>
                <version>$antlr4.version</version>
            </dependency>
            
            <dependency>
                <groupId>org.codehaus.groovy</groupId>
                <artifactId>groovy</artifactId>
                <version>$groovy.version</version>
                <classifier>indy</classifier>
            </dependency>
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>$snakeyaml.version</version>
            </dependency>
            
            <dependency>
                <groupId>io.netty</groupId>
                <artifactId>netty-all</artifactId>
                <version>$netty.version</version>
            </dependency>
            <dependency>
                <groupId>commons-codec</groupId>
                <artifactId>commons-codec</artifactId>
                <version>$commons-codec.version</version>
            </dependency>
            <dependency>
                <groupId>commons-cli</groupId>
                <artifactId>commons-cli</artifactId>
                <version>$commons-cli.version</version>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-collections4</artifactId>
                <version>$commons-collections4.version</version>
            </dependency>

            <dependency>
                <groupId>org.apache.calcite</groupId>
                <artifactId>calcite-core</artifactId>
                <version>$calcite.version</version>
            </dependency>

            <dependency>
                <groupId>javax.transaction</groupId>
                <artifactId>jta</artifactId>
                <version>$javax.transaction.version</version>
            </dependency>
            <dependency>
                <groupId>com.atomikos</groupId>
                <artifactId>transactions</artifactId>
                <version>$atomikos.version</version>
            </dependency>
            <dependency>
                <groupId>com.atomikos</groupId>
                <artifactId>transactions-jta</artifactId>
                <version>$atomikos.version</version>
            </dependency>
            <dependency>
                <groupId>com.atomikos</groupId>
                <artifactId>transactions-jdbc</artifactId>
                <version>$atomikos.version</version>
            </dependency>
            
            <dependency>
                <groupId>org.jboss.narayana.jta</groupId>
                <artifactId>jta</artifactId>
                <version>$narayana.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.narayana.jts</groupId>
                <artifactId>narayana-jts-integration</artifactId>
                <version>$narayana.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss</groupId>
                <artifactId>jboss-transaction-spi</artifactId>
                <version>$jboss-transaction-spi.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>$jboss-logging.version</version>
                <scope>provided</scope>
            </dependency>
            
            <dependency>
                <groupId>org.codehaus.btm</groupId>
                <artifactId>btm</artifactId>
                <version>$btm.version</version>
                <scope>provided</scope>
            </dependency>
            
            <dependency>
                <groupId>io.seata</groupId>
                <artifactId>seata-rm-datasource</artifactId>
                <version>$seata.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>io.seata</groupId>
                <artifactId>seata-tm</artifactId>
                <version>$seata.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>io.seata</groupId>
                <artifactId>seata-codec-all</artifactId>
                <version>$seata.version</version>
                <scope>provided</scope>
            </dependency>
            
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-framework</artifactId>
                <version>$curator.version</version>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-client</artifactId>
                <version>$curator.version</version>
                <exclusions>
                    <exclusion>
                        <groupId>io.netty</groupId>
                        <artifactId>*</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-recipes</artifactId>
                <version>$curator.version</version>
            </dependency>
            <dependency>
                <groupId>io.etcd</groupId>
                <artifactId>jetcd-core</artifactId>
                <version>$jetcd.version</version>
                <exclusions>
                    <exclusion>
                        <groupId>com.google.guava</groupId>
                        <artifactId>guava</artifactId>
                    </exclusion>
                    <exclusion>
                        <groupId>com.google.android</groupId>
                        <artifactId>annotations</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-context-support</artifactId>
                <version>$springframework.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter</artifactId>
                <version>$spring-boot.version</version>
                <scope>provided</scope>
            </dependency>
            
            <dependency>
                <groupId>com.h2database</groupId>
                <artifactId>h2</artifactId>
                <version>$h2.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>mysql</groupId>
                <artifactId>mysql-connector-java</artifactId>
                <version>$mysql-connector-java.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.mariadb.jdbc</groupId>
                <artifactId>mariadb-java-client</artifactId>
                <version>$mariadb-java-client.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>org.postgresql</groupId>
                <artifactId>postgresql</artifactId>
                <version>$postgresql.version</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.microsoft.sqlserver</groupId>
                <artifactId>mssql-jdbc</artifactId>
                <version>$mssql.version</version>
                <scope>provided</scope>
            </dependency>
            
            <dependency>
                <groupId>org.projectlombok</groupId>
                <artifactId>lombok</artifactId>
                <version>$lombok.version</version>
                <scope>provided</scope>
            </dependency>
            
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-configuration-processor</artifactId>
                <version>$spring-boot.version</version>
                <scope>provided</scope>
                <optional>true</optional>
            </dependency>
            
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>$junit.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.hamcrest</groupId>
                <artifactId>hamcrest-library</artifactId>
                <version>$hamcrest.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>$mockito.version</version>
                <scope>test</scope>
                <exclusions>
                    <exclusion>
                        <groupId>org.hamcrest</groupId>
                        <artifactId>hamcrest-core</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-inline</artifactId>
                <version>$mockito.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>$logback.version</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-api</artifactId>
                    </exclusion>
                </exclusions>
                <scope>test</scope>
            </dependency>
            
            <dependency>
                <groupId>com.zaxxer</groupId>
                <artifactId>HikariCP</artifactId>
                <version>$hikari-cp.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>commons-pool</groupId>
                <artifactId>commons-pool</artifactId>
                <version>$commons-pool.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.commons</groupId>
                <artifactId>commons-dbcp2</artifactId>
                <version>$commons-dbcp2.version</version>
                <exclusions>
                    <exclusion>
                        <groupId>commons-pool</groupId>
                        <artifactId>commons-pool</artifactId>
                    </exclusion>
                </exclusions>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.apache.curator</groupId>
                <artifactId>curator-test</artifactId>
                <version>$curator.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-test</artifactId>
                <version>$springframework.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-test</artifactId>
                <version>$spring-boot.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.wix</groupId>
                <artifactId>wix-embedded-mysql</artifactId>
                <version>$embedded-mysql.version</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>ru.yandex.qatools.embed</groupId>
                <artifactId>postgresql-embedded</artifactId>
                <version>$embedded-postgresql.version</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
    
    <dependencies>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <exclusions>
                <exclusion>
                    <groupId>com.google.j2objc</groupId>
                    <artifactId>j2objc-annotations</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>jcl-over-slf4j</artifactId>
        </dependency>
        
        <dependency>
            <groupId>org.projectlombok</groupId>
            <artifactId>lombok</artifactId>
        </dependency>
        
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hamcrest</groupId>
            <artifactId>hamcrest-library</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-inline</artifactId>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
        </dependency>
    </dependencies>
    
    <build>
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>$os-maven-plugin.version</version>
            </extension>
        </extensions>
        <pluginManagement>
            <plugins>
                <!-- mvn -N io.takari:maven:wrapper -Dmaven=3.5.4 -->
                <plugin>
                    <groupId>io.takari</groupId>
                    <artifactId>maven</artifactId>
                    <version>$takari-maven-plugin.version</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <configuration>
                        <source>$java.version</source>
                        <target>$java.version</target>
                        <testSource>$java.version</testSource>
                        <testTarget>$java.version</testTarget>
                    </configuration>
                    <version>$maven-compiler-plugin.version</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>$maven-resources-plugin.version</version>
                </plugin>
                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <version>$spring-boot.version</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>$maven-jar-plugin.version</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>$maven-deploy-plugin.version</version>
                    <configuration>
                        <skip>$maven.deploy.skip</skip>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>$maven-release-plugin.version</version>
                    <configuration>
                        <tagNameFormat>@project.version</tagNameFormat>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>$maven-assembly-plugin.version</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>$maven-site-plugin.version</version>
                    <configuration>
                        <locales>$project.build.locale</locales>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.eclipse.m2e</groupId>
                    <artifactId>lifecycle-mapping</artifactId>
                    <version>$lifecycle-mapping.version</version>
                    <configuration>
                        <lifecycleMappingMetadata>
                            <pluginExecutions>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-enforcer-plugin</artifactId>
                                        <versionRange>[1.0.0,)</versionRange>
                                        <goals>
                                            <goal>enforce</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                                <pluginExecution>
                                    <pluginExecutionFilter>
                                        <groupId>org.apache.maven.plugins</groupId>
                                        <artifactId>maven-plugin-plugin</artifactId>
                                        <versionRange>[1.0.0,)</versionRange>
                                        <goals>
                                            <goal>descriptor</goal>
                                        </goals>
                                    </pluginExecutionFilter>
                                    <action>
                                        <ignore />
                                    </action>
                                </pluginExecution>
                            </pluginExecutions>
                        </lifecycleMappingMetadata>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>$maven-plugin-plugin.version</version>
                    <configuration>
                        <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
                    </configuration>
                    <executions>
                        <execution>
                            <id>default-descriptor</id>
                            <phase>process-classes</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>$maven-javadoc-plugin.version</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>$maven-source-plugin.version</version>
                </plugin>
                <plugin>
                    <groupId>org.antlr</groupId>
                    <artifactId>antlr4-maven-plugin</artifactId>
                    <version>$antlr4.version</version>
                </plugin>
                <plugin>
                    <groupId>com.spotify</groupId>
                    <artifactId>dockerfile-maven-plugin</artifactId>
                    <version>$dockerfile-maven.version</version>
                </plugin>
                <plugin>
                    <groupId>com.dkanejs.maven.plugins</groupId>
                    <artifactId>docker-compose-maven-plugin</artifactId>
                    <version>$docker-compose-maven-plugin.version</version>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <id>attach-javadocs</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <aggregate>true</aggregate>
                    <charset>$project.build.sourceEncoding</charset>
                    <encoding>$project.build.sourceEncoding</encoding>
                    <docencoding>$project.build.sourceEncoding</docencoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <version>$maven-enforcer-plugin.version</version>
                <executions>
                    <execution>
                        <id>enforce-banned-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>$maven.version.range</version>
                                </requireMavenVersion>
                                <requireJavaVersion>
                                    <version>$java.version</version>
                                </requireJavaVersion>
                            </rules>
                            <fail>true</fail>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>$maven-checkstyle-plugin.version</version>
                <configuration>
                    <configLocation>src/resources/checkstyle_ci.xml</configLocation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <excludes>**/autogen/**/*</excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>validate</id>
                        <phase>validate</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.eluder.coveralls</groupId>
                <artifactId>coveralls-maven-plugin</artifactId>
                <version>$coveralls-maven-plugin.version</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>$cobertura-maven-plugin.version</version>
                <configuration>
                    <check>
                        <branchRate>70</branchRate>
                        <lineRate>70</lineRate>
                        <haltOnFailure>true</haltOnFailure>
                        <totalBranchRate>70</totalBranchRate>
                        <totalLineRate>70</totalLineRate>
                        <packageLineRate>70</packageLineRate>
                        <packageBranchRate>70</packageBranchRate>
                    </check>
                    <aggregate>true</aggregate>
                    <encoding>$project.build.sourceEncoding</encoding>
                    <quiet>true</quiet>
                    <format>xml</format>
                    <instrumentation>
                        <ignoreTrivial>true</ignoreTrivial>
                        <ignoreMethodAnnotations>
                            <ignoreMethodAnnotation>lombok.Generated</ignoreMethodAnnotation>
                        </ignoreMethodAnnotations>
                        <excludes>
                            <exclude>org/apache/shardingsphere/**/autogen/*.class</exclude>
                            <exclude>org/apache/shardingsphere/**/*Test.class</exclude>
                            <exclude>org/apache/shardingsphere/test/**/*.class</exclude>
                            <exclude>org/apache/shardingsphere/proxy/Bootstrap.class</exclude>
                        </excludes>
                    </instrumentation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>$jacoco-maven-plugin.version</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>report</id>
                        <phase>test</phase>
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.rat</groupId>
                <artifactId>apache-rat-plugin</artifactId>
                <version>$apache-rat-plugin.version</version>
                <configuration>
                    <excludes>
                        <exclude>**/gen/**</exclude>
                        <exclude>**/target/**</exclude>
                        <exclude>**/logs/**</exclude>
                        <exclude>**/*.log</exclude>
                        <exclude>**/*.tokens</exclude>
                        <!-- IDE files -->
                        <exclude>**/*.iml</exclude>
                        <exclude>**/.idea/**</exclude>
                        <exclude>**/*.classpath</exclude>
                        <exclude>**/.project</exclude>
                        <exclude>**/.settings/**</exclude>
                        <exclude>**/dependency-reduced-pom.xml</exclude>
                        <!-- git files -->
                        <exclude>**/.gitignore</exclude>
                        <exclude>**/.gitmodules</exclude>
                        <exclude>**/.git/**</exclude>
                        <!-- CI files -->
                        <exclude>**/.travis.yml</exclude>
                        <exclude>**/.codecov.yml</exclude>
                        <exclude>**/.mvn/jvm.config</exclude>
                        <exclude>**/.mvn/wrapper/maven-wrapper.properties</exclude>
                        <!-- GitHub files -->
                        <exclude>**/.github/**</exclude>
                        <!-- document files -->
                        <exclude>**/*.md</exclude>
                        <excldue>**/*.MD</excldue>
                        <exclude>**/*.txt</exclude>
                        <exclude>**/docs/**</exclude>
                        <!-- UI files -->
                        <exclude>**/.babelrc</exclude>
                        <exclude>**/.editorconfig</exclude>
                        <exclude>**/.eslintignore</exclude>
                        <exclude>**/package.json</exclude>
                        <exclude>**/assets/**</exclude>
                        <exclude>**/dist/**</exclude>
                        <exclude>**/etc/**</exclude>
                        <exclude>**/node/**</exclude>
                        <exclude>**/node_modules/**</exclude>
                        <exclude>**/test/coverage/**</exclude>
                        <exclude>**/package-lock.json</exclude>
                        <!-- example files -->
                        <exclude>/examples/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <phase>verify</phase>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>$maven-project-info-reports-plugin.version</version>
                <configuration>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>$maven-javadoc-plugin.version</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <charset>$project.build.sourceEncoding</charset>
                    <encoding>$project.build.sourceEncoding</encoding>
                    <docencoding>$project.build.sourceEncoding</docencoding>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>$maven-jxr-plugin.version</version>
                <reportSets>
                    <reportSet>
                        <id>aggregate</id>
                        <inherited>false</inherited>
                        <reports>
                            <report>aggregate</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>$findbugs-maven-plugin.version</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <effort>Max</effort>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>$maven-checkstyle-plugin.version</version>
                <configuration>
                    <configLocation>src/resources/checkstyle.xml</configLocation>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <excludes>**/autogen/**/*</excludes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>$maven-pmd-plugin.version</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <sourceEncoding>$project.build.sourceEncoding</sourceEncoding>
                    <targetJdk>$java.version</targetJdk>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
                <version>$jdepend-maven-plugin.version</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>$taglist-maven-plugin.version</version>
                <configuration>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
        </plugins>
    </reporting>
    
<!--    <url>http://shardingsphere.apache.org</url>
    <description>Distributed database ecosphere</description>
    <licenses>
        <license>
            <name>Apache License 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    -->
   <!-- <scm>
        <connection>scm:git:https://github.com/apache/shardingsphere.git</connection>
        <developerConnection>scm:git:https://github.com/apache/shardingsphere.git</developerConnection>
        <url>https://github.com/apache/shardingsphere.git</url>
      <tag>HEAD</tag>
    </scm>
    
    <mailingLists>
        <mailingList>
            <name>ShardingSphere Developer List</name>
            <post>dev@shardingsphere.apache.org</post>
            <subscribe>dev-subscribe@shardingsphere.apache.org</subscribe>
            <unsubscribe>dev-unsubscribe@shardingsphere.apache.org</unsubscribe>
        </mailingList>
    </mailingLists>-->
</project>

供应链jar是否存在安全漏洞

看1主要依赖库,2其次依赖库

 这些版本很低,肯定存在漏洞

插件管理pluginManagement

工程中几个重要的插件

javadoc生产自动化本地api

antlr4处理sql词法语法树

docker编排插件

 

看模块设计

重点模块说明

shardingsphere-db-protocol  协议层封装,异构数据库在此设计
shardingsphere-sql-parser 解析引擎,方言处理在此,可扩张其他数据库方言
shardingsphere-distsql-parser SQL处理,是parser的配套
shardingsphere-jdbc jdbc分片,很多项目不需要智能处理,仅可用此模块
shardingsphere-transaction 分布式事物组件封装,不同的事物协议在此设计

具体每个模块怎么设计,怎么实现,基于哪些原理,使用了设计模式在以后的文章输出,有兴趣关注我,成为我的粉丝将获得专业指导。

以上是关于工程设计-shardingsphere源码解读的主要内容,如果未能解决你的问题,请参考以下文章

TypeScript 源码详细解读词法1-字符处理

Hive 源码解读 Driver 将 HQL 语句转换为 AST

Hive 源码解读 Driver 将 HQL 语句转换为 AST

Hive 源码解读 Driver 将 HQL 语句转换为 AST

Nebula Graph 源码解读系列 | Vol.02 详解 Validator

(高级)ShardingSphere源码解析-SQL路由