• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jreleaser / jreleaser / #477

04 Apr 2025 05:53PM UTC coverage: 35.124% (-5.1%) from 40.183%
#477

push

github

aalmiray
fix(deploy): Add missing Forgejo messages

Related to #1842

18210 of 51845 relevant lines covered (35.12%)

0.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/sdks/jreleaser-tool-java-sdk/src/main/java/org/jreleaser/sdk/tool/PomChecker.java
1
/*
2
 * SPDX-License-Identifier: Apache-2.0
3
 *
4
 * Copyright 2020-2025 The JReleaser authors.
5
 *
6
 * Licensed under the Apache License, Version 2.0 (the "License");
7
 * you may not use this file except in compliance with the License.
8
 * You may obtain a copy of the License at
9
 *
10
 *     https://www.apache.org/licenses/LICENSE-2.0
11
 *
12
 * Unless required by applicable law or agreed to in writing, software
13
 * distributed under the License is distributed on an "AS IS" BASIS,
14
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
 * See the License for the specific language governing permissions and
16
 * limitations under the License.
17
 */
18
package org.jreleaser.sdk.tool;
19

20
import org.jreleaser.model.api.JReleaserContext;
21
import org.jreleaser.sdk.command.Command;
22
import org.jreleaser.sdk.command.CommandException;
23
import org.jreleaser.sdk.command.CommandExecutor;
24
import org.jreleaser.util.ComparatorUtils;
25
import org.jreleaser.version.SemanticVersion;
26

27
import java.nio.file.Path;
28
import java.util.List;
29

30
/**
31
 * @author Andres Almiray
32
 * @since 1.3.0
33
 */
34
public class PomChecker extends AbstractTool {
35
    public PomChecker(JReleaserContext context, String version) {
36
        super(context, "pomchecker", version);
×
37
    }
×
38

39
    public Command.Result check(Path parent, List<String> args) throws CommandException {
40
        SemanticVersion semver = SemanticVersion.of(version);
×
41
        SemanticVersion ofz = SemanticVersion.of("1.5.0");
×
42
        if (ComparatorUtils.greaterThanOrEqualTo(semver, ofz)) {
×
43
            args.add("-Dorg.kordamp.banner=false");
×
44
        }
45

46
        Command command = tool.asCommand().args(args);
×
47
        return executeCommand(() -> new CommandExecutor(context.getLogger())
×
48
            .executeCommand(parent, command));
×
49
    }
50

51
    public boolean isVersionCompatibleWith(String otherVersion) {
52
        return SemanticVersion.of(version).compareTo(SemanticVersion.of(otherVersion)) >= 0;
×
53
    }
54
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc