Skip to content

Commit

Permalink
optimize: optimize compatible module pom.xml (apache#6585)
Browse files Browse the repository at this point in the history
  • Loading branch information
slievrly authored May 28, 2024
1 parent 544dbad commit 8bd23f3
Show file tree
Hide file tree
Showing 14 changed files with 133 additions and 112 deletions.
1 change: 1 addition & 0 deletions changes/en-us/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ Add changes here for all PR submitted to the 2.x branch.
- [[#6578](https://github.com/apache/incubator-seata/pull/6578)] registry.conf supplemented raft configuration
- [[#6576](https://github.com/apache/incubator-seata/pull/6576)] remove oracle datatype parser
- [[#6583](https://github.com/apache/incubator-seata/pull/6583)] optimize the default compilation to be independent of the Git Env
- [[#6585](https://github.com/apache/incubator-seata/pull/6585)] optimize compatible module pom.xml

### security:
- [[#6069](https://github.com/apache/incubator-seata/pull/6069)] Upgrade Guava dependencies to fix security vulnerabilities
Expand Down
1 change: 1 addition & 0 deletions changes/zh-cn/2.x.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
- [[#6578](https://github.com/apache/incubator-seata/pull/6578)] registry.conf 补充raft配置
- [[#6576](https://github.com/apache/incubator-seata/pull/6576)] 移除 oracle 数据类型序列化扩展
- [[#6583](https://github.com/apache/incubator-seata/pull/6583)] 优化默认编译不依赖 Git 环境
- [[#6585](https://github.com/apache/incubator-seata/pull/6585)] 优化 compatible 模块的配置

### security:
- [[#6069](https://github.com/apache/incubator-seata/pull/6069)] 升级Guava依赖版本,修复安全漏洞
Expand Down
11 changes: 7 additions & 4 deletions compatible/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,21 +20,24 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<groupId>org.apache.seata</groupId>
<artifactId>seata-parent</artifactId>
<version>${revision}</version>
</parent>
<groupId>io.seata</groupId>
<version>2.1.0-SNAPSHOT</version>
<modelVersion>4.0.0</modelVersion>
<artifactId>seata-all</artifactId>
<packaging>jar</packaging>
<name>seata-all ${project.version}</name>
<description>compatible with io.seata API</description>
<properties>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<mockito.version>4.11.0</mockito.version>
<druid.version>1.2.7</druid.version>
<mysql.version>5.1.42</mysql.version>
<mariadb.version>2.7.2</mariadb.version>
<assertj-core.version>3.12.2</assertj-core.version>
<maven.git-commit-id.skip>true</maven.git-commit-id.skip>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -121,7 +124,7 @@
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<scope>test</scope>
</dependency>
</dependency>
<dependency>
<groupId>org.apache.seata</groupId>
<artifactId>seata-tcc</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
* Notes: used for io.seata SPI interface
*/
@Deprecated
public interface RegistryProvider extends org.apache.seata.discovery.registry.RegistryProvider{
public interface RegistryProvider extends org.apache.seata.discovery.registry.RegistryProvider {
/**
* provide a registry implementation instance
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@
* @param <T> the type parameter
*/
@Deprecated
public interface RegistryService<T> extends org.apache.seata.discovery.registry.RegistryService<T>{}
public interface RegistryService<T> extends org.apache.seata.discovery.registry.RegistryService<T> {

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@
* The type Server transaction interceptor.
*/
@Deprecated
public class ServerTransactionInterceptor extends org.apache.seata.integration.grpc.interceptor.server.ServerTransactionInterceptor{}
public class ServerTransactionInterceptor
extends org.apache.seata.integration.grpc.interceptor.server.ServerTransactionInterceptor {

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@
* The type Jakarta seata web mvc configurer.
*/
@Deprecated
public class JakartaSeataWebMvcConfigurer extends org.apache.seata.integration.http.JakartaSeataWebMvcConfigurer{}
public class JakartaSeataWebMvcConfigurer extends org.apache.seata.integration.http.JakartaSeataWebMvcConfigurer {

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@
* The type Jakarta transaction propagation interceptor.
*/
@Deprecated
public class JakartaTransactionPropagationInterceptor extends org.apache.seata.integration.http.JakartaTransactionPropagationInterceptor{}
public class JakartaTransactionPropagationInterceptor
extends org.apache.seata.integration.http.JakartaTransactionPropagationInterceptor {

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@
* The type Seata web mvc configurer.
*/
@Deprecated
public class SeataWebMvcConfigurer extends org.apache.seata.integration.http.SeataWebMvcConfigurer {}
public class SeataWebMvcConfigurer extends org.apache.seata.integration.http.SeataWebMvcConfigurer {

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@
* The type Global transactional interceptor handler.
*/
@Deprecated
public class GlobalTransactionalInterceptorHandler extends org.apache.seata.integration.tx.api.interceptor.handler.GlobalTransactionalInterceptorHandler {
public class GlobalTransactionalInterceptorHandler
extends org.apache.seata.integration.tx.api.interceptor.handler.GlobalTransactionalInterceptorHandler {

public GlobalTransactionalInterceptorHandler(org.apache.seata.tm.api.FailureHandler failureHandler, Set<String> methodsToProxy) {
public GlobalTransactionalInterceptorHandler(org.apache.seata.tm.api.FailureHandler failureHandler,
Set<String> methodsToProxy) {
super(failureHandler, methodsToProxy);
}

public GlobalTransactionalInterceptorHandler(org.apache.seata.tm.api.FailureHandler failureHandler, Set<String> methodsToProxy,
AspectTransactional aspectTransactional) {
public GlobalTransactionalInterceptorHandler(org.apache.seata.tm.api.FailureHandler failureHandler,
Set<String> methodsToProxy, AspectTransactional aspectTransactional) {
super(failureHandler, methodsToProxy, aspectTransactional);
}

Expand All @@ -57,8 +59,8 @@ public GlobalLockConfig getGlobalLockConfig(Method method, Class<?> targetClass)

@Override
public AspectTransactional getAspectTransactional(Method method, Class<?> targetClass) {
final GlobalTransactional globalTransactionalAnnotation =
getAnnotation(method, targetClass, GlobalTransactional.class);
final GlobalTransactional globalTransactionalAnnotation = getAnnotation(method, targetClass,
GlobalTransactional.class);
return globalTransactionalAnnotation != null ? new AspectTransactional(
globalTransactionalAnnotation.timeoutMills(), globalTransactionalAnnotation.name(),
globalTransactionalAnnotation.rollbackFor(), globalTransactionalAnnotation.rollbackForClassName(),
Expand All @@ -68,7 +70,7 @@ public AspectTransactional getAspectTransactional(Method method, Class<?> target
lockStrategyMode2ApacheSeataLockStrategyMode(globalTransactionalAnnotation.lockStrategyMode())) : null;
}

private Propagation propagation2ApacheSeataPropagation(io.seata.tm.api.transaction.Propagation propagation){
private Propagation propagation2ApacheSeataPropagation(io.seata.tm.api.transaction.Propagation propagation) {
switch (propagation) {
case NEVER:
return Propagation.NEVER;
Expand All @@ -85,11 +87,12 @@ private Propagation propagation2ApacheSeataPropagation(io.seata.tm.api.transacti
}
}

private LockStrategyMode lockStrategyMode2ApacheSeataLockStrategyMode(io.seata.common.LockStrategyMode lockStrategyMode){
if (Objects.requireNonNull(lockStrategyMode) == io.seata.common.LockStrategyMode.OPTIMISTIC) {
return LockStrategyMode.OPTIMISTIC;
}
return LockStrategyMode.PESSIMISTIC;
private LockStrategyMode lockStrategyMode2ApacheSeataLockStrategyMode(
io.seata.common.LockStrategyMode lockStrategyMode) {
if (Objects.requireNonNull(lockStrategyMode) == io.seata.common.LockStrategyMode.OPTIMISTIC) {
return LockStrategyMode.OPTIMISTIC;
}
return LockStrategyMode.PESSIMISTIC;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
* The type Global transactional interceptor parser.
*/
@Deprecated
public class GlobalTransactionalInterceptorParser extends org.apache.seata.integration.tx.api.interceptor.parser.GlobalTransactionalInterceptorParser {
public class GlobalTransactionalInterceptorParser
extends org.apache.seata.integration.tx.api.interceptor.parser.GlobalTransactionalInterceptorParser {

@Override
protected boolean existsAnnotation(Class<?>... classes) {
Expand Down Expand Up @@ -65,7 +66,7 @@ protected boolean existsAnnotation(Class<?>... classes) {
}

@Override
public ProxyInvocationHandler createProxyInvocationHandler(){
public ProxyInvocationHandler createProxyInvocationHandler() {
return new GlobalTransactionalInterceptorHandler(FailureHandlerHolder.getFailureHandler(), methodsToProxy);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

/**
* Execution Status
*
*/
@Deprecated
public enum ExecutionStatus {
Expand Down Expand Up @@ -59,7 +58,7 @@ public String getStatusString() {
}

public static ExecutionStatus wrap(org.apache.seata.saga.statelang.domain.ExecutionStatus target) {
if(target == null){
if (target == null) {
return null;
}
switch (target) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

/**
* state execution instance
*
*/
@Deprecated
public class StateInstanceImpl implements StateInstance {
Expand Down Expand Up @@ -214,9 +213,9 @@ public ExecutionStatus getStatus() {

@Override
public void setStatus(ExecutionStatus status) {
if(status == null){
if (status == null) {
actual.setStatus(null);
}else {
} else {
actual.setStatus(status.unwrap());
}
}
Expand All @@ -228,7 +227,7 @@ public StateInstance getCompensationState() {

@Override
public void setCompensationState(StateInstance compensationState) {
actual.setCompensationState(((StateInstanceImpl) compensationState).unwrap());
actual.setCompensationState(((StateInstanceImpl)compensationState).unwrap());
}

@Override
Expand Down
Loading

0 comments on commit 8bd23f3

Please sign in to comment.