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

org.sitoolkit.wt.gui.app.test.SitWtRuntimeService Maven / Gradle / Ivy

The newest version!
package org.sitoolkit.wt.gui.app.test;

import java.io.File;

import org.sitoolkit.wt.gui.domain.test.MavenClasspahListener;
import org.sitoolkit.wt.gui.domain.test.SitWtRuntimeProcessClient;
import org.sitoolkit.wt.gui.domain.test.SitWtRuntimeUtils;
import org.sitoolkit.wt.util.infra.process.ProcessExitCallback;
import org.sitoolkit.wt.util.infra.process.ProcessParams;

public class SitWtRuntimeService {

    SitWtRuntimeProcessClient client = new SitWtRuntimeProcessClient();

    public SitWtRuntimeService() {
    }

    /**
     * {@code pomFile}のclasspathを{@link SitWtRuntimeUtils}に設定します。
     *
     * 

処理順

*
    *
  1. mvn dependency:build-classpath -f ${pomFile} *
* * @param pomFile * プロジェクトのpom.xml * @param exitCallback * クラスパス取得後のCallback */ public void loadClasspath(File pomFile, ProcessExitCallback exitCallback) { ProcessParams params = new ProcessParams(); MavenClasspahListener classpathListener = new MavenClasspahListener(); params.getStdoutListeners().add(classpathListener); params.getExitClallbacks().add(exitCallback); params.getExitClallbacks().add(exitCode -> { SitWtRuntimeUtils.setSitWtClasspath(classpathListener.getClasspath()); }); client.buildClasspath(pomFile, params); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy