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

jreleaser / jreleaser / #556

22 Nov 2025 04:17PM UTC coverage: 46.213% (-2.0%) from 48.203%
#556

push

github

aalmiray
feat(jdks): Allow filtering by platform

Closes #2000

Co-authored-by: Ixchel Ruiz <ixchelruiz@yahoo.com>

0 of 42 new or added lines in 5 files covered. (0.0%)

1116 existing lines in 107 files now uncovered.

24939 of 53965 relevant lines covered (46.21%)

0.46 hits per line

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

1.75
/plugins/jreleaser/src/main/java/org/jreleaser/cli/FullRelease.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.cli;
19

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

25
import java.util.Set;
26

27
/**
28
 * @author Andres Almiray
29
 * @since 0.1.0
30
 */
31
@CommandLine.Command(name = "full-release")
32
public class FullRelease extends AbstractPlatformAwareModelCommand<Main> {
1✔
33
    @CommandLine.Option(names = {"--dry-run"})
34
    Boolean dryrun;
35

36
    @CommandLine.ArgGroup
37
    Composite composite;
38

UNCOV
39
    static class Composite {
×
40
        @CommandLine.ArgGroup(exclusive = false, order = 1,
41
            headingKey = "include.filter.header")
42
        Include include;
43

44
        @CommandLine.ArgGroup(exclusive = false, order = 2,
45
            headingKey = "exclude.filter.header")
46
        Exclude exclude;
47

48
        String[] includedDeployerTypes() {
UNCOV
49
            return null != include ? include.includedDeployerTypes : null;
×
50
        }
51

52
        String[] includedDeployerNames() {
UNCOV
53
            return null != include ? include.includedDeployerNames : null;
×
54
        }
55

56
        String[] includedUploaderTypes() {
UNCOV
57
            return null != include ? include.includedUploaderTypes : null;
×
58
        }
59

60
        String[] includedUploaderNames() {
UNCOV
61
            return null != include ? include.includedUploaderNames : null;
×
62
        }
63

64
        String[] includedDistributions() {
UNCOV
65
            return null != include ? include.includedDistributions : null;
×
66
        }
67

68
        String[] includedPackagers() {
UNCOV
69
            return null != include ? include.includedPackagers : null;
×
70
        }
71

72
        String[] includedAnnouncers() {
UNCOV
73
            return null != include ? include.includedAnnouncers : null;
×
74
        }
75

76
        String[] excludedDeployerTypes() {
UNCOV
77
            return null != exclude ? exclude.excludedDeployerTypes : null;
×
78
        }
79

80
        String[] excludedDeployerNames() {
UNCOV
81
            return null != exclude ? exclude.excludedDeployerNames : null;
×
82
        }
83

84
        String[] excludedUploaderTypes() {
UNCOV
85
            return null != exclude ? exclude.excludedUploaderTypes : null;
×
86
        }
87

88
        String[] excludedUploaderNames() {
UNCOV
89
            return null != exclude ? exclude.excludedUploaderNames : null;
×
90
        }
91

92
        String[] excludedDistributions() {
UNCOV
93
            return null != exclude ? exclude.excludedDistributions : null;
×
94
        }
95

96
        String[] excludedPackagers() {
UNCOV
97
            return null != exclude ? exclude.excludedPackagers : null;
×
98
        }
99

100
        String[] excludedAnnouncers() {
UNCOV
101
            return null != exclude ? exclude.excludedAnnouncers : null;
×
102
        }
103

104
        String[] includedCatalogers() {
UNCOV
105
            return null != include ? include.includedCatalogers : null;
×
106
        }
107

108
        String[] excludedCatalogers() {
UNCOV
109
            return null != exclude ? exclude.excludedCatalogers : null;
×
110
        }
111
    }
112

113
    static class Include {
×
114
        @CommandLine.Option(names = {"-y", "--deployer"},
115
            paramLabel = "<deployer>")
116
        String[] includedDeployerTypes;
117

118
        @CommandLine.Option(names = {"-yn", "--deployer-name"},
119
            paramLabel = "<name>")
120
        String[] includedDeployerNames;
121

122
        @CommandLine.Option(names = {"-u", "--uploader"},
123
            paramLabel = "<uploader>")
124
        String[] includedUploaderTypes;
125

126
        @CommandLine.Option(names = {"-un", "--uploader-name"},
127
            paramLabel = "<name>")
128
        String[] includedUploaderNames;
129

130
        @CommandLine.Option(names = {"-d", "--distribution"},
131
            paramLabel = "<distribution>")
132
        String[] includedDistributions;
133

134
        @CommandLine.Option(names = {"-p", "--packager"},
135
            paramLabel = "<packager>")
136
        String[] includedPackagers;
137

138
        @CommandLine.Option(names = {"-a", "--announcer"},
139
            paramLabel = "<announcer>")
140
        String[] includedAnnouncers;
141

142
        @CommandLine.Option(names = {"--cataloger"},
143
            paramLabel = "<cataloger>")
144
        String[] includedCatalogers;
145
    }
146

UNCOV
147
    static class Exclude {
×
148
        @CommandLine.Option(names = {"-xy", "--exclude-deployer"},
149
            paramLabel = "<deployer>")
150
        String[] excludedDeployerTypes;
151

152
        @CommandLine.Option(names = {"-xyn", "--exclude-deployer-name"},
153
            paramLabel = "<name>")
154
        String[] excludedDeployerNames;
155

156
        @CommandLine.Option(names = {"-xu", "--exclude-uploader"},
157
            paramLabel = "<uploader>")
158
        String[] excludedUploaderTypes;
159

160
        @CommandLine.Option(names = {"-xun", "--exclude-uploader-name"},
161
            paramLabel = "<name>")
162
        String[] excludedUploaderNames;
163

164
        @CommandLine.Option(names = {"-xd", "--exclude-distribution"},
165
            paramLabel = "<distribution>")
166
        String[] excludedDistributions;
167

168
        @CommandLine.Option(names = {"-xp", "--exclude-packager"},
169
            paramLabel = "<packager>")
170
        String[] excludedPackagers;
171

172
        @CommandLine.Option(names = {"-xa", "--exclude-announcer"},
173
            paramLabel = "<announcer>")
174
        String[] excludedAnnouncers;
175

176
        @CommandLine.Option(names = {"--exclude-cataloger"},
177
            paramLabel = "<cataloger>")
178
        String[] excludedCatalogers;
179
    }
180

181
    @Override
182
    protected void collectCandidateDeprecatedArgs(Set<AbstractCommand.DeprecatedArg> args) {
UNCOV
183
        super.collectCandidateDeprecatedArgs(args);
×
UNCOV
184
        args.add(new DeprecatedArg("-a", "--announcer", "1.5.0"));
×
UNCOV
185
        args.add(new DeprecatedArg("-xa", "--exclude-announcer", "1.5.0"));
×
UNCOV
186
        args.add(new DeprecatedArg("-d", "--distribution", "1.5.0"));
×
UNCOV
187
        args.add(new DeprecatedArg("-xd", "--exclude-distribution", "1.5.0"));
×
UNCOV
188
        args.add(new DeprecatedArg("-p", "--packager", "1.5.0"));
×
UNCOV
189
        args.add(new DeprecatedArg("-xp", "--exclude-packager", "1.5.0"));
×
UNCOV
190
        args.add(new DeprecatedArg("-y", "--deployer", "1.5.0"));
×
UNCOV
191
        args.add(new DeprecatedArg("-yn", "--deployer-name", "1.5.0"));
×
UNCOV
192
        args.add(new DeprecatedArg("-xy", "--exclude-deployer", "1.5.0"));
×
UNCOV
193
        args.add(new DeprecatedArg("-xyn", "--exclude-deployer-name", "1.5.0"));
×
UNCOV
194
        args.add(new DeprecatedArg("-u", "--uploader", "1.5.0"));
×
UNCOV
195
        args.add(new DeprecatedArg("-un", "--uploader-name", "1.5.0"));
×
UNCOV
196
        args.add(new DeprecatedArg("-xu", "--exclude-uploader", "1.5.0"));
×
UNCOV
197
        args.add(new DeprecatedArg("-xun", "--exclude-uploader-name", "1.5.0"));
×
UNCOV
198
    }
×
199

200
    @Override
201
    protected void doExecute(JReleaserContext context) {
UNCOV
202
        if (null != composite) {
×
UNCOV
203
            context.setIncludedDeployerTypes(collectEntries(composite.includedDeployerTypes(), true));
×
UNCOV
204
            context.setIncludedDeployerNames(collectEntries(composite.includedDeployerNames()));
×
UNCOV
205
            context.setIncludedUploaderTypes(collectEntries(composite.includedUploaderTypes(), true));
×
UNCOV
206
            context.setIncludedUploaderNames(collectEntries(composite.includedUploaderNames()));
×
UNCOV
207
            context.setIncludedDistributions(collectEntries(composite.includedDistributions()));
×
UNCOV
208
            context.setIncludedPackagers(collectEntries(composite.includedPackagers(), true));
×
UNCOV
209
            context.setIncludedCatalogers(collectEntries(composite.includedCatalogers(), true));
×
UNCOV
210
            context.setIncludedAnnouncers(collectEntries(composite.includedAnnouncers(), true));
×
UNCOV
211
            context.setExcludedDeployerTypes(collectEntries(composite.excludedDeployerTypes(), true));
×
UNCOV
212
            context.setExcludedDeployerNames(collectEntries(composite.excludedDeployerNames()));
×
UNCOV
213
            context.setExcludedUploaderTypes(collectEntries(composite.excludedUploaderTypes(), true));
×
UNCOV
214
            context.setExcludedUploaderNames(collectEntries(composite.excludedUploaderNames()));
×
UNCOV
215
            context.setExcludedDistributions(collectEntries(composite.excludedDistributions()));
×
UNCOV
216
            context.setExcludedPackagers(collectEntries(composite.excludedPackagers(), true));
×
UNCOV
217
            context.setExcludedAnnouncers(collectEntries(composite.excludedAnnouncers(), true));
×
UNCOV
218
            context.setExcludedCatalogers(collectEntries(composite.excludedCatalogers(), true));
×
219
        }
UNCOV
220
        Workflows.fullRelease(context).execute();
×
UNCOV
221
    }
×
222

223
    @Override
224
    protected Boolean dryrun() {
UNCOV
225
        return dryrun;
×
226
    }
227

228
    @Override
229
    protected JReleaserCommand getCommand() {
UNCOV
230
        return JReleaserCommand.FULL_RELEASE;
×
231
    }
232
}
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