# FAQs

### How do I pass property values as system properties from command line to tests run via Maven?

Maven adds an extra layer between the command line and the tests themselves.  Two common plugins are used to run tests within Maven:  [maven-failsafe-plugin](https://maven.apache.org/surefire/maven-failsafe-plugin/plugin-info.html) for integration tests and [maven-surefire-plugin](https://maven.apache.org/surefire/maven-surefire-plugin/plugin-info.html) for unit tests.  Both pass parameters the same way from command line:

```bash
mvn clean verify -DargLine="-DMyPropertyName=MyPropertyValue"
```

`mvn clean verify` instructs Maven to create a fresh build, run units tests (surefire), run integration tests (failsafe) and verify the tests passed.

`-DargLine="-DMyPropertyName=MyPropertyValue"` sets a System Property named `argLine`, instructing both plugins to include `-DMyPropertyName=MyPropertyValue` in the command when they invoke a new process to run the tests, resulting in passing system properties to those tests.  Quotes are needed if there are any spaces.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.andhowconfig.org/faqs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
