Package net.sourceforge.clownfish.core.conf

Examples of net.sourceforge.clownfish.core.conf.Command


    public void execute() throws MojoExecutionException {
       
        try {
            super.execute();
           
            Command command = getCommand();
            postExecute();
           
            if (command.isVerbose() && getLog().isInfoEnabled()) {
                showMessage(UNDEPLOY_MSG, command.getTargetList());
            }
           
            Clownfish clownfish = getClownfish();

            if (!clownfish.undeploy()) {
View Full Code Here


    public void execute() throws MojoExecutionException {
       
        try {
            super.execute();
           
            Command command = getCommand();
            postExecute();
           
            if (command.isVerbose() && getLog().isInfoEnabled()) {
                showMessage(START_MSG, command.getTargetList());
            }
           
            Clownfish clownfish = getClownfish();

            if (!clownfish.start()) {
View Full Code Here

    public void execute() throws MojoExecutionException {
       
        try {
            super.execute();
           
            Command command = getCommand();
            initLocalProperties();
            postExecute();
           
           
            if (command.isVerbose() && getLog().isInfoEnabled()) {
                showMessage(DEPLOYING_ARTIFACT_MSG, command.getTargetList());
            }
           
            Clownfish clownfish = getClownfish();
           
            if (!clownfish.deploy()) {
View Full Code Here

    @Override
    protected void overrideCommandWithConfigurationFile() {
       
        if (!hasValidConfigurationFile()) return;
       
        Command command = getCommand();
        Properties props = command.getProperties();
       
        if (props.containsKey(AUTOSTART_PROP_KEY)) {
            boolean autostartValue = Boolean.parseBoolean(
                    props.getProperty(AUTOSTART_PROP_KEY));
            command.setAutostart(autostartValue);
        }
       
    }
View Full Code Here

    public void execute() throws MojoExecutionException {
       
        try {
            super.execute();
           
            Command command = getCommand();
            postExecute();

            if (command.isVerbose() && getLog().isInfoEnabled()) {
                showMessage(STOP_MSG, command.getTargetList());
            }
           
            Clownfish clownfish = getClownfish();

            if (!clownfish.stop()) {
View Full Code Here

    /**
     * Initialise properties.
     */
    private void initLocalProperties() {
       
        Command command = getCommand();
       
        List<String> artifactTypeList = getClownfishHelper()
                .parseString(getArtifactTypes());
        command.setArtifactTypeList(artifactTypeList);
    }
View Full Code Here

    public void execute() throws MojoExecutionException {
       
        try {
            super.execute();
           
            Command command = getCommand();
            initLocalProperties();
            postExecute();
           
            if (command.isVerbose() && getLog().isInfoEnabled()) {
                showMessage(command);
            }
           
            Clownfish clownfish = getClownfish();
View Full Code Here

    @Override
    protected void overrideCommandWithConfigurationFile() {
       
        if (!hasValidConfigurationFile()) return;
       
        Command command = getCommand();
        Properties props = command.getProperties();
       
        if (props.containsKey(ARTIFACT_TYPES_PROP_KEY)) {
            List<String> artifactTypeList = getClownfishHelper().parseString(
                    props.getProperty(ARTIFACT_TYPES_PROP_KEY));
            command.setArtifactTypeList(artifactTypeList);
        }
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public Command createCommand(AbstractBaseMojo abstractBaseMojo) {
       
        Command  command = new Command(getClownfishHelper());

        List<String> targetList = getClownfishHelper().parseString(
                abstractBaseMojo.getTargets());

        command.setArtifact(abstractBaseMojo.getArtifact())
                .setDeploymentFactoryManagerClassName(
                    abstractBaseMojo.getDeploymentFactoryManagerClassName())
                .setDeploymentManagerURI(
                    abstractBaseMojo.getDeploymentManagerUri())
                .setPassword(abstractBaseMojo.getPassword())
                .setUsername(abstractBaseMojo.getUsername())
                .setVerbose(abstractBaseMojo.isVerbose())
                .setTargetList(targetList);

        if (abstractBaseMojo.getModuleType() != null
                && !"".equals(abstractBaseMojo.getModuleType())) {
            command.setModuleType(abstractBaseMojo.getModuleType());
        }
       
       
        return command;
    }
View Full Code Here

       
        artifactTypeList = new ArrayList<String>();
        artifactTypeList.add("ear");
        artifactTypeList.add("war");

        command = new Command(null);
        command.setTargetList(targetList);
        command.setArtifactTypeList(artifactTypeList);
        command.setArtifact(ARTIFACT_FILENAME);
       
       
View Full Code Here

TOP

Related Classes of net.sourceforge.clownfish.core.conf.Command

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.