You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/04/03 05:16:25 UTC
[incubator-inlong] branch master updated: [INLONG-3526][Manager] Optimize packaging of the default plugins (#3527)
This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 2c4d38b [INLONG-3526][Manager] Optimize packaging of the default plugins (#3527)
2c4d38b is described below
commit 2c4d38ba777cc4176845166438fc5e4aebab13c1
Author: dockerzhang <do...@tencent.com>
AuthorDate: Sun Apr 3 13:16:19 2022 +0800
[INLONG-3526][Manager] Optimize packaging of the default plugins (#3527)
---
inlong-manager/manager-docker/manager-docker.sh | 3 +++
inlong-manager/manager-plugins/pom.xml | 24 ++++++++++++++++++++--
.../main/assembly/{package.xml => assembly.xml} | 13 +++---------
inlong-manager/manager-web/assembly.xml | 7 +++++++
inlong-manager/manager-web/pom.xml | 3 ---
inlong-manager/pom.xml | 7 +++----
6 files changed, 38 insertions(+), 19 deletions(-)
diff --git a/inlong-manager/manager-docker/manager-docker.sh b/inlong-manager/manager-docker/manager-docker.sh
index 7d22bdb..9b10389 100644
--- a/inlong-manager/manager-docker/manager-docker.sh
+++ b/inlong-manager/manager-docker/manager-docker.sh
@@ -40,6 +40,9 @@ JAVA_OPTS="-Dspring.profiles.active=${ACTIVE_PROFILE}"
# get plugins from remote address.
if [[ "${PLUGINS_URL}" =~ ^http* ]]; then
+ # remove the default plugins
+ rm -rf plugins
+ # get the third party plugins
wget ${PLUGINS_URL} -O plugins.tar.gz
tar -zxvf plugins.tar.gz -C "${file_path}"/
rm plugins.tar.gz
diff --git a/inlong-manager/manager-plugins/pom.xml b/inlong-manager/manager-plugins/pom.xml
index 69fc835..9359841 100644
--- a/inlong-manager/manager-plugins/pom.xml
+++ b/inlong-manager/manager-plugins/pom.xml
@@ -125,8 +125,28 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-resources</id>
+ <phase>prepare-package</phase>
+ <goals>
+ <goal>copy-resources</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>target/plugins</outputDirectory>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ </resource>
+ </resources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <version>3.3.0</version>
<executions>
<execution>
<id>plugins</id>
@@ -140,7 +160,7 @@
<finalName>plugins</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
- <descriptor>src/main/assembly/package.xml</descriptor>
+ <descriptor>src/main/assembly/assembly.xml</descriptor>
</descriptors>
</configuration>
</plugin>
diff --git a/inlong-manager/manager-plugins/src/main/assembly/package.xml b/inlong-manager/manager-plugins/src/main/assembly/assembly.xml
similarity index 77%
rename from inlong-manager/manager-plugins/src/main/assembly/package.xml
rename to inlong-manager/manager-plugins/src/main/assembly/assembly.xml
index 08b5a5e..e3c6f29 100644
--- a/inlong-manager/manager-plugins/src/main/assembly/package.xml
+++ b/inlong-manager/manager-plugins/src/main/assembly/assembly.xml
@@ -22,23 +22,16 @@
xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.1.0 http://maven.apache.org/xsd/assembly-2.1.0.xsd">
<id>plugins</id>
<formats>
- <format>tar.gz</format>
+ <format>dir</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<fileSets>
<fileSet>
- <directory>target</directory>
+ <directory>${build.directory}</directory>
+ <outputDirectory>./</outputDirectory>
<includes>
<include>${project.artifactId}-${project.version}.jar</include>
</includes>
- <outputDirectory>/plugins</outputDirectory>
- </fileSet>
- <fileSet>
- <directory>target/classes</directory>
- <includes>
- <include>flink-sort-plugin.properties</include>
- </includes>
- <outputDirectory>/plugins</outputDirectory>
</fileSet>
</fileSets>
</assembly>
\ No newline at end of file
diff --git a/inlong-manager/manager-web/assembly.xml b/inlong-manager/manager-web/assembly.xml
index 23c9f7e..3272bd9 100755
--- a/inlong-manager/manager-web/assembly.xml
+++ b/inlong-manager/manager-web/assembly.xml
@@ -69,6 +69,13 @@
<include>${project.build.finalName}.jar</include>
</includes>
</fileSet>
+
+ <!-- package Manager Plugins -->
+ <fileSet>
+ <directory>../manager-plugins/target/plugins</directory>
+ <outputDirectory>plugins</outputDirectory>
+ </fileSet>
+
</fileSets>
</assembly>
diff --git a/inlong-manager/manager-web/pom.xml b/inlong-manager/manager-web/pom.xml
index 8e325e1..a8224ad 100644
--- a/inlong-manager/manager-web/pom.xml
+++ b/inlong-manager/manager-web/pom.xml
@@ -156,7 +156,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>3.1.0</version>
<configuration>
<!-- Project startup jar package excluded directory -->
<excludes>
@@ -172,7 +171,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
- <version>3.1.0</version>
<executions>
<execution>
<phase>prepare-package</phase>
@@ -213,7 +211,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <version>3.1.0</version>
<executions>
<execution>
<id>dist</id>
diff --git a/inlong-manager/pom.xml b/inlong-manager/pom.xml
index 2fa110a..c63ef73 100644
--- a/inlong-manager/pom.xml
+++ b/inlong-manager/pom.xml
@@ -35,9 +35,9 @@
<module>manager-dao</module>
<module>manager-service</module>
<module>manager-workflow</module>
+ <module>manager-plugins</module>
<module>manager-web</module>
<module>manager-docker</module>
- <module>manager-plugins</module>
<module>manager-client</module>
<module>manager-client-examples</module>
</modules>
@@ -87,13 +87,12 @@
<fastjson.version>1.2.76</fastjson.version>
<powermock.version>2.0.2</powermock.version>
<flink-clients.version>1.13.5</flink-clients.version>
- <docker.organization>inlong</docker.organization>
-
- <project.build.encoding>UTF-8</project.build.encoding>
<junit.version>4.12</junit.version>
<commons-io.version>2.11.0</commons-io.version>
<flink-core.version>1.13.5</flink-core.version>
<jackson-core>2.13.1</jackson-core>
+ <docker.organization>inlong</docker.organization>
+ <project.build.encoding>UTF-8</project.build.encoding>
</properties>
<dependencies>