object Jvm extends CoursierSupport
- Alphabetic
- By Inheritance
- Jvm
- CoursierSupport
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Deprecated Type Members
- type JarManifest = api.JarManifest
- Annotations
- @deprecated
- Deprecated
(Since version Mill after 0.11.0-M4) Use mill.api.JarManifest instead
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def callSubprocess(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String] = Seq.empty, envArgs: Map[String, String] = Map.empty, mainArgs: Seq[String] = Seq.empty, workingDir: Path = null, streamOut: Boolean = true)(implicit ctx: Ctx): CommandResult
Runs a JVM subprocess with the given configuration and returns a os.CommandResult with it's aggregated output and error streams
Runs a JVM subprocess with the given configuration and returns a os.CommandResult with it's aggregated output and error streams
- Annotations
- @Scaladoc()
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def createClasspathPassingJar(jar: Path, classpath: api.Loose.Agg[Path]): Unit
- def createJar(jar: Path, inputPaths: api.Loose.Agg[Path], manifest: api.JarManifest, fileFilter: (Path, RelPath) => Boolean): Unit
- def createJar(inputPaths: api.Loose.Agg[Path], manifest: api.JarManifest = mill.api.JarManifest.MillDefault, fileFilter: (Path, RelPath) => Boolean = (_, _) => true)(implicit ctx: Dest): PathRef
Create a jar file containing all files from the specified input Paths, called out.jar in the implicit ctx.dest folder.
Create a jar file containing all files from the specified input Paths, called out.jar in the implicit ctx.dest folder. An optional main class may be provided for the jar. An optional filter function may also be provided to selectively include/exclude specific files.
- inputPaths
-
Agg
ofos.Path
s containing files to be included in the jar- fileFilter
- optional file filter to select files to be included. Given a
os.Path
(from inputPaths) and aos.RelPath
for the individual file, return true if the file is to be included in the jar.- ctx
- implicit
Ctx.Dest
used to determine the output directory for the jar.- returns
- a
PathRef
for the created jar.
- Annotations
- @Scaladoc()
- def createLauncher(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String])(implicit ctx: Dest): PathRef
- def createManifest(mainClass: Option[String]): api.JarManifest
- def defaultBackgroundOutputs(outputDir: Path): Option[(ProcessOutput, ProcessOutput)]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def inprocess[T](classPath: api.Loose.Agg[Path], classLoaderOverrideSbtTesting: Boolean, isolated: Boolean, closeContextClassLoaderWhenDone: Boolean, body: (ClassLoader) => T)(implicit ctx: Home): T
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def javaExe: String
- def jdkTool(toolName: String): String
Resolves a tool to a path under the currently used JDK (if known).
Resolves a tool to a path under the currently used JDK (if known).
- Annotations
- @Scaladoc()
- def launcherUniversalScript(mainClass: String, shellClassPath: api.Loose.Agg[String], cmdClassPath: api.Loose.Agg[String], jvmArgs: Seq[String], shebang: Boolean = false): String
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def resolveDependencies(repositories: Seq[Repository], deps: IterableOnce[Dependency], force: IterableOnce[Dependency], sources: Boolean = false, mapDependencies: Option[(Dependency) => Dependency] = None, customizer: Option[(Resolution) => Resolution] = None, ctx: Option[Log] = None, coursierCacheCustomizer: Option[(FileCache[Task]) => FileCache[Task]] = None, resolveFilter: (Path) => Boolean = _ => true): Result[api.Loose.Agg[PathRef]]
Resolve dependencies using Coursier.
Resolve dependencies using Coursier.
We do not bother breaking this out into the separate ZincWorkerApi classpath, because Coursier is already bundled with mill/Ammonite to support the
import $ivy
syntax.- Definition Classes
- CoursierSupport
- Annotations
- @Scaladoc()
- def resolveDependenciesMetadata(repositories: Seq[Repository], deps: IterableOnce[Dependency], force: IterableOnce[Dependency], mapDependencies: Option[(Dependency) => Dependency] = None, customizer: Option[(Resolution) => Resolution] = None, ctx: Option[Log] = None, coursierCacheCustomizer: Option[(FileCache[Task]) => FileCache[Task]] = None): (Seq[Dependency], Resolution)
- Definition Classes
- CoursierSupport
- def runLocal(mainClass: String, classPath: api.Loose.Agg[Path], mainArgs: Seq[String] = Seq.empty)(implicit ctx: Ctx): Unit
- def runSubprocess(commandArgs: Seq[String], envArgs: Map[String, String], workingDir: Path): Unit
Runs a generic subprocess and waits for it to terminate.
Runs a generic subprocess and waits for it to terminate.
- Annotations
- @Scaladoc()
- def runSubprocess(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String] = Seq.empty, envArgs: Map[String, String] = Map.empty, mainArgs: Seq[String] = Seq.empty, workingDir: Path = null, background: Boolean = false, useCpPassingJar: Boolean = false)(implicit ctx: Ctx): Unit
Runs a JVM subprocess with the given configuration and streams it's stdout and stderr to the console.
Runs a JVM subprocess with the given configuration and streams it's stdout and stderr to the console.
- mainClass
The main class to run
- classPath
The classpath
- envArgs
Environment variables used when starting the forked JVM
- workingDir
The working directory to be used by the forked JVM
- background
true
if the forked JVM should be spawned in background- useCpPassingJar
When
false
, the-cp
parameter is used to pass the classpath to the forked JVM. Whentrue
, a temporary empty JAR is created which contains aClass-Path
manifest entry containing the actual classpath. This might help with long classpaths on OS'es (like Windows) which only supports limited command-line length
- Annotations
- @Scaladoc()
- def runSubprocessWithBackgroundOutputs(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String] = Seq.empty, envArgs: Map[String, String] = Map.empty, mainArgs: Seq[String] = Seq.empty, workingDir: Path = null, backgroundOutputs: Option[(ProcessOutput, ProcessOutput)] = None, useCpPassingJar: Boolean = false)(implicit ctx: Ctx): Unit
Runs a JVM subprocess with the given configuration and streams it's stdout and stderr to the console.
Runs a JVM subprocess with the given configuration and streams it's stdout and stderr to the console.
- mainClass
The main class to run
- classPath
The classpath
- envArgs
Environment variables used when starting the forked JVM
- workingDir
The working directory to be used by the forked JVM
- backgroundOutputs
If the subprocess should run in the background, a Tuple of ProcessOutputs containing out and err respectively. Specify None for nonbackground processes.
- useCpPassingJar
When
false
, the-cp
parameter is used to pass the classpath to the forked JVM. Whentrue
, a temporary empty JAR is created which contains aClass-Path
manifest entry containing the actual classpath. This might help with long classpaths on OS'es (like Windows) which only supports limited command-line length
- Annotations
- @Scaladoc()
- def spawnSubprocess(commandArgs: Seq[String], envArgs: Map[String, String], workingDir: Path, background: Boolean = false): SubProcess
Spawns a generic subprocess, streaming the stdout and stderr to the console.
Spawns a generic subprocess, streaming the stdout and stderr to the console. If the System.out/System.err have been substituted, makes sure that the subprocess's stdout and stderr streams go to the subtituted streams
- Annotations
- @Scaladoc()
- def spawnSubprocessWithBackgroundOutputs(commandArgs: Seq[String], envArgs: Map[String, String], workingDir: Path, backgroundOutputs: Option[(ProcessOutput, ProcessOutput)] = None): SubProcess
Spawns a generic subprocess, streaming the stdout and stderr to the console.
Spawns a generic subprocess, streaming the stdout and stderr to the console. If the System.out/System.err have been substituted, makes sure that the subprocess's stdout and stderr streams go to the subtituted streams.
If the process should be spawned in the background, destination streams for out and err respectively must be defined in the backgroundOutputs tuple. Nonbackground process should set backgroundOutputs to None
- Annotations
- @Scaladoc()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- def universalScript(shellCommands: String, cmdCommands: String, shebang: Boolean = false): String
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
Deprecated Value Members
- val JarManifest: api.JarManifest.type
- Annotations
- @deprecated
- Deprecated
(Since version Mill after 0.11.0-M4) Use mill.api.JarManifest instead