Skip to content

Commit

Permalink
optimize: separate framework and lib dependencies for deployments (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
slievrly committed Jun 26, 2022
1 parent 8d6c3ef commit 9baa6b4
Show file tree
Hide file tree
Showing 7 changed files with 69 additions and 33 deletions.
4 changes: 3 additions & 1 deletion changes/en-us/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Add changes here for all PR submitted to the develop branch.
- [[#4678](https://github.com/seata/seata/pull/4678)] fix the error of key transport.enableRmClientBatchSendRequest cache penetration if not configure
- [[#4701](https://github.com/seata/seata/pull/4701)] fix missing command line args
- [[#4607](https://github.com/seata/seata/pull/4607)] fix bug on skipping lock check
- [[#4696](https://github.com/seata/seata/pull/4696)] fix oracle database insert value
- [[#4726](https://github.com/seata/seata/pull/4726)] fix batch message send may return NullPointException

### optimize:
Expand All @@ -24,6 +25,7 @@ Add changes here for all PR submitted to the develop branch.
- [[#4693](https://github.com/seata/seata/pull/4693)] optimize the console navigation bar
- [[#4544](https://github.com/seata/seata/pull/4544)] optimize jackson dependencies in TransactionContextFilterTest
- [[#4700](https://github.com/seata/seata/pull/4700)] fix maven-compiler-plugin and maven-resources-plugin execute failed
- [[#4711](https://github.com/seata/seata/pull/4711)] separate lib dependencies for deployments
- [[#4720](https://github.com/seata/seata/pull/4720)] optimize pom description

### test:
Expand All @@ -38,8 +40,8 @@ Thanks to these contributors for their code commits. Please report an unintended
- [Ifdevil](https://github.com/Ifdevil)
- [wingchi-leung](https://github.com/wingchi-leung)
- [liurong](https://github.com/robynron)
- [opelok-z](https://github.com/opelok-z)
- [a364176773](https://github.com/a364176773)
- [2129zxl](https://github.com/2129zxl)


Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
3 changes: 3 additions & 0 deletions changes/zh-cn/develop.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
- [[#4678](https://github.com/seata/seata/pull/4678)] 修复属性transport.enableRmClientBatchSendRequest没有配置的情况下缓存穿透的问题
- [[#4701](https://github.com/seata/seata/pull/4701)] 修复命令行参数丢失问题
- [[#4607](https://github.com/seata/seata/pull/4607)] 修复跳过全局锁校验的缺陷
- [[#4696](https://github.com/seata/seata/pull/4696)] 修复 oracle 存储模式时的插入问题
- [[#4726](https://github.com/seata/seata/pull/4726)] 修复批量发送消息时可能的NPE问题

### optimize:
Expand All @@ -23,6 +24,7 @@
- [[#4693](https://github.com/seata/seata/pull/4693)] 优化控制台导航栏
- [[#4544](https://github.com/seata/seata/pull/4544)] 优化测试用例TransactionContextFilterTest中jackson包依赖问题
- [[#4700](https://github.com/seata/seata/pull/4700)] 修复 maven-compiler-plugin 和 maven-resources-plugin 执行失败
- [[#4711](https://github.com/seata/seata/pull/4711)] 分离部署时 lib 依赖
- [[#4720](https://github.com/seata/seata/pull/4720)] 优化pom描述

### test:
Expand All @@ -39,6 +41,7 @@
- [Ifdevil](https://github.com/Ifdevil)
- [wingchi-leung](https://github.com/wingchi-leung)
- [liurong](https://github.com/robynron)
- [opelok-z](https://github.com/opelok-z)
- [a364176773](https://github.com/a364176773)

同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。
27 changes: 11 additions & 16 deletions distribution/bin/seata-server.bat
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
@REM ----------------------------------------------------------------------------
@REM Copyright 2001-2006 The Apache Software Foundation.
@REM Copyright 1999-2019 Seata.io Group.
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.
@REM ----------------------------------------------------------------------------
@REM
@REM Copyright (c) 2001-2006 The Apache Software Foundation. All rights
@REM reserved.
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@REM See the License for the specific language governing permissions and
@REM limitations under the License.

@echo off

Expand Down Expand Up @@ -98,7 +93,7 @@ if "%SKYWALKING_ENABLE%"=="true" (
echo "apm-skywalking not enabled"
)

%JAVACMD% %JAVA_OPTS% %SKYWALKING_OPTS% -server -Xmx2048m -Xms2048m -Xmn1024m -Xss512k -XX:SurvivorRatio=10 -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:MaxDirectMemorySize=1024m -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%BASEDIR%"/logs/java_heapdump.hprof -XX:+DisableExplicitGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=75 -Xloggc:"%BASEDIR%"/logs/seata_gc.log -verbose:gc -Dio.netty.leakDetectionLevel=advanced -classpath %CLASSPATH% -Dapp.name="seata-server" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" -Dspring.config.location="%BASEDIR%"/conf/application.yml -Dlogging.config="%BASEDIR%"/conf/logback-spring.xml -jar "%BASEDIR%"/target/seata-server.jar %CMD_LINE_ARGS%
%JAVACMD% %JAVA_OPTS% %SKYWALKING_OPTS% -server -Dloader.path=../lib -Xmx2048m -Xms2048m -Xmn1024m -Xss512k -XX:SurvivorRatio=10 -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=256m -XX:MaxDirectMemorySize=1024m -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="%BASEDIR%"/logs/java_heapdump.hprof -XX:+DisableExplicitGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=75 -Xloggc:"%BASEDIR%"/logs/seata_gc.log -verbose:gc -Dio.netty.leakDetectionLevel=advanced -classpath %CLASSPATH% -Dapp.name="seata-server" -Dapp.repo="%REPO%" -Dapp.home="%BASEDIR%" -Dbasedir="%BASEDIR%" -Dspring.config.location="%BASEDIR%"/conf/application.yml -Dlogging.config="%BASEDIR%"/conf/logback-spring.xml -jar "%BASEDIR%"/target/seata-server.jar %CMD_LINE_ARGS%
if %ERRORLEVEL% NEQ 0 goto error
goto end

Expand Down
27 changes: 11 additions & 16 deletions distribution/bin/seata-server.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
#!/bin/sh
# ----------------------------------------------------------------------------
# Copyright 2001-2006 The Apache Software Foundation.
# Copyright 1999-2019 Seata.io Group.
#
# Licensed 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
# Licensed 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
# 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.
# ----------------------------------------------------------------------------
#
# Copyright (c) 2001-2006 The Apache Software Foundation. All rights
# reserved.
# 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.


# resolve links - $0 may be a softlink
Expand Down Expand Up @@ -131,7 +126,7 @@ JVM_XSS=$JVM_XSS
JVM_MetaspaceSize=$JVM_MetaspaceSize
JVM_MaxMetaspaceSize=$JVM_MaxMetaspaceSize
JVM_MaxDirectMemorySize=$JVM_MaxDirectMemorySize
JAVA_OPT="${JAVA_OPT} -server -Xmx${JVM_XMX:="2048m"} -Xms${JVM_XMS:="2048m"} -Xmn${JVM_XMN:="1024m"} -Xss${JVM_XSS:="512k"} -XX:SurvivorRatio=10 -XX:MetaspaceSize=${JVM_MetaspaceSize:="128m"} -XX:MaxMetaspaceSize=${JVM_MaxMetaspaceSize:="256m"} -XX:MaxDirectMemorySize=${JVM_MaxDirectMemorySize:=1024m} -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy"
JAVA_OPT="${JAVA_OPT} -server -Dloader.path=../lib -Xmx${JVM_XMX:="2048m"} -Xms${JVM_XMS:="2048m"} -Xmn${JVM_XMN:="1024m"} -Xss${JVM_XSS:="512k"} -XX:SurvivorRatio=10 -XX:MetaspaceSize=${JVM_MetaspaceSize:="128m"} -XX:MaxMetaspaceSize=${JVM_MaxMetaspaceSize:="256m"} -XX:MaxDirectMemorySize=${JVM_MaxDirectMemorySize:=1024m} -XX:-OmitStackTraceInFastThrow -XX:-UseAdaptiveSizePolicy"
JAVA_OPT="${JAVA_OPT} -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${BASEDIR}/logs/java_heapdump.hprof -XX:+DisableExplicitGC -XX:+CMSParallelRemarkEnabled -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=75"

JAVA_MAJOR_VERSION=$($JAVACMD -version 2>&1 | sed '1!d' | sed -e 's/"//g' | awk '{print $3}' | awk -F '.' '{print $2}')
Expand Down
5 changes: 5 additions & 0 deletions distribution/release-seata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
<directory>../ext/apm-seata-skywalking-plugin/target/ext/skywalking-agent/</directory>
<outputDirectory>ext/apm-skywalking/</outputDirectory>
</fileSet>

<fileSet>
<directory>../server/target/lib/</directory>
<outputDirectory>lib</outputDirectory>
</fileSet>
</fileSets>

<files>
Expand Down
7 changes: 7 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,13 @@
<image.tags>latest</image.tags>
</properties>
</profile>
<!-- profile: arrch64 -->
<profile>
<id>arrch64</id>
<properties>
<os.detected.classifier>osx-x86_64</os.detected.classifier>
</properties>
</profile>
<!-- profile: checkstyle -->
<profile>
<id>checkstyle</id>
Expand Down
29 changes: 29 additions & 0 deletions server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,12 @@
<mainClass>io.seata.server.ServerApplication</mainClass>
<layout>ZIP</layout>
<attach>false</attach>
<includes>
<include>
<groupId>null</groupId>
<artifactId>null</artifactId>
</include>
</includes>
</configuration>
<executions>
<execution>
Expand All @@ -274,6 +280,29 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
<excludeTransitive>false</excludeTransitive>
<stripVersion>false</stripVersion>
<silent>true</silent>
<overWriteIfNewer>true</overWriteIfNewer>
<!--resolve slf4j-simple conflicts-->
<includeScope>runtime</includeScope>
<excludeGroupIds>org.apache.logging.log4j,log4j</excludeGroupIds>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
Expand Down

0 comments on commit 9baa6b4

Please sign in to comment.