|
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 | <project xmlns="http://maven.apache.org/POM/4.0.0" |
3 | | - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
4 | | - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
5 | | - <parent> |
6 | | - <artifactId>chunjun-connectors</artifactId> |
7 | | - <groupId>com.dtstack.chunjun</groupId> |
8 | | - <version>1.12-SNAPSHOT</version> |
9 | | - </parent> |
10 | | - <modelVersion>4.0.0</modelVersion> |
| 3 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 4 | + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 5 | + <parent> |
| 6 | + <artifactId>chunjun-connectors</artifactId> |
| 7 | + <groupId>com.dtstack.chunjun</groupId> |
| 8 | + <version>1.12-SNAPSHOT</version> |
| 9 | + </parent> |
| 10 | + <modelVersion>4.0.0</modelVersion> |
11 | 11 |
|
12 | | - <artifactId>chunjun-connector-kafka</artifactId> |
| 12 | + <artifactId>chunjun-connector-kafka</artifactId> |
13 | 13 | <name>ChunJun : Connectors : Kafka</name> |
14 | 14 |
|
15 | | - <dependencies> |
16 | | - <dependency> |
17 | | - <groupId>org.apache.flink</groupId> |
18 | | - <artifactId>flink-connector-kafka_${scala.binary.version}</artifactId> |
19 | | - <version>${flink.version}</version> |
20 | | - <exclusions> |
21 | | - <exclusion> |
22 | | - <artifactId>flink-core</artifactId> |
23 | | - <groupId>org.apache.flink</groupId> |
24 | | - </exclusion> |
25 | | - </exclusions> |
26 | | - </dependency> |
| 15 | + <dependencies> |
| 16 | + <dependency> |
| 17 | + <groupId>org.apache.flink</groupId> |
| 18 | + <artifactId>flink-connector-kafka_${scala.binary.version}</artifactId> |
| 19 | + <version>${flink.version}</version> |
| 20 | + <exclusions> |
| 21 | + <exclusion> |
| 22 | + <artifactId>flink-core</artifactId> |
| 23 | + <groupId>org.apache.flink</groupId> |
| 24 | + </exclusion> |
| 25 | + </exclusions> |
| 26 | + </dependency> |
27 | 27 |
|
28 | 28 | <dependency> |
29 | 29 | <groupId>com.pingcap.ticdc.cdc</groupId> |
30 | 30 | <artifactId>ticdc-decoder</artifactId> |
31 | 31 | <version>5.2.0-SNAPSHOT</version> |
32 | | - <exclusions> |
33 | | - <exclusion> |
34 | | - <groupId>com.alibaba</groupId> |
35 | | - <artifactId>fastjson</artifactId> |
36 | | - </exclusion> |
37 | | - </exclusions> |
| 32 | + <exclusions> |
| 33 | + <exclusion> |
| 34 | + <groupId>com.alibaba</groupId> |
| 35 | + <artifactId>fastjson</artifactId> |
| 36 | + </exclusion> |
| 37 | + </exclusions> |
38 | 38 | </dependency> |
39 | 39 |
|
40 | | - <dependency> |
41 | | - <groupId>com.alibaba</groupId> |
42 | | - <artifactId>fastjson</artifactId> |
43 | | - <version>1.2.79</version> |
44 | | - </dependency> |
| 40 | + <dependency> |
| 41 | + <groupId>com.alibaba</groupId> |
| 42 | + <artifactId>fastjson</artifactId> |
| 43 | + <version>1.2.79</version> |
| 44 | + </dependency> |
45 | 45 |
|
46 | 46 | <dependency> |
47 | 47 | <groupId>org.apache.flink</groupId> |
|
54 | 54 | <artifactId>avro</artifactId> |
55 | 55 | <version>1.10.0</version> |
56 | 56 | </dependency> |
57 | | - </dependencies> |
| 57 | + </dependencies> |
58 | 58 |
|
59 | | - <build> |
60 | | - <plugins> |
61 | | - <plugin> |
62 | | - <groupId>org.apache.maven.plugins</groupId> |
63 | | - <artifactId>maven-shade-plugin</artifactId> |
| 59 | + <build> |
| 60 | + <plugins> |
| 61 | + <plugin> |
| 62 | + <groupId>org.apache.maven.plugins</groupId> |
| 63 | + <artifactId>maven-shade-plugin</artifactId> |
64 | 64 | <version>3.2.4</version> |
65 | 65 | <executions> |
66 | 66 | <execution> |
|
70 | 70 | </goals> |
71 | 71 | <configuration> |
72 | 72 | <createDependencyReducedPom>false</createDependencyReducedPom> |
73 | | - <relocations> |
74 | | - <relocation> |
75 | | - <pattern>com.alibaba.fastjson</pattern> |
76 | | - <shadedPattern>com.shade.alibaba.fastjson</shadedPattern> |
77 | | - </relocation> |
| 73 | + <relocations> |
| 74 | + <relocation> |
| 75 | + <pattern>com.alibaba.fastjson</pattern> |
| 76 | + <shadedPattern>com.shade.alibaba.fastjson</shadedPattern> |
| 77 | + </relocation> |
78 | 78 | <!--Solution conflicts with flink-sql-avro.all shades are shaded in the way of flink-sql-avro--> |
79 | 79 | <relocation> |
80 | 80 | <pattern>org.apache.avro</pattern> |
|
88 | 88 | <pattern>org.apache.commons.compress</pattern> |
89 | 89 | <shadedPattern>org.apache.flink.avro.shaded.org.apache.commons.compress</shadedPattern> |
90 | 90 | </relocation> |
91 | | - </relocations> |
| 91 | + <relocation> |
| 92 | + <pattern>com.google.protobuf</pattern> |
| 93 | + <shadedPattern>com.dtstack.chunjun.connector.kafka.shaded.com.google.protobuf</shadedPattern> |
| 94 | + </relocation> |
| 95 | + </relocations> |
92 | 96 | <artifactSet> |
93 | 97 | <excludes> |
94 | 98 | <exclude>org.slf4j</exclude> |
|
116 | 120 | <exclude>META-INF/*.RSA</exclude> |
117 | 121 | </excludes> |
118 | 122 | </filter> |
| 123 | + |
| 124 | + <filter> |
| 125 | + <artifact>org.apache.flink:flink-avro</artifact> |
| 126 | + <excludes> |
| 127 | + <exclude>META-INF/services/*</exclude> |
| 128 | + </excludes> |
| 129 | + </filter> |
| 130 | + <filter> |
| 131 | + <artifact>org.apache.flink:flink-connector-kafka</artifact> |
| 132 | + <excludes> |
| 133 | + <exclude>META-INF/services/*</exclude> |
| 134 | + </excludes> |
| 135 | + </filter> |
| 136 | + <filter> |
| 137 | + <artifact>org.glassfish.jersey.core:jersey-common</artifact> |
| 138 | + <excludes> |
| 139 | + <exclude>META-INF/services/*</exclude> |
| 140 | + </excludes> |
| 141 | + </filter> |
119 | 142 | </filters> |
| 143 | + <transformers> |
| 144 | + <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/> |
| 145 | + </transformers> |
120 | 146 | </configuration> |
121 | 147 | </execution> |
122 | 148 | </executions> |
123 | 149 | </plugin> |
124 | 150 |
|
125 | | - <plugin> |
126 | | - <artifactId>maven-antrun-plugin</artifactId> |
127 | | - <executions> |
128 | | - <execution> |
129 | | - <id>copy-resources</id> |
130 | | - <!-- here the phase you need --> |
131 | | - <phase>package</phase> |
132 | | - <goals> |
133 | | - <goal>run</goal> |
134 | | - </goals> |
135 | | - <configuration> |
136 | | - <tasks> |
137 | | - <copy todir="${basedir}/../../${dist.dir}/connector/kafka" |
| 151 | + <plugin> |
| 152 | + <artifactId>maven-antrun-plugin</artifactId> |
| 153 | + <executions> |
| 154 | + <execution> |
| 155 | + <id>copy-resources</id> |
| 156 | + <!-- here the phase you need --> |
| 157 | + <phase>package</phase> |
| 158 | + <goals> |
| 159 | + <goal>run</goal> |
| 160 | + </goals> |
| 161 | + <configuration> |
| 162 | + <tasks> |
| 163 | + <copy todir="${basedir}/../../${dist.dir}/connector/kafka" |
138 | 164 | file="${basedir}/target/${project.artifactId}-${project.version}.jar"/> |
139 | | - <move file="${basedir}/../../${dist.dir}/connector/kafka/${project.artifactId}-${project.version}.jar" |
140 | | - tofile="${basedir}/../../${dist.dir}/connector/kafka/${project.artifactId}-${git.branch}.jar"/> |
| 165 | + <move file="${basedir}/../../${dist.dir}/connector/kafka/${project.artifactId}-${project.version}.jar" |
| 166 | + tofile="${basedir}/../../${dist.dir}/connector/kafka/${project.artifactId}-${git.branch}.jar"/> |
141 | 167 | <delete> |
142 | 168 | <fileset dir="${basedir}/../../${dist.dir}/connector/kafka/" |
143 | 169 | includes="${project.artifactId}-*.jar" |
|
153 | 179 | includes="${project.artifactId}-*.jar" |
154 | 180 | excludes="${project.artifactId}-${git.branch}.jar"/> |
155 | 181 | </delete> |
156 | | - </tasks> |
157 | | - </configuration> |
158 | | - </execution> |
159 | | - </executions> |
160 | | - </plugin> |
161 | | - </plugins> |
162 | | - </build> |
| 182 | + </tasks> |
| 183 | + </configuration> |
| 184 | + </execution> |
| 185 | + </executions> |
| 186 | + </plugin> |
| 187 | + </plugins> |
| 188 | + </build> |
163 | 189 | </project> |
0 commit comments