de.tototec.sbuild

ZipSchemeHandler

class ZipSchemeHandler extends SchemeResolver with SchemeResolverWithDependencies with CacheableSchemeResolver

The SchemeHandler to extract resources from a ZIP resource.

Syntax

target ::= <scheme> ':' ( single-file | file-pattern ) ';archive=' <archive>
 single-file ::= 'file=' <file> ( ';targetFile=' <file> )?
file-pattern ::= 'regex=' <pattern>

The scheme is the name under which the ZipSchemeHandler was registered.

The archiveis the ZIP archive and can be any supported target resolving to a file target.

Extracting single files

The file is a the path to the to-be-extracted file in the archive. The optional targetFile denotes the location, where the extracted file should be stored.

The ZipSchemeHandler will resolve to a file scheme pointing to the extracted file.

Examples:

// register under the "zip" scheme
SchemeHandler("zip", new ZipSchemeHandler())

// a target that depends on the MANIFEST.MF file extracted from a local file
Target("phony:localTest") dependsOn "zip:file=META-INF/MANIFEST.MF;archive=example-1.0.jar"

// a target that depends on the MANIFEST.MF file extracted from a Maven artifact.
Target("phony:remoteTest") dependsOn "zip:file=META-INF/MANIFEST.MF;archive=mvn:org.example:example:1.0"

Extracting multiple files

Use regex to specify a regular expression pattern which will match those files from the archive to be extracted.

The ZipSchemeHandler will resolve to a phony scheme including all extracted files as attached files.

Remember that it is legal for ZIP resources, to not include directory entries, thus your might want to match concrete files inside the archive.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ZipSchemeHandler
  2. CacheableSchemeResolver
  3. SchemeResolverWithDependencies
  4. SchemeResolver
  5. SchemeHandler
  6. AnyRef
  7. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ZipSchemeHandler(_baseDir: File = null, regexCacheable: Boolean = false)(implicit project: Project)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (ZipSchemeHandler, B)

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to ArrowAssoc[ZipSchemeHandler] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  7. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  8. val _baseDir: File

  9. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  10. val baseDir: File

  11. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def dependsOn(schemeCtx: SchemeContext): TargetRefs

    Return the dependencies required to be resolved when resolving the given path.

    Return the dependencies required to be resolved when resolving the given path. Please note, that the return value of this method needs to be stable for the same path, as it is evaluated at configuration time, not at resolving time.

    Definition Classes
    ZipSchemeHandlerSchemeResolverWithDependencies
  13. def ensuring(cond: (ZipSchemeHandler) ⇒ Boolean, msg: ⇒ Any): ZipSchemeHandler

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to Ensuring[ZipSchemeHandler] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  14. def ensuring(cond: (ZipSchemeHandler) ⇒ Boolean): ZipSchemeHandler

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to Ensuring[ZipSchemeHandler] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  15. def ensuring(cond: Boolean, msg: ⇒ Any): ZipSchemeHandler

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to Ensuring[ZipSchemeHandler] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  16. def ensuring(cond: Boolean): ZipSchemeHandler

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to Ensuring[ZipSchemeHandler] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  17. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  19. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  20. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  21. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  22. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  23. def isCacheable(schemeCtx: SchemeContext): Boolean

  24. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  25. def localPath(schemeCtx: SchemeContext): String

    The resulting target name (path) this target resolves to.

    The resulting target name (path) this target resolves to.

    Definition Classes
    ZipSchemeHandlerSchemeHandler
  26. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  27. final def notify(): Unit

    Definition Classes
    AnyRef
  28. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  29. def resolve(schemeCtx: SchemeContext, targetContext: TargetContext): Unit

    Actually resolve the dependency/target.

    Actually resolve the dependency/target.

    Definition Classes
    ZipSchemeHandlerSchemeResolver
  30. def split(scanPath: String, keys: Seq[String], parsed: Seq[(String, String)] = Seq()): Seq[(String, String)]

  31. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  32. def toString(): String

    Definition Classes
    AnyRef → Any
  33. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def [B](y: B): (ZipSchemeHandler, B)

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to ArrowAssoc[ZipSchemeHandler] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Shadowed Implicit Value Members

  1. val self: Any

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to StringAdd performed by method any2stringadd in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (zipSchemeHandler: StringAdd).self
    Definition Classes
    StringAdd
  2. val self: Any

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to StringFormat performed by method any2stringfmt in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (zipSchemeHandler: StringFormat).self
    Definition Classes
    StringFormat

Deprecated Value Members

  1. def x: ZipSchemeHandler

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to ArrowAssoc[ZipSchemeHandler] performed by method any2ArrowAssoc in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (zipSchemeHandler: ArrowAssoc[ZipSchemeHandler]).x
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: ZipSchemeHandler

    Implicit information
    This member is added by an implicit conversion from ZipSchemeHandler to Ensuring[ZipSchemeHandler] performed by method any2Ensuring in scala.Predef.
    Shadowing
    This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
    To access this member you can use a type ascription:
    (zipSchemeHandler: Ensuring[ZipSchemeHandler]).x
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from CacheableSchemeResolver

Inherited from SchemeResolver

Inherited from SchemeHandler

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from ZipSchemeHandler to StringAdd

Inherited by implicit conversion any2stringfmt from ZipSchemeHandler to StringFormat

Inherited by implicit conversion any2ArrowAssoc from ZipSchemeHandler to ArrowAssoc[ZipSchemeHandler]

Inherited by implicit conversion any2Ensuring from ZipSchemeHandler to Ensuring[ZipSchemeHandler]

Ungrouped