我正在尝试使用 gradlew 进行发布。我得到低于错误。
有人熟悉这个错误吗?我能够在本地构建所有内容,只有在我们发布时才会发生问题。
17:11:15,004 ERROR - FAILURE: Build failed with an exception.
17:11:15,004 ERROR -
17:11:15,004 ERROR - * What went wrong:
17:11:15,004 ERROR - Could not resolve all files for configuration ':search-tools-service-application:compileClasspath'.
17:11:15,004 ERROR - > Could not find kafka-clients-test.jar (org.apache.kafka:kafka-clients:0.10.2-kafka-2.2.0).
17:11:15,004 ERROR - Searched in the following locations:
17:11:15,004 ERROR - file:/local_repo/.m2/repository/org/apache/kafka/kafka-clients/0.10.2-kafka-2.2.0/kafka-clients-0.10.2-kafka-2.2.0-test.jar
17:11:15,004 ERROR -
17:11:15,004 ERROR - * Try:
17:11:15,004 INFO -
17:11:15,004 INFO - Deprecated Gradle features were used in this build, making it incompatible …Run Code Online (Sandbox Code Playgroud) 我喜欢上课
public class RoleAccess {
private String roleId;
private List<String> apiIdList;
public String getRoleId() {
return roleId;
}
public void setRoleId(String roleId) {
this.roleId = roleId;
}
public List<String> getApiIdList() {
return apiIdList;
}
public void setApiIdList(List<String> apiIdList) {
this.apiIdList = apiIdList;
}
}
Run Code Online (Sandbox Code Playgroud)
我想创建一个新列表,它将添加来自roleaccess的所有apiIdlist
List<String> apiIdList = new ArrayList<>();
for (RoleAccess roleAccess : roleAccessList) {
if (roleAccess.getApiIdList() != null) {
apiIdList.addAll(roleAccess.getApiIdList());
}
}
Run Code Online (Sandbox Code Playgroud)
我们如何处理流api或哪个是最佳解决方案呢?
我检查了正常的对象列表列表,但我想要列出的对象和内部列表列表我试过这个
List<String> apiIdList = roleAccessList.stream()
.map(RoleAccess::getApiIdList)
.collect(ArrayList::new, List::addAll, List::addAll);
Run Code Online (Sandbox Code Playgroud) apache-kafka ×1
collections ×1
gradle ×1
java ×1
java-8 ×1
java-stream ×1
release ×1
spring-boot ×1