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

org.sitoolkit.wt.gui.domain.update.UpdateProcessClient Maven / Gradle / Ivy

There is a newer version: 2.3
Show newest version
package org.sitoolkit.wt.gui.domain.update;

import java.io.File;
import java.util.List;

import org.sitoolkit.wt.gui.infra.maven.MavenUtils;
import org.sitoolkit.wt.gui.infra.process.ConversationProcess;
import org.sitoolkit.wt.gui.infra.process.ConversationProcessContainer;
import org.sitoolkit.wt.gui.infra.process.ProcessParams;

public class UpdateProcessClient {

    public UpdateProcessClient() {
    }

    public void checkVersion(File pomFile, VersionCheckMode mode, ProcessParams params) {

        List command = MavenUtils.getCommand(params);
        command.add(mode.getPluginGoal());
        command.add("-f");
        command.add(pomFile.getAbsolutePath());
        params.setCommand(command);

        ConversationProcess process = ConversationProcessContainer.create();
        process.start(params);

    }

    public void dependencyCopy(File destDir, String artifact, ProcessParams params) {

        List command = MavenUtils.getCommand(params);
        command.add("dependency:copy");
        command.add("-Dartifact=" + artifact);
        command.add("-DoutputDirectory=" + destDir.getAbsolutePath());
        params.setCommand(command);

        ConversationProcess process = ConversationProcessContainer.create();
        process.start(params);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy