mirror of
https://github.com/rife2/bld
synced 2025-12-20 16:48:38 +01:00
Allow for modulePath and classPath specification using a File array or collection
This commit is contained in:
parent
affa9e1dac
commit
43eabcb5b6
|
|
@ -10,10 +10,7 @@ import rife.bld.operations.exceptions.OperationOptionException;
|
||||||
import rife.tools.exceptions.FileUtilsErrorException;
|
import rife.tools.exceptions.FileUtilsErrorException;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -233,6 +230,18 @@ public abstract class AbstractProcessOperation<T extends AbstractProcessOperatio
|
||||||
return (T) this;
|
return (T) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides classpath entries to use for the operation.
|
||||||
|
*
|
||||||
|
* @param classpath classpath entries for the operation
|
||||||
|
* @return this operation instance
|
||||||
|
* @since 2.3.1
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public T classpath(File... classpath) {
|
||||||
|
return classpath(List.of(classpath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a list of classpath entries to use for the operation.
|
* Provides a list of classpath entries to use for the operation.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -247,6 +256,20 @@ public abstract class AbstractProcessOperation<T extends AbstractProcessOperatio
|
||||||
return (T) this;
|
return (T) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides a list of classpath entries to use for the operation.
|
||||||
|
* <p>
|
||||||
|
* A copy will be created to allow this list to be independently modifiable.
|
||||||
|
*
|
||||||
|
* @param classpath a list of classpath entries for the operation
|
||||||
|
* @return this operation instance
|
||||||
|
* @since 2.3.1
|
||||||
|
*/
|
||||||
|
public T classpath(Collection<File> classpath) {
|
||||||
|
classpath_.addAll(classpath.stream().map(File::getAbsolutePath).toList());
|
||||||
|
return (T) this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides module path entries to use for the operation.
|
* Provides module path entries to use for the operation.
|
||||||
*
|
*
|
||||||
|
|
@ -259,6 +282,17 @@ public abstract class AbstractProcessOperation<T extends AbstractProcessOperatio
|
||||||
return (T) this;
|
return (T) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides module path entries to use for the operation.
|
||||||
|
*
|
||||||
|
* @param modulePath module path entries for the operation
|
||||||
|
* @return this operation instance
|
||||||
|
* @since 2.3.1
|
||||||
|
*/
|
||||||
|
public T modulePath(File... modulePath) {
|
||||||
|
return modulePath(List.of(modulePath));
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides a list of module path entries to use for the operation.
|
* Provides a list of module path entries to use for the operation.
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -273,6 +307,20 @@ public abstract class AbstractProcessOperation<T extends AbstractProcessOperatio
|
||||||
return (T) this;
|
return (T) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provides a list of module path entries to use for the operation.
|
||||||
|
* <p>
|
||||||
|
* A copy will be created to allow this list to be independently modifiable.
|
||||||
|
*
|
||||||
|
* @param modulePath a list of module path entries for the operation
|
||||||
|
* @return this operation instance
|
||||||
|
* @since 2.3.1
|
||||||
|
*/
|
||||||
|
public T modulePath(Collection<File> modulePath) {
|
||||||
|
modulePath_.addAll(modulePath.stream().map(File::getAbsolutePath).toList());
|
||||||
|
return (T) this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides the main class to launch with the java tool.
|
* Provides the main class to launch with the java tool.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue