• 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

77.27
/plugins/jreleaser-ant-tasks/src/main/java/org/jreleaser/ant/tasks/JReleaserConfigTask.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.ant.tasks.internal.AntJReleaserModelPrinter;
21
import org.jreleaser.engine.context.ModelValidator;
22
import org.jreleaser.model.api.JReleaserCommand;
23
import org.jreleaser.model.api.JReleaserContext.Mode;
24
import org.jreleaser.model.internal.JReleaserContext;
25

26
import static org.jreleaser.util.IoUtils.newPrintWriter;
27

28
/**
29
 * @author Andres Almiray
30
 * @since 0.1.0
31
 */
32
public class JReleaserConfigTask extends AbstractPlatformAwareJReleaserTask {
1✔
33
    private boolean full;
34
    private boolean assembly;
35
    private boolean download;
36
    private boolean changelog;
37
    private boolean announce;
38

39
    public void setFull(boolean full) {
40
        this.full = full;
1✔
41
    }
1✔
42

43
    public void setAssembly(boolean assembly) {
44
        this.assembly = assembly;
1✔
45
    }
1✔
46

47
    public void setDownload(boolean download) {
48
        this.download = download;
1✔
49
    }
1✔
50

51
    public void setChangelog(boolean changelog) {
52
        this.changelog = changelog;
1✔
53
    }
1✔
54

55
    public void setAnnounce(boolean announce) {
56
        this.announce = announce;
1✔
57
    }
1✔
58

59
    @Override
60
    protected void doExecute(JReleaserContext context) {
61
        ModelValidator.validate(context);
×
62
        new AntJReleaserModelPrinter(newPrintWriter(System.out))
×
63
            .print(context.getModel().asMap(full));
×
64
        context.report();
×
65
    }
×
66

67
    @Override
68
    protected Mode getMode() {
69
        if (download) return Mode.DOWNLOAD;
1✔
70
        if (assembly) return Mode.ASSEMBLE;
1✔
71
        if (changelog) return Mode.CHANGELOG;
1✔
72
        if (announce) return Mode.ANNOUNCE;
1✔
73
        return Mode.CONFIG;
1✔
74
    }
75

76
    @Override
77
    protected JReleaserCommand getCommand() {
78
        return JReleaserCommand.CONFIG;
1✔
79
    }
80
}
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