Class ExternalModuleBuilder

java.lang.Object
com.github.sormuras.bach.project.ExternalModuleBuilder

public class ExternalModuleBuilder extends Object
A builder of external module objects.
  • Constructor Details

    • ExternalModuleBuilder

      public ExternalModuleBuilder(String module)
      Constructs an instance of this class with the given components.
      Parameters:
      module - the name of the module to link
  • Method Details

    • to

      public ExternalModule to(String target)
      Returns a module link whose uri is determined by the given target string.
      Parameters:
      target - the target to parse into a uri
      Returns:
      a module link
    • toPath

      public ExternalModule toPath(String base, String more)
      Returns a module link pointing to local path.
      Parameters:
      base - the base directory
      more - the path to the file
      Returns:
      an external module link
    • toMaven

      public ExternalModule toMaven(String repository, String coordinates)
      Returns a module link pointing to an artifact hosted at the given Maven repository.
      Parameters:
      repository - Maven repository
      coordinates - Maven groupId + ':' + artifactId + ':' version [+ ':' + classifier]
      Returns:
      a Maven-based Link instance
    • toMavenCentral

      public ExternalModule toMavenCentral(String coordinates)
      Returns a module link pointing to an artifact hosted at Maven Central.
      Parameters:
      coordinates - Maven groupId + ':' + artifactId + ':' version [+ ':' + classifier]
      Returns:
      a Maven Central-based Link instance
      See Also:
      search.maven.org
    • toUri

      public ExternalModule toUri(String uri)
      Returns a module link pointing to the given uniform resource identifier.
      Parameters:
      uri - uniform resource identifier of the module
      Returns:
      a module link
    • toUri

      public ExternalModule toUri(URI uri)
      Returns a module link pointing to the given uniform resource identifier.
      Parameters:
      uri - uniform resource identifier of the module
      Returns:
      a module link