object Jvm extends CoursierSupport

Source
Jvm.scala
Linear Supertypes
CoursierSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Jvm
  2. CoursierSupport
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Deprecated Type Members

  1. type JarManifest = api.JarManifest
    Annotations
    @deprecated
    Deprecated

    (Since version Mill after 0.11.0-M4) Use mill.api.JarManifest instead

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def callSubprocess(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String], envArgs: Map[String, String], mainArgs: Seq[String], workingDir: Path, streamOut: Boolean)(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

  6. def callSubprocess(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String], envArgs: Map[String, String], mainArgs: Seq[String], workingDir: Path, streamOut: Boolean, check: Boolean)(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

  7. 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, check: Boolean = true, javaHome: Option[Path] = None)(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

  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  9. def createClasspathPassingJar(jar: Path, classpath: api.Loose.Agg[Path]): Unit
  10. def createJar(jar: Path, inputPaths: api.Loose.Agg[Path], manifest: api.JarManifest, fileFilter: (Path, RelPath) => Boolean): Unit
  11. def createJar(inputPaths: api.Loose.Agg[Path], manifest: api.JarManifest = mill.api.JarManifest.MillDefault, fileFilter: (Path, RelPath) => Boolean = (_, _) => true)(implicit ctx: Dest): api.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 of os.Paths containing files to be included in the jar

    fileFilter

    - optional file filter to select files to be included. Given an os.Path (from inputPaths) and an os.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.

  12. def createLauncher(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String])(implicit ctx: Dest): api.PathRef
  13. def createManifest(mainClass: Option[String]): api.JarManifest
  14. def defaultBackgroundOutputs(outputDir: Path): Option[(ProcessOutput, ProcessOutput)]
  15. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  17. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  19. def inprocess[T](classPath: api.Loose.Agg[Path], classLoaderOverrideSbtTesting: Boolean, isolated: Boolean, closeContextClassLoaderWhenDone: Boolean, body: (ClassLoader) => T)(implicit ctx: Home): T
  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def javaExe: String
  22. def javaExe(javaHome: Option[Path]): String
  23. def jdkTool(toolName: String): String
  24. def jdkTool(toolName: String, javaHome: Option[Path]): String

    Resolves a tool to a path under the currently used JDK (if known).

  25. def jvmIndex(ctx: Option[Log] = None, coursierCacheCustomizer: Option[(FileCache[coursier.util.Task]) => FileCache[coursier.util.Task]] = None): JvmIndex
    Definition Classes
    CoursierSupport
  26. def jvmIndex0(ctx: Option[Log] = None, coursierCacheCustomizer: Option[(FileCache[coursier.util.Task]) => FileCache[coursier.util.Task]] = None, jvmIndexVersion: String = "latest.release"): coursier.util.Task[JvmIndex]
    Definition Classes
    CoursierSupport
  27. def launcherUniversalScript(mainClass: String, shellClassPath: api.Loose.Agg[String], cmdClassPath: api.Loose.Agg[String], jvmArgs: Seq[String], shebang: Boolean = false): String
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  31. def resolveDependencies(repositories: Seq[Repository], deps: IterableOnce[Dependency], force: IterableOnce[Dependency], sources: Boolean, mapDependencies: Option[(Dependency) => Dependency], customizer: Option[(Resolution) => Resolution], ctx: Option[Log], coursierCacheCustomizer: Option[(FileCache[coursier.util.Task]) => FileCache[coursier.util.Task]], resolveFilter: (Path) => Boolean, artifactTypes: Option[Set[Type]]): Result[api.Loose.Agg[api.PathRef]]
    Definition Classes
    CoursierSupport
  32. 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[coursier.util.Task]) => FileCache[coursier.util.Task]] = None, resolveFilter: (Path) => Boolean = _ => true, artifactTypes: Option[Set[Type]] = None, resolutionParams: ResolutionParams = ResolutionParams()): Result[api.Loose.Agg[api.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
  33. def resolveDependenciesMetadataSafe(repositories: Seq[Repository], deps: IterableOnce[Dependency], force: IterableOnce[Dependency], mapDependencies: Option[(Dependency) => Dependency], customizer: Option[(Resolution) => Resolution], ctx: Option[Log], coursierCacheCustomizer: Option[(FileCache[coursier.util.Task]) => FileCache[coursier.util.Task]]): Result[Resolution]
    Definition Classes
    CoursierSupport
  34. def resolveDependenciesMetadataSafe(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[coursier.util.Task]) => FileCache[coursier.util.Task]] = None, resolutionParams: ResolutionParams = ResolutionParams()): Result[Resolution]
    Definition Classes
    CoursierSupport
  35. def resolveJavaHome(id: String, ctx: Option[Log] = None, coursierCacheCustomizer: Option[(FileCache[coursier.util.Task]) => FileCache[coursier.util.Task]] = None, jvmIndexVersion: String = "latest.release"): Result[Path]

    Resolve java home using Coursier.

    Resolve java home using Coursier.

    The id string has format "$DISTRIBUTION:$VERSION". e.g. graalvm-community:23.0.0

    Definition Classes
    CoursierSupport
  36. def runClassloader[T](classPath: api.Loose.Agg[Path])(body: (ClassLoader) => T)(implicit ctx: Home): T
  37. def runLocal(mainClass: String, classPath: api.Loose.Agg[Path], mainArgs: Seq[String] = Seq.empty)(implicit ctx: Ctx): Unit
  38. 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. If process exited with non-zero code, exception will be thrown. If you want to manually handle exit code, check runSubprocessWithResult

  39. def runSubprocess(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String], envArgs: Map[String, String], mainArgs: Seq[String], workingDir: Path, background: Boolean, useCpPassingJar: Boolean)(implicit ctx: Ctx): Unit
  40. def runSubprocess(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String], envArgs: Map[String, String], mainArgs: Seq[String], workingDir: Path, background: Boolean, useCpPassingJar: Boolean, runBackgroundLogToConsole: Boolean)(implicit ctx: Ctx): Unit
  41. 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, runBackgroundLogToConsole: Boolean = false, javaHome: Option[Path] = None)(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

    jvmArgs

    Arguments given to the forked JVM

    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. When true, a temporary empty JAR is created which contains a Class-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

  42. def runSubprocessWithBackgroundOutputs(mainClass: String, classPath: api.Loose.Agg[Path], jvmArgs: Seq[String], envArgs: Map[String, String], mainArgs: Seq[String], workingDir: Path, backgroundOutputs: Option[(ProcessOutput, ProcessOutput)], useCpPassingJar: Boolean)(implicit ctx: Ctx): Unit
  43. 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, javaHome: Option[Path] = None)(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

    jvmArgs

    Arguments given to the forked JVM

    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. When true, a temporary empty JAR is created which contains a Class-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

  44. def runSubprocessWithResult(commandArgs: Seq[String], envArgs: Map[String, String], workingDir: Path): Result[Int]

    Runs a generic subprocess and waits for it to terminate.

    Runs a generic subprocess and waits for it to terminate.

    returns

    Result with exit code.

  45. def spawnClassloader(classPath: Iterable[Path], sharedPrefixes: Seq[String] = Nil, parent: ClassLoader = null): URLClassLoader
  46. 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 substituted streams.

  47. 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 substituted streams.

    If the process should be spawned in the background, destination streams for out and err respectively must be defined in the backgroundOutputs tuple. Non-background process should set backgroundOutputs to None.

  48. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  49. def toString(): String
    Definition Classes
    AnyRef → Any
  50. def universalScript(shellCommands: String, cmdCommands: String, shebang: Boolean = false): String
  51. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  52. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  53. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. val JarManifest: api.JarManifest.type
    Annotations
    @deprecated
    Deprecated

    (Since version Mill after 0.11.0-M4) Use mill.api.JarManifest instead

  2. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

  3. def resolveDependencies(repositories: Seq[Repository], deps: IterableOnce[Dependency], force: IterableOnce[Dependency], sources: Boolean, mapDependencies: Option[(Dependency) => Dependency], customizer: Option[(Resolution) => Resolution], ctx: Option[Log], coursierCacheCustomizer: Option[(FileCache[coursier.util.Task]) => FileCache[coursier.util.Task]], resolveFilter: (Path) => Boolean): Result[api.Loose.Agg[api.PathRef]]
    Definition Classes
    CoursierSupport
    Annotations
    @deprecated
    Deprecated

    (Since version Mill after 0.12.0-RC3) Use the override accepting artifactTypes

  4. 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[coursier.util.Task]) => FileCache[coursier.util.Task]] = None): (Seq[Dependency], Resolution)
    Definition Classes
    CoursierSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 0.12.0) Prefer resolveDependenciesMetadataSafe instead, which returns a Result instead of throwing exceptions

Inherited from CoursierSupport

Inherited from AnyRef

Inherited from Any

Ungrouped