class_docstr: MavenDefinition captures the maven invocation arguments.
  
  It allows creating build directories with the same definition, e.g.
  ```
  build_1 = maven_def.build("/tmp/build-1")
  build_2 = maven_def.build("/tmp/build-2")
  
  ...
  
  build1.install()
  build2.install()
docstr: Invoke maven into a build directory.
  
  Parameters
  ----------
  build_dir : str
              Directory in which the Maven build will be instantiated.
  force : bool
          not used now
docstr_tok: ["Invoke","maven","into","a","build","directory",".","Parameters","--","--","--","--","--","build_dir",":","str","Directory","in","which","the","Maven","build","will","be","instantiated",".","force",":","bool","not","used","now"]
code: def build(self, build_dir, force=False, cmd_kwargs=None, **kwargs):
      """Invoke maven into a build directory.
  
      Parameters
      ----------
      build_dir : str
                  Directory in which the Maven build will be instantiated.
      force : bool
              not used now
      """
      if os.path.exists(build_dir):
          # Extra safety to ensure we're deleting a build folder.
          if not MavenBuild.is_build_dir(build_dir):
              raise FileExistsError(
                  "{} is not a maven build".format(build_dir)
              )
  
      cmd_kwargs = cmd_kwargs if cmd_kwargs else {}
      assert MavenBuild.is_build_dir(build_dir)
      maven(
          *self.build_arguments,
          cwd=build_dir,
          env=self.env,
          **cmd_kwargs,
      )
      return MavenBuild(build_dir, definition=self, **kwargs)
  
imports: import os
  from .command import Command, default_bin
label_desc: Use image node_id 3 for calling the MavenDefinition obj's underlying member method code with example usage: obj.build(build_dir, force, cmd_kwargs) and returns: MavenBuild