# gatling-maven plugin - Accessing Plugin Configurations Set in POM.xml Within Simulation Scala files

**URL:** <https://community.gatling.io/t/gatling-maven-plugin-accessing-plugin-configurations-set-in-pom-xml-within-simulation-scala-files/4090>\
**Category:** Gatling (Open-Source)\
**Created:** [December 12, 2017, 6:09pm UTC](https://community.gatling.io/t/gatling-maven-plugin-accessing-plugin-configurations-set-in-pom-xml-within-simulation-scala-files/4090 "2017-12-12T18:09:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Justin\_Barilar](https://avatars.discourse-cdn.com/v4/letter/j/e8c25b/32.png) [@Justin\_Barilar](https://community.gatling.io/u/Justin_Barilar)\
**Post date:** [December 12, 2017, 6:09pm UTC](https://community.gatling.io/t/gatling-maven-plugin-accessing-plugin-configurations-set-in-pom-xml-within-simulation-scala-files/4090/1 "2017-12-12T18:09:41Z")

</div>

Hi everyone,

I’m relatively new to Scala and Gatling but I have come across a problem that I can’t seem to figure out after searching the documentation and this group.

This is specific to the gatling-maven plugin (version 2.2.4).

In the pom.xml file, I am running different profiles and setting options for the gatling-maven plugin to override the default location of the dataFolder in specific instances.

…

> FirstLoad
> 
> test

> > execute

> 

> > ${project.basedir}/src/test/resources/data/prod
> 
> > Misc.First

> 

…

My goal, is to be able to access the data contained within the configuration within the given Simulation file.

How can I access these variables in my Simulation Scala files? I know there are ways to get the gatling.conf vars and application.conf (if one exists) vars, but I’m speaking specifically about configuration changes outlined in the pom.xml?

---

<div class="post-metadata">

**Author:** ![Siegfried\_Goeschl](https://avatars.discourse-cdn.com/v4/letter/s/3d9bf3/32.png) [@Siegfried\_Goeschl](https://community.gatling.io/u/Siegfried_Goeschl)\
**Post date:** [December 15, 2017, 4:03pm UTC](https://community.gatling.io/t/gatling-maven-plugin-accessing-plugin-configurations-set-in-pom-xml-within-simulation-scala-files/4090/2 "2017-12-15T16:03:45Z")

</div>

Hi Justin,

I have a derived class `ConfigurableSimulation` to access that data

```auto

import io.gatling.core.config.GatlingConfiguration

abstract class ConfigurableSimulation(implicit configuration: GatlingConfiguration) extends Simulation {
val dataDirectory = new File(configuration.core.directory.data).getAbsoluteFile
val resultDirectory = new File(configuration.core.directory.results).getAbsoluteFile
}

```
