• 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

0.0
/plugins/jreleaser-maven-plugin/src/main/java/org/jreleaser/maven/plugin/JReleaserConfigMojo.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.maven.plugin;
19

20
import org.apache.maven.plugin.MojoExecutionException;
21
import org.apache.maven.plugin.MojoFailureException;
22
import org.apache.maven.plugins.annotations.Mojo;
23
import org.apache.maven.plugins.annotations.Parameter;
24
import org.jreleaser.engine.context.ModelValidator;
25
import org.jreleaser.maven.plugin.internal.MavenJReleaserModelPrinter;
26
import org.jreleaser.model.api.JReleaserCommand;
27
import org.jreleaser.model.api.JReleaserContext.Mode;
28
import org.jreleaser.model.internal.JReleaserContext;
29

30
import static org.jreleaser.util.IoUtils.newPrintWriter;
31

32
/**
33
 * Display current configuration.
34
 *
35
 * @author Andres Almiray
36
 * @since 0.1.0
37
 */
38
@Mojo(threadSafe = true, name = "config")
UNCOV
39
public class JReleaserConfigMojo extends AbstractPlatformAwareMojo {
×
40
    /**
41
     * Skip execution.
42
     */
43
    @Parameter(property = "jreleaser.config.skip")
44
    private boolean skip;
45
    /**
46
     * Display full configuration.
47
     */
48
    @Parameter(property = "jreleaser.config.full")
49
    private boolean full;
50
    /**
51
     * Display announce configuration.
52
     */
53
    @Parameter(property = "jreleaser.config.announce")
54
    private boolean announce;
55
    /**
56
     * Display assembly configuration.
57
     */
58
    @Parameter(property = "jreleaser.config.assembly")
59
    private boolean assembly;
60
    /**
61
     * Display changelog configuration.
62
     */
63
    @Parameter(property = "jreleaser.config.changelog")
64
    private boolean changelog;
65
    /**
66
     * Display download configuration.
67
     */
68
    @Parameter(property = "jreleaser.config.download")
69
    private boolean download;
70
    /**
71
     * Display deploy configuration.
72
     */
73
    @Parameter(property = "jreleaser.config.deploy")
74
    private boolean deploy;
75

76
    @Override
77
    protected void doExecute() throws MojoExecutionException, MojoFailureException {
UNCOV
78
        JReleaserContext context = createContext();
×
UNCOV
79
        ModelValidator.validate(context);
×
UNCOV
80
        new MavenJReleaserModelPrinter(newPrintWriter(System.out))
×
UNCOV
81
            .print(context.getModel().asMap(full));
×
UNCOV
82
        context.report();
×
UNCOV
83
    }
×
84

85
    @Override
86
    protected Mode getMode() {
UNCOV
87
        if (deploy) return Mode.DEPLOY;
×
UNCOV
88
        if (download) return Mode.DOWNLOAD;
×
UNCOV
89
        if (assembly) return Mode.ASSEMBLE;
×
UNCOV
90
        if (changelog) return Mode.CHANGELOG;
×
UNCOV
91
        if (announce) return Mode.ANNOUNCE;
×
UNCOV
92
        return Mode.CONFIG;
×
93
    }
94

95
    @Override
96
    protected boolean isSkip() {
UNCOV
97
        return skip;
×
98
    }
99

100
    @Override
101
    protected JReleaserCommand getCommand() {
UNCOV
102
        return JReleaserCommand.CONFIG;
×
103
    }
104
}
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