• 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
/plugins/jreleaser-ant-tasks/src/main/java/org/jreleaser/ant/tasks/JReleaserDeployTask.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.ant.tasks;
19

20
import org.jreleaser.model.api.JReleaserCommand;
21
import org.jreleaser.model.api.JReleaserContext.Mode;
22
import org.jreleaser.model.internal.JReleaserContext;
23
import org.jreleaser.workflow.Workflows;
24

25
import java.util.ArrayList;
26
import java.util.List;
27

28
import static org.jreleaser.model.api.JReleaserContext.Mode.DEPLOY;
29

30
/**
31
 * @author Andres Almiray
32
 * @since 1.3.0
33
 */
34
public class JReleaserDeployTask extends AbstractJReleaserTask {
×
35
    private final List<String> deployerTypes = new ArrayList<>();
×
36
    private final List<String> excludedDeployerTypes = new ArrayList<>();
×
37
    private final List<String> deployerNames = new ArrayList<>();
×
38
    private final List<String> excludedDeployerNames = new ArrayList<>();
×
39

40
    public void setDeployerTypes(String deployerTypes) {
41
        this.deployerTypes.addAll(expandAndCollect(deployerTypes));
×
42
    }
×
43

44
    public void setExcludedDeployerTypes(String excludedDeployerTypes) {
45
        this.excludedDeployerTypes.addAll(expandAndCollect(excludedDeployerTypes));
×
46
    }
×
47

48
    public void setDeployerNames(String deployerNames) {
49
        this.deployerNames.addAll(expandAndCollect(deployerNames));
×
50
    }
×
51

52
    public void setExcludedDeployerNames(String excludedDeployerNames) {
53
        this.excludedDeployerNames.addAll(expandAndCollect(excludedDeployerNames));
×
54
    }
×
55

56
    public void setDeployerTypes(List<String> deployerTypes) {
57
        if (null != deployerTypes) {
×
58
            this.deployerTypes.addAll(deployerTypes);
×
59
        }
60
    }
×
61

62
    public void setExcludedDeployerTypes(List<String> excludedDeployerTypes) {
63
        if (null != excludedDeployerTypes) {
×
64
            this.excludedDeployerTypes.addAll(excludedDeployerTypes);
×
65
        }
66
    }
×
67

68
    public void setDeployerNames(List<String> deployerNames) {
69
        if (null != deployerNames) {
×
70
            this.deployerNames.addAll(deployerNames);
×
71
        }
72
    }
×
73

74
    public void setExcludedDeployerNames(List<String> excludedDeployerNames) {
75
        if (null != excludedDeployerNames) {
×
76
            this.excludedDeployerNames.addAll(excludedDeployerNames);
×
77
        }
78
    }
×
79

80
    @Override
81
    protected void doExecute(JReleaserContext context) {
82
        context.setIncludedDeployerTypes(collectEntries(deployerTypes, true));
×
83
        context.setExcludedDeployerTypes(collectEntries(excludedDeployerTypes, true));
×
84
        context.setIncludedDeployerNames(deployerNames);
×
85
        context.setExcludedDeployerNames(excludedDeployerNames);
×
86
        Workflows.deploy(context).execute();
×
87
    }
×
88

89
    @Override
90
    protected Mode getMode() {
91
        return DEPLOY;
×
92
    }
93

94
    @Override
95
    protected JReleaserCommand getCommand() {
96
        return JReleaserCommand.DEPLOY;
×
97
    }
98
}
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