Skip to content

Commit

Permalink
skip plugin dependency for IFlinkCluster.SKIP_PLUGIN_NAMES
Browse files Browse the repository at this point in the history
  • Loading branch information
baisui1981 committed Apr 5, 2024
1 parent 3378446 commit 4d6bf04
Showing 1 changed file with 25 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
/**
* 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:https://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.
* 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
* <p>
* http:https://www.apache.org/licenses/LICENSE-2.0
* <p>
* 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.
*/

package com.qlangtech.tis.extension;

import com.qlangtech.tis.config.flink.IFlinkCluster;
import com.qlangtech.tis.maven.plugins.tpi.PluginClassifier;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.List;
import java.util.Optional;
Expand All @@ -31,6 +34,7 @@
* @create: 2022-06-22 10:06
**/
public interface ITPIArtifact {
Logger logger = LoggerFactory.getLogger(ITPIArtifact.class);

static ITPIArtifactMatch matchh(String requiredFrom, Optional<PluginClassifier> classifier) {
return new ITPIArtifactMatch(requiredFrom, classifier);
Expand Down Expand Up @@ -59,8 +63,12 @@ static void matchDependency(PluginManager pluginManager, List<PluginWrapper.Depe
if (p != null) {
pluginConsumer.accept(Pair.of(p, d));
} else {
for (Consumer<Pair<PluginWrapper.Dependency, ITPIArtifactMatch>> c : missConsumer) {
c.accept(Pair.of(d, match));
if (!IFlinkCluster.SKIP_PLUGIN_NAMES.contains(d.shortName)) {
for (Consumer<Pair<PluginWrapper.Dependency, ITPIArtifactMatch>> c : missConsumer) {
c.accept(Pair.of(d, match));
}
} else {
logger.warn("skip plugin dependency for:{}", d);
}
}
}
Expand Down Expand Up @@ -105,7 +113,6 @@ public static boolean isEquals(ITPIArtifact dptCandidate, ITPIArtifactMatch b) {
PluginClassifier.validate(b.getRequiredFrom(), b.getIdentityName(), ca, ba);



if (ca.isPresent()) {
PluginClassifier candidateClassifier = ca.get();
// PluginClassifier classifier = ba.get();
Expand Down

0 comments on commit 4d6bf04

Please sign in to comment.