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

jreleaser / jreleaser / #512

27 Jul 2025 05:51PM UTC coverage: 45.153% (-0.7%) from 45.803%
#512

push

github

aalmiray
feat(core): Add a --deploy flag to config

Closes #1946

3 of 11 new or added lines in 4 files covered. (27.27%)

845 existing lines in 34 files now uncovered.

23625 of 52322 relevant lines covered (45.15%)

0.45 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/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
 */
UNCOV
32
public class JReleaserConfigTask extends AbstractPlatformAwareJReleaserTask {
×
33
    private boolean full;
34
    private boolean assembly;
35
    private boolean deploy;
36
    private boolean download;
37
    private boolean changelog;
38
    private boolean announce;
39

40
    public void setFull(boolean full) {
UNCOV
41
        this.full = full;
×
UNCOV
42
    }
×
43

44
    public void setAssembly(boolean assembly) {
UNCOV
45
        this.assembly = assembly;
×
UNCOV
46
    }
×
47

48
    public void setDeploy(boolean deploy) {
NEW
49
        this.deploy = deploy;
×
NEW
50
    }
×
51

52
    public void setDownload(boolean download) {
UNCOV
53
        this.download = download;
×
UNCOV
54
    }
×
55

56
    public void setChangelog(boolean changelog) {
UNCOV
57
        this.changelog = changelog;
×
UNCOV
58
    }
×
59

60
    public void setAnnounce(boolean announce) {
UNCOV
61
        this.announce = announce;
×
UNCOV
62
    }
×
63

64
    @Override
65
    protected void doExecute(JReleaserContext context) {
UNCOV
66
        ModelValidator.validate(context);
×
UNCOV
67
        new AntJReleaserModelPrinter(newPrintWriter(System.out))
×
UNCOV
68
            .print(context.getModel().asMap(full));
×
UNCOV
69
        context.report();
×
UNCOV
70
    }
×
71

72
    @Override
73
    protected Mode getMode() {
NEW
74
        if (deploy) return Mode.DEPLOY;
×
UNCOV
75
        if (download) return Mode.DOWNLOAD;
×
UNCOV
76
        if (assembly) return Mode.ASSEMBLE;
×
UNCOV
77
        if (changelog) return Mode.CHANGELOG;
×
UNCOV
78
        if (announce) return Mode.ANNOUNCE;
×
UNCOV
79
        return Mode.CONFIG;
×
80
    }
81

82
    @Override
83
    protected JReleaserCommand getCommand() {
UNCOV
84
        return JReleaserCommand.CONFIG;
×
85
    }
86
}
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