const classafFpm::FpmConfig

sys::Obj
  afFpm::FpmConfig

FpmConfig is gathered from a hierarchy of fpm.props files. These files are looked for in the following locations:

  • <FAN_HOME>/etc/afFpm/fpm.props
  • <WORK_DIR>/etc/afFpm/fpm.props
  • ./fpm.props
  • ./../fpm.props
  • ./../../fpm.props (...and so on...)

Note that the config files are additive but the values are not. If all 3 files exist, then all 3 files are merged together, with config values from a more specific file replacing (or overriding) values found in less specific one.

<WORK_DIR> may be specified with the FPM_ENV_PATH environment variable. This means that ALL the config for FPM may live outside of the Fantom installation. The only FPM file that needs to live in the Fantom installation is the afFpm.pod file itself.

Config may be removed by specifying an empty string as a value. For example, to remove the eggbox repository:

fanrRepo.eggbox = 

Read the comments in the actual fpm.props file itself for more details.

baseDir

Source

const File baseDir

The directory used to resolve relative files.

configFiles

Source

const File[] configFiles

The fpm.props files used to generate this class.

dirRepos

Source

const Str:File dirRepos

A map of named directory repositories. These are essentially just dirs of pods.

dump

Source

Str dump()

Dumps debug output to a string. The string will look similar to:

FPM Environment:
   Target Pod : afIoc 3.0+
     Base Dir : C:\
 Fan Home Dir : C:\Apps\fantom-1.0.70
    Work Dirs : C:\Repositories\Fantom
                C:\Apps\fantom-1.0.70
     Temp Dir : C:\Repositories\Fantom\temp
 Config Files : C:\Apps\fantom-1.0.70\etc\afFpm\config.props

    Dir Repos :
      workDir = C:\Repositories\Fantom
      fanHome = C:\Apps\fantom-1.0.70/lib/fan/

   Fanr Repos :
      default = C:\Repositories\Fantom\repo-default
       eggbox = http://eggbox.fantomfactory.org/fanr/
      release = C:\Repositories\Fantom\repo-release
      repo302 = http://repo.status302.com/fanr/
extraPods

Source

const Depend[] extraPods

A list of extra pods to be resolved alongside the target pod.

fanrRepos

Source

const Str:Uri fanrRepos

A map of named fanr repositories, may be local or remote.

homeDir

Source

const File homeDir

The Fantom installation.

launchPods

Source

const Str[] launchPods

A list of libraries used to launch applications

macros

Source

const Str:Str macros

The macros applied to repository paths.

props

Source

const Str:Str props

The properties gleaned from the configFiles (after macros have been applied).

repositories

Source

Repository[] repositories()

Returns a list of all repositories. Note that some repositories may point to the same directory / URL.

repository

Source

Repository? repository(Str repoName, Str? username := null, Str? password := null)

Returns a Repository instance for the named repository. repoName may be either a dirRepo or a fanrRepo.

tempDir

Source

const File tempDir

The temp directory.

workDirs

Source

const File[] workDirs

A list of working directories. The workDir as returned by FpmEnv is is always first item in this list. homeDir is always the last entry in the list, so it is never empty.