Skip to content

Commit cee2b81

Browse files
committed
Add shade plugin
1 parent df2fe24 commit cee2b81

File tree

15 files changed

+235
-134
lines changed

15 files changed

+235
-134
lines changed

odps-sdk-impl/odps-common-local/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,13 @@
2929
<artifactId>gson</artifactId>
3030
</dependency>
3131
</dependencies>
32+
33+
<build>
34+
<plugins>
35+
<plugin>
36+
<groupId>org.apache.maven.plugins</groupId>
37+
<artifactId>maven-shade-plugin</artifactId>
38+
</plugin>
39+
</plugins>
40+
</build>
3241
</project>

odps-sdk-impl/odps-graph-local/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,13 @@
3636
<artifactId>commons-io</artifactId>
3737
</dependency>
3838
</dependencies>
39+
40+
<build>
41+
<plugins>
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-shade-plugin</artifactId>
45+
</plugin>
46+
</plugins>
47+
</build>
3948
</project>

odps-sdk-impl/odps-mapred-bridge/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,13 @@
6060
</dependency>
6161

6262
</dependencies>
63+
64+
<build>
65+
<plugins>
66+
<plugin>
67+
<groupId>org.apache.maven.plugins</groupId>
68+
<artifactId>maven-shade-plugin</artifactId>
69+
</plugin>
70+
</plugins>
71+
</build>
6372
</project>

odps-sdk-impl/odps-mapred-local/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,13 @@
4343
<artifactId>commons-io</artifactId>
4444
</dependency>
4545
</dependencies>
46+
47+
<build>
48+
<plugins>
49+
<plugin>
50+
<groupId>org.apache.maven.plugins</groupId>
51+
<artifactId>maven-shade-plugin</artifactId>
52+
</plugin>
53+
</plugins>
54+
</build>
4655
</project>

odps-sdk-impl/odps-udf-example/pom.xml

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,44 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
44
xmlns="http://maven.apache.org/POM/4.0.0"
55
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
6-
<modelVersion>4.0.0</modelVersion>
7-
<parent>
8-
<groupId>com.aliyun.odps</groupId>
9-
<artifactId>odps-sdk-impl</artifactId>
10-
<version>0.31.6-public</version>
11-
</parent>
6+
<modelVersion>4.0.0</modelVersion>
7+
<parent>
8+
<groupId>com.aliyun.odps</groupId>
9+
<artifactId>odps-sdk-impl</artifactId>
10+
<version>0.31.6-public</version>
11+
</parent>
1212

13-
<artifactId>odps-udf-example</artifactId>
14-
<name>SQL UDF examples</name>
13+
<artifactId>odps-udf-example</artifactId>
14+
<name>SQL UDF examples</name>
1515

16-
<dependencies>
17-
<dependency>
18-
<groupId>com.aliyun.odps</groupId>
19-
<artifactId>odps-sdk-udf</artifactId>
20-
<scope>provided</scope>
21-
</dependency>
22-
<dependency>
23-
<groupId>commons-lang</groupId>
24-
<artifactId>commons-lang</artifactId>
25-
</dependency>
26-
</dependencies>
27-
<!--by default excludes weather example from compilation -->
28-
<build>
29-
<plugins>
30-
<plugin>
31-
<groupId>org.apache.maven.plugins</groupId>
32-
<artifactId>maven-compiler-plugin</artifactId>
33-
<configuration>
34-
<excludes>
35-
<exclude>com/aliyun/odps/udf/example/weather/*.java</exclude>
36-
</excludes>
37-
</configuration>
38-
</plugin>
39-
</plugins>
40-
</build>
16+
<dependencies>
17+
<dependency>
18+
<groupId>com.aliyun.odps</groupId>
19+
<artifactId>odps-sdk-udf</artifactId>
20+
<scope>provided</scope>
21+
</dependency>
22+
<dependency>
23+
<groupId>commons-lang</groupId>
24+
<artifactId>commons-lang</artifactId>
25+
</dependency>
26+
</dependencies>
27+
<!--by default excludes weather example from compilation -->
28+
<build>
29+
<plugins>
30+
<plugin>
31+
<groupId>org.apache.maven.plugins</groupId>
32+
<artifactId>maven-compiler-plugin</artifactId>
33+
<configuration>
34+
<excludes>
35+
<exclude>com/aliyun/odps/udf/example/weather/*.java</exclude>
36+
</excludes>
37+
</configuration>
38+
</plugin>
39+
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-shade-plugin</artifactId>
43+
</plugin>
44+
</plugins>
45+
</build>
4146
</project>

odps-sdk-impl/odps-udf-local/pom.xml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,13 @@
3434
<version>0.31.6-public</version>
3535
</dependency>
3636
</dependencies>
37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-shade-plugin</artifactId>
43+
</plugin>
44+
</plugins>
45+
</build>
3746
</project>

odps-sdk/odps-lot-proto/pom.xml

Lines changed: 80 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,88 @@
1-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2-
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3-
<modelVersion>4.0.0</modelVersion>
1+
<project xmlns="http://maven.apache.org/POM/4.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<parent>
7+
<groupId>com.aliyun.odps</groupId>
8+
<artifactId>odps-sdk</artifactId>
9+
<version>0.31.6-public</version>
10+
</parent>
411

5-
<parent>
612
<groupId>com.aliyun.odps</groupId>
7-
<artifactId>odps-sdk</artifactId>
13+
<artifactId>odps-lot-proto</artifactId>
814
<version>0.31.6-public</version>
9-
</parent>
10-
11-
<groupId>com.aliyun.odps</groupId>
12-
<artifactId>odps-lot-proto</artifactId>
13-
<version>0.31.6-public</version>
14-
<packaging>jar</packaging>
15+
<packaging>jar</packaging>
16+
17+
<name>odps-lot-proto</name>
18+
19+
<build>
20+
<plugins>
21+
<plugin>
22+
<groupId>org.apache.maven.plugins</groupId>
23+
<artifactId>maven-antrun-plugin</artifactId>
24+
<version>1.8</version>
25+
<executions>
26+
<execution>
27+
<id>compile-protoc</id>
28+
<phase>generate-sources</phase>
29+
<configuration>
30+
<tasks>
31+
<mkdir dir="target/generated-sources"/>
32+
<path id="proto.path">
33+
<fileset dir="./common/">
34+
<include name="**/*.proto"/>
35+
</fileset>
36+
<fileset dir="./lot/">
37+
<include name="**/*.proto"/>
38+
</fileset>
39+
</path>
40+
<pathconvert pathsep=" " property="proto.files"
41+
refid="proto.path"/>
42+
<exec executable="../protoc/protoc-2.4.1.sh" failonerror="true"
43+
osfamily="unix">
44+
<arg value="--java_out=${basedir}/target/generated-sources"/>
45+
<arg value="-I${basedir}"/>
46+
<arg line="${proto.files}"/>
47+
</exec>
48+
<exec executable="../protoc/protoc-2.4.1.sh" failonerror="true"
49+
osfamily="mac">
50+
<arg value="--java_out=${basedir}/target/generated-sources"/>
51+
<arg value="-I${basedir}"/>
52+
<arg line="${proto.files}"/>
53+
</exec>
54+
<exec executable="${basedir}/../protoc/protoc.exe"
55+
failonerror="true" osfamily="windows">
56+
<arg value="--java_out=${basedir}/target/generated-sources"/>
57+
<arg value="-I${basedir}"/>
58+
<arg line="${proto.files}"/>
59+
</exec>
1560

16-
<name>odps-lot-proto</name>
61+
</tasks>
62+
<sourceRoot>target/generated-sources</sourceRoot>
63+
</configuration>
64+
<goals>
65+
<goal>run</goal>
66+
</goals>
67+
</execution>
68+
</executions>
69+
</plugin>
1770

18-
<build>
19-
<plugins>
20-
<plugin>
21-
<groupId>org.apache.maven.plugins</groupId>
22-
<artifactId>maven-antrun-plugin</artifactId>
23-
<version>1.8</version>
24-
<executions>
25-
<execution>
26-
<id>compile-protoc</id>
27-
<phase>generate-sources</phase>
28-
<configuration>
29-
<tasks>
30-
<mkdir dir="target/generated-sources" />
31-
<path id="proto.path">
32-
<fileset dir="./common/">
33-
<include name="**/*.proto" />
34-
</fileset>
35-
<fileset dir="./lot/">
36-
<include name="**/*.proto" />
37-
</fileset>
38-
</path>
39-
<pathconvert pathsep=" " property="proto.files"
40-
refid="proto.path" />
41-
<exec executable="../protoc/protoc-2.4.1.sh" failonerror="true" osfamily="unix">
42-
<arg value="--java_out=${basedir}/target/generated-sources" />
43-
<arg value="-I${basedir}"/>
44-
<arg line="${proto.files}" />
45-
</exec>
46-
<exec executable="../protoc/protoc-2.4.1.sh" failonerror="true" osfamily="mac">
47-
<arg value="--java_out=${basedir}/target/generated-sources" />
48-
<arg value="-I${basedir}"/>
49-
<arg line="${proto.files}" />
50-
</exec>
51-
<exec executable="${basedir}/../protoc/protoc.exe" failonerror="true" osfamily="windows">
52-
<arg value="--java_out=${basedir}/target/generated-sources" />
53-
<arg value="-I${basedir}"/>
54-
<arg line="${proto.files}" />
55-
</exec>
71+
<plugin>
72+
<groupId>org.apache.maven.plugins</groupId>
73+
<artifactId>maven-shade-plugin</artifactId>
74+
</plugin>
75+
</plugins>
76+
</build>
5677

57-
</tasks>
58-
<sourceRoot>target/generated-sources</sourceRoot>
59-
</configuration>
60-
<goals>
61-
<goal>run</goal>
62-
</goals>
63-
</execution>
64-
</executions>
65-
</plugin>
66-
</plugins>
67-
</build>
68-
69-
<properties>
70-
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
71-
</properties>
78+
<properties>
79+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
80+
</properties>
7281

73-
<dependencies>
74-
<dependency>
75-
<groupId>com.google.protobuf</groupId>
76-
<artifactId>protobuf-java</artifactId>
77-
</dependency>
78-
</dependencies>
82+
<dependencies>
83+
<dependency>
84+
<groupId>com.google.protobuf</groupId>
85+
<artifactId>protobuf-java</artifactId>
86+
</dependency>
87+
</dependencies>
7988
</project>

odps-sdk/odps-sdk-commons/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,11 @@
6464
</additionalConfig>
6565
</configuration>
6666
</plugin>
67+
68+
<plugin>
69+
<groupId>org.apache.maven.plugins</groupId>
70+
<artifactId>maven-shade-plugin</artifactId>
71+
</plugin>
6772
</plugins>
6873
</build>
6974

odps-sdk/odps-sdk-core/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,11 @@
116116
<shortRevisionLength>7</shortRevisionLength>
117117
</configuration>
118118
</plugin>
119+
120+
<plugin>
121+
<groupId>org.apache.maven.plugins</groupId>
122+
<artifactId>maven-shade-plugin</artifactId>
123+
</plugin>
119124
</plugins>
120125
<resources>
121126
<resource>

odps-sdk/odps-sdk-graph/pom.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@
5959
</execution>
6060
</executions>
6161
</plugin>
62+
63+
<plugin>
64+
<groupId>org.apache.maven.plugins</groupId>
65+
<artifactId>maven-shade-plugin</artifactId>
66+
</plugin>
6267
</plugins>
6368
</build>
6469

0 commit comments

Comments
 (0)