Gatling 3.0.1 is not working when I have couple of maven modules in IntelliJ where as Gatling 2.2.4 works.

Hello Guys,

I am trying to understand what I need to configure/change for gatling 3.0.1 version to work with maven modules in IntelliJ? The same project in gatling 2.2.4 works fine with no issues. I have a module called UI and that POM looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>gatling-maven-plugin-demo</artifactId>
        <groupId>io.gatling</groupId>
        <version>3.0.3</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>ui</artifactId>
    <build>
        <plugins>
            <plugin>
                <groupId>net.alchim31.maven</groupId>
                <artifactId>scala-maven-plugin</artifactId>
                <version>${scala-maven-plugin.version}</version>
            </plugin>
            <plugin>
                <groupId>io.gatling</groupId>
                <artifactId>gatling-maven-plugin</artifactId>
                <version>${gatling-plugin.version}</version>
            </plugin>
        </plugins>

    </build>

</project>

and my main POM file looks like this:

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <groupId>io.gatling</groupId>
  <artifactId>gatling-maven-plugin-demo</artifactId>
  <packaging>pom</packaging>
  <version>3.0.3</version>
  <modules>
    <module>ui</module>
    <module>api</module>
  </modules>

  <properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <gatling.version>${project.version}</gatling.version>
    <gatling-plugin.version>3.0.1</gatling-plugin.version>
    <scala-maven-plugin.version>3.4.4</scala-maven-plugin.version>
  </properties>

  <dependencies>
    <dependency>
      <groupId>io.gatling.highcharts</groupId>
      <artifactId>gatling-charts-highcharts</artifactId>
      <version>${gatling.version}</version>
      <scope>test</scope>
    </dependency>
  </dependencies>

</project>

and when I try to give command line in IntellijConfiguration as “gatling:test -pl ui -am -Dgatling.simulationClass=SmokeSimulation”

I get below error message:

“C:\Program Files\Java\jdk1.8.0_161\bin\java” -Dmaven.multiModuleProjectDirectory=C:\Users\Documents\git\gatling-maven-plugin-demo “-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.6\plugins\maven\lib\maven3” “-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.6\plugins\maven\lib\maven3\bin\m2.conf” “-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.6\lib\idea_rt.jar=54346:C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.6\bin” -Dfile.encoding=UTF-8 -classpath “C:\Program Files\JetBrains\IntelliJ IDEA 2017.1.6\plugins\maven\lib\maven3\boot\plexus-classworlds-2.5.2.jar” org.codehaus.classworlds.Launcher -Didea.version=2017.1.6 gatling:test -pl ui -am -Dgatling.simulationClass=williamhill.whnft.retail.simulations.SmokeSimulation -Dnamespace=dev
[INFO] Scanning for projects…
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] gatling-maven-plugin-demo
[INFO] ui
Downloading: http://maven.apps.local:8082/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml
Downloading: http://maven.apps.local:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://maven.apps.local:8082/nexus/content/groups/public/org/apache/maven/plugins/maven-metadata.xml (12 KB at 0.2 KB/sec)
Downloaded: http://maven.apps.local:8082/nexus/content/groups/public/org/codehaus/mojo/maven-metadata.xml (24 KB at 0.4 KB/sec)
Downloading: http://uk.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://uk.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://uk.maven.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 118.3 KB/sec)
Downloaded: http://uk.maven.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 KB at 71.5 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] gatling-maven-plugin-demo … SKIPPED
[INFO] ui … SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:02 min
[INFO] Finished at: 2019-02-27T17:21:19+00:00
[INFO] Final Memory: 9M/153M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix ‘gatling’ in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\rgolipally.m2\repository), maven.apps.local (http://maven.apps.local:8082/nexus/content/groups/public), uk.maven.org (http://uk.maven.org/maven2)] → [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException

Process finished with exit code 1