• 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

10.0
/plugins/jreleaser/src/main/java/org/jreleaser/cli/Init.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.JReleaserException;
21
import picocli.CommandLine;
22

23
import java.nio.file.Path;
24
import java.nio.file.Paths;
25

26
/**
27
 * @author Andres Almiray
28
 * @since 0.1.0
29
 */
30
@CommandLine.Command(name = "init")
31
public class Init extends AbstractLoggingCommand<Main> {
1✔
32
    @CommandLine.Option(names = {"-o", "--overwrite"})
33
    boolean overwrite;
34

35
    @CommandLine.Option(names = {"-f", "--format"})
36
    String format;
37

38
    @CommandLine.ParentCommand
39
    Main parent;
40

41
    private Path outputDirectory;
42

43
    @Override
44
    protected Main parent() {
UNCOV
45
        return parent;
×
46
    }
47

48
    @Override
49
    protected void execute() {
50
        try {
UNCOV
51
            outputDirectory = null != basedir ? basedir : Paths.get(".").normalize();
×
UNCOV
52
            initLogger();
×
UNCOV
53
            org.jreleaser.engine.init.Init.execute(logger, format, overwrite, outputDirectory);
×
54
        } catch (IllegalStateException e) {
×
55
            throw new JReleaserException($("ERROR_unexpected_error"), e);
×
56
        } finally {
UNCOV
57
            if (null != logger) logger.close();
×
58
        }
UNCOV
59
    }
×
60

61
    @Override
62
    protected Path getOutputDirectory() {
UNCOV
63
        return outputDirectory;
×
64
    }
65
}
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