Fork me on GitHub

env-file:loadenv

Full name:

io.github.mjourard:env-file-maven-plugin:1.0-SNAPSHOT:loadenv

Description:

Goal which loads a dotenv (.env) file into the environment variables for the rest of the maven phase which the plugin is defined for

Attributes:

  • Requires a Maven project to be executed.
  • Binds by default to the lifecycle phase: test.

Required Parameters

Name Type Since Description
<envFileDirectory> String - Directory of the env file. Dot (.) will evaluate to the directory of the pom file of which was executing the goal that this plugin is a part of. Path will be evaluate using the following: FileSystems.getDefault().getPath(path).normalize().toAbsolutePath() Doesn't matter if it ends with a directory separator, one will be appended if it is missing.
Default value is: ./.
User property is: envFileDirectory.
<envFileName> String - Name of the env file, including the extension if it has one.
Default value is: .env.
User property is: envFileName.

Parameter Details

<envFileDirectory>

Directory of the env file. Dot (.) will evaluate to the directory of the pom file of which was executing the goal that this plugin is a part of. Path will be evaluate using the following: FileSystems.getDefault().getPath(path).normalize().toAbsolutePath() Doesn't matter if it ends with a directory separator, one will be appended if it is missing.
  • Type: java.lang.String
  • Required: Yes
  • User Property: envFileDirectory
  • Default: ./

<envFileName>

Name of the env file, including the extension if it has one.
  • Type: java.lang.String
  • Required: Yes
  • User Property: envFileName
  • Default: .env