You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2022/01/18 05:21:02 UTC
[skywalking] branch chore/dependnecies created (now 65356b3)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a change to branch chore/dependnecies
in repository https://gitbox.apache.org/repos/asf/skywalking.git.
at 65356b3 Exclude unnecessary libs when building under JDK 9+
This branch includes the following new commits:
new 65356b3 Exclude unnecessary libs when building under JDK 9+
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[skywalking] 01/01: Exclude unnecessary libs when building under JDK 9+
Posted by ke...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch chore/dependnecies
in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit 65356b30fad17d928c11bb1be1225ad52cafa141
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Tue Jan 18 13:20:30 2022 +0800
Exclude unnecessary libs when building under JDK 9+
---
CHANGES.md | 1 +
apm-dist/src/main/assembly/binary.xml | 4 +--
oap-server/server-starter/pom.xml | 13 ++++-----
.../server-starter/src/main/assembly/assembly.xml | 33 ----------------------
.../tool-profile-snapshot-exporter/pom.xml | 14 ++++-----
.../src/main/assembly/assembly.xml | 33 ----------------------
pom.xml | 12 ++++++++
7 files changed, 27 insertions(+), 83 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 84476eb..095f1e7 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -11,6 +11,7 @@ Release Notes.
on JDK if JNDI is opened in default. Notice, using JVM option `-Dlog4j2.formatMsgNoLookups=true` or setting
the `LOG4J_FORMAT_MSG_NO_LOOKUPS=”true”` environment variable also avoids CVEs.
* Upgrade maven-wrapper to 3.1.0, maven to 3.8.4 for performance improvements and ARM more native support.
+* Exclude unnecessary libs when building under JDK 9+.
#### OAP Server
diff --git a/apm-dist/src/main/assembly/binary.xml b/apm-dist/src/main/assembly/binary.xml
index 65de5ad..13e77e6 100644
--- a/apm-dist/src/main/assembly/binary.xml
+++ b/apm-dist/src/main/assembly/binary.xml
@@ -73,12 +73,12 @@
<outputDirectory>config</outputDirectory>
</fileSet>
<fileSet>
- <directory>${project.basedir}/../oap-server/server-starter/target/skywalking-oap-assembly/skywalking-oap/libs</directory>
+ <directory>${project.basedir}/../oap-server/server-starter/target/oap-libs</directory>
<outputDirectory>oap-libs</outputDirectory>
</fileSet>
<fileSet>
- <directory>${project.basedir}/../oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/target/skywalking-tools-exporter-assembly/skywalking-tools-exporter/libs</directory>
+ <directory>${project.basedir}/../oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/target/oap-libs</directory>
<outputDirectory>oap-libs</outputDirectory>
</fileSet>
diff --git a/oap-server/server-starter/pom.xml b/oap-server/server-starter/pom.xml
index d0acc2a..25f2488 100644
--- a/oap-server/server-starter/pom.xml
+++ b/oap-server/server-starter/pom.xml
@@ -314,18 +314,17 @@
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
+ <artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>assembly</id>
- <phase>package</phase>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
<goals>
- <goal>single</goal>
+ <goal>copy-dependencies</goal>
</goals>
<configuration>
- <descriptors>
- <descriptor>src/main/assembly/assembly.xml</descriptor>
- </descriptors>
+ <includeScope>runtime</includeScope>
+ <outputDirectory>${project.build.directory}/oap-libs</outputDirectory>
</configuration>
</execution>
</executions>
diff --git a/oap-server/server-starter/src/main/assembly/assembly.xml b/oap-server/server-starter/src/main/assembly/assembly.xml
deleted file mode 100644
index bc3202b..0000000
--- a/oap-server/server-starter/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
- ~ 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.
- ~
- -->
-
-<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>assembly</id>
- <formats>
- <format>dir</format>
- </formats>
- <dependencySets>
- <dependencySet>
- <outputDirectory>/libs</outputDirectory>
- <scope>runtime</scope>
- </dependencySet>
- </dependencySets>
-</assembly>
diff --git a/oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/pom.xml b/oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/pom.xml
index d5efda6..3eb9e19 100644
--- a/oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/pom.xml
+++ b/oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/pom.xml
@@ -37,22 +37,20 @@
</dependencies>
<build>
- <finalName>skywalking-tools-exporter</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-assembly-plugin</artifactId>
+ <artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
- <id>assembly</id>
- <phase>package</phase>
+ <id>copy-dependencies</id>
+ <phase>process-resources</phase>
<goals>
- <goal>single</goal>
+ <goal>copy-dependencies</goal>
</goals>
<configuration>
- <descriptors>
- <descriptor>src/main/assembly/assembly.xml</descriptor>
- </descriptors>
+ <includeScope>runtime</includeScope>
+ <outputDirectory>${project.build.directory}/oap-libs</outputDirectory>
</configuration>
</execution>
</executions>
diff --git a/oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/src/main/assembly/assembly.xml b/oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/src/main/assembly/assembly.xml
deleted file mode 100644
index bc3202b..0000000
--- a/oap-server/server-tools/profile-exporter/tool-profile-snapshot-exporter/src/main/assembly/assembly.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-<!--
- ~ 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.
- ~
- -->
-
-<assembly
- xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
- <id>assembly</id>
- <formats>
- <format>dir</format>
- </formats>
- <dependencySets>
- <dependencySet>
- <outputDirectory>/libs</outputDirectory>
- <scope>runtime</scope>
- </dependencySet>
- </dependencySets>
-</assembly>
diff --git a/pom.xml b/pom.xml
index 0a4a25a..94f0abb 100755
--- a/pom.xml
+++ b/pom.xml
@@ -303,6 +303,18 @@
<version>${jmh.version}</version>
<scope>test</scope>
</dependency>
+
+ <!-- These dependencies will be bundled in JDK9+ but we don't need them, just exclude them. -->
+ <dependency>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.glassfish.jaxb</groupId>
+ <artifactId>jaxb-runtime</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
</dependencyManagement>