Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T09:51:42-04:00)
Maven home: C:\Java\apache-maven-3.2.2
Java version: 1.7.0_60, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.7.0_60\jre
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"Apache Maven 3.2.2 (45f7c06d68e745d05611f7fd14efb6594181933e; 2014-06-17T09:51:42-04:00) Maven home: C:\Java\apache-maven-3.2.2 Java version: 1.7.0_60, vendor: Oracle Corporation Java home: C:\Program Files\Java\jdk1.7.0_60\jre Default locale: en_US, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"
Description
As a user I want to use the following expression in configuration files:
If my static void main String[] arguments are:
--file foo.txt --verbose -x bar
I should be able to say:
- ${main:0} -> --file
- ${main:1} -> foo.txt
- ${main:2} -> --verbose
- ${main:3} -> -x
- ${main:4} -> bar
- ${main:--file} -> foo.txt
- ${main:-x} -> bar
- ${main:bar} -> null
For this to work, I have to call:
import org.apache.logging.log4j.core.lookup.MapLookup; public static void main(String args[]) { //... MapLookup.setMainArguments(args); //... }