hailin0 commented on code in PR #3025:
URL:
https://github.com/apache/incubator-seatunnel/pull/3025#discussion_r991148891
##########
seatunnel-core/pom.xml:
##########
@@ -31,18 +31,47 @@
<packaging>pom</packaging>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-starter-logging-package-for-e2e</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+ <excludeTransitive>false</excludeTransitive>
+
<includeGroupIds>org.slf4j,org.apache.logging.log4j</includeGroupIds>
+
<includeArtifactIds>slf4j-api,jcl-over-slf4j,log4j-slf4j-impl,log4j-api,log4j-core</includeArtifactIds>
+
<outputDirectory>${project.build.directory}/logging-e2e</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
- <shadedArtifactAttached>false</shadedArtifactAttached>
-
<createDependencyReducedPom>true</createDependencyReducedPom>
- <!-- Make sure the transitive dependencies are written to
the generated pom under <dependencies> -->
-
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
<artifactSet>
<excludes>
+ <!-- not excluded: xxx-to-slf4j bridges, e.g.
org.slf4j:jcl-over-slf4j -->
+ <exclude>org.slf4j:slf4j-api</exclude>
+ <exclude>org.slf4j:slf4j-jdk14</exclude>
+ <exclude>org.slf4j:slf4j-nop</exclude>
+ <exclude>org.slf4j:slf4j-simple</exclude>
+ <exclude>org.slf4j:slf4j-reload4j</exclude>
+ <exclude>org.slf4j:slf4j-log4j12</exclude>
<exclude>ch.qos.logback:*</exclude>
+ <exclude>log4j:*</exclude>
+ <exclude>org.apache.logging.log4j:*</exclude>
+ <exclude>commons-logging:*</exclude>
</excludes>
Review Comment:
starter shade jar include jcl-over-slf4j
<img width="1716" alt="image"
src="https://user-images.githubusercontent.com/14371345/194848559-aed726d6-e1bf-4bb1-b44a-6ffd05f6f695.png">
##########
seatunnel-core/pom.xml:
##########
@@ -31,21 +31,31 @@
<packaging>pom</packaging>
<build>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>copy-starter-logging-package-for-e2e</id>
+ <phase>package</phase>
+ <goals>
+ <goal>copy-dependencies</goal>
+ </goals>
+ <configuration>
+
<includeGroupIds>org.slf4j,org.apache.logging.log4j</includeGroupIds>
+
<outputDirectory>${project.build.directory}/logging-e2e</outputDirectory>
Review Comment:
<img width="398" alt="企业微信截图_c16d0688-371c-4240-a391-8fc404626ef7"
src="https://user-images.githubusercontent.com/14371345/194847942-9539df86-620d-41f3-801d-77f10ca4b5d4.png">
##########
seatunnel-dist/src/main/assembly/assembly-bin-ci.xml:
##########
@@ -115,6 +115,21 @@
</file>
</files>
<dependencySets>
+ <!-- ============ Logging Jars ============ -->
+ <dependencySet>
+ <useProjectArtifact>false</useProjectArtifact>
+ <useTransitiveDependencies>true</useTransitiveDependencies>
+ <unpack>false</unpack>
+ <outputDirectory>/lib/logging</outputDirectory>
+ <includes>
+ <include>org.slf4j:slf4j-api:jar</include>
+ <include>org.slf4j:jcl-over-slf4j:jar</include>
+ <include>org.apache.logging.log4j:log4j-api:jar</include>
+ <include>org.apache.logging.log4j:log4j-core:jar</include>
+
<include>org.apache.logging.log4j:log4j-slf4j-impl:jar</include>
+ </includes>
Review Comment:
<img width="333" alt="企业微信截图_ffd01110-a84e-46c4-b1d8-4ab07c730025"
src="https://user-images.githubusercontent.com/14371345/194849532-abe24b4d-a33e-4239-89e9-2a54d64989aa.png">
##########
seatunnel-e2e/seatunnel-e2e-common/src/test/java/org/apache/seatunnel/e2e/common/util/ContainerUtil.java:
##########
@@ -83,6 +83,17 @@ public static String
copyConfigFileToContainer(GenericContainer<?> container, St
return targetConfInContainer;
}
+ public static void copySeaTunnelStarterCommonJar(GenericContainer<?>
container,
+ String startModulePath,
+ String
seatunnelHomeInContainer) {
+ // copy logging lib
+ final String loggingLibPath = startModulePath + File.separator +
"target" + File.separator + "logging-e2e" + File.separator;
+ checkPathExist(loggingLibPath);
+ container.copyFileToContainer(
+ MountableFile.forHostPath(loggingLibPath),
+ Paths.get(seatunnelHomeInContainer, "lib", "logging").toString());
+ }
+
Review Comment:
mapping module dir to Container:
module dir:
<img width="398" alt="企业微信截图_c16d0688-371c-4240-a391-8fc404626ef7"
src="https://user-images.githubusercontent.com/14371345/194849968-fa831764-b569-481f-960a-58fe344f4967.png">
Container dir:
<img width="344" alt="image"
src="https://user-images.githubusercontent.com/14371345/194850111-3612320b-f8a2-4138-84bb-1a59d9fa7710.png">
##########
seatunnel-core/seatunnel-starter/pom.xml:
##########
@@ -52,10 +52,44 @@
<artifactId>seatunnel-engine-server</artifactId>
<version>${project.version}</version>
</dependency>
+
+ <!-- Declare log4j2 asynchronous loggers provider: disruptor -->
+ <dependency>
+ <groupId>com.lmax</groupId>
+ <artifactId>disruptor</artifactId>
+ </dependency>
+
</dependencies>
<build>
<finalName>${project.name}</finalName>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-shade-plugin</artifactId>
+ <configuration>
+ <artifactSet>
+ <excludes>
+ <!-- not excluded: slf4j-api & log4j2 &
xxx-to-slf4j bridges -->
+ <exclude>org.slf4j:slf4j-jdk14</exclude>
+ <exclude>org.slf4j:slf4j-nop</exclude>
+ <exclude>org.slf4j:slf4j-simple</exclude>
+ <exclude>org.slf4j:slf4j-reload4j</exclude>
+ <exclude>org.slf4j:slf4j-log4j12</exclude>
+ <exclude>log4j:*</exclude>
+ <exclude>commons-logging:*</exclude>
+ <exclude>ch.qos.logback:*</exclude>
+
<exclude>org.apache.logging.log4j:log4j-to-slf4j</exclude>
+ </excludes>
Review Comment:
seatunnel starter shade jar include :
slf4j-api、log4j-api、log4j-core、log4j-slf4j-impl、jcl-over-slf4j、disruptor
<img width="1716" alt="image"
src="https://user-images.githubusercontent.com/14371345/194849171-4ff3c986-567a-4b83-8775-887ede6d1e51.png">
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]