All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.cli.Run Maven / Gradle / Ivy

There is a newer version: 3.17.0.CR1
Show newest version
package io.quarkus.cli;

import java.util.Map;

import io.quarkus.devtools.project.BuildTool;
import picocli.CommandLine;

@CommandLine.Command(name = "run", sortOptions = false, mixinStandardHelpOptions = false, header = "Run application.")
public class Run extends BuildToolDelegatingCommand {

    private static final Map ACTION_MAPPING = Map.of(BuildTool.MAVEN, "quarkus:run",
            BuildTool.GRADLE, "quarkusRun");

    @CommandLine.Option(names = { "--target" }, description = "Run target.")
    String target;

    @Override
    public void populateContext(BuildToolContext context) {
        super.populateContext(context);
        if (target != null)
            context.getPropertiesOptions().properties.put("quarkus.run.target", target);
    }

    @Override
    public Map getActionMapping() {
        return ACTION_MAPPING;
    }

    @Override
    public String toString() {
        return "Run {}";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy