# Not able to build Gatling Maven project in Intellij

**URL:** <https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369>\
**Category:** Gatling (Open-Source)\
**Created:** [October 16, 2023, 5:54am UTC](https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369 "2023-10-16T05:54:06Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![senthilkumarmani](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@senthilkumarmani](https://community.gatling.io/u/senthilkumarmani)\
**Post date:** [October 16, 2023, 5:54am UTC](https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369/1 "2023-10-16T05:54:06Z")

</div>

Am getting below error while building the sample maven project

D:\gatling-maven-plugin-demo-main\src\test\scala\Engine.scala  
object gatling is not a member of package io  
import io.gatling.app.Gatling

---

<div class="post-metadata">

**Author:** ![sbrevet](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/sbrevet/32/830_2.png) [@sbrevet](https://community.gatling.io/u/sbrevet)\
**Post date:** [October 16, 2023, 6:42am UTC](https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369/2 "2023-10-16T06:42:37Z")

</div>

Hi @senthilkumarmani,

Welcome aboard!

I just tried now to compile, and everything is fine.

My steps:

```console
git clone git@github.com:gatling/gatling-maven-plugin-demo-scala.git
cd gatling-maven-plugin-demo
mvn compile

```

My information:

```console
$ java -version
openjdk version "17.0.8.1" 2023-08-24
OpenJDK Runtime Environment (build 17.0.8.1+1)
OpenJDK 64-Bit Server VM (build 17.0.8.1+1, mixed mode)
$ mvn -version
Apache Maven 3.8.7 (b89d5959fcde851dcb1c8946a785a163f14e1e29)
Maven home: /opt/maven
Java version: 17.0.8.1, vendor: N/A, runtime: /usr/lib/jvm/java-17-openjdk
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "6.5.5-arch1-1", arch: "amd64", family: "unix"

```

I’m not on Windows, but such error is not relative to OS.

What were your steps? What is your java version? Your maven version?  
Do you compile from maven or from your IDE? Which one?

Cheers!

---

<div class="post-metadata">

**Author:** ![senthilkumarmani](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@senthilkumarmani](https://community.gatling.io/u/senthilkumarmani)\
**Post date:** [October 17, 2023, 4:20am UTC](https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369/3 "2023-10-17T04:20:39Z")

</div>

Hi @sbrevet ,

Am new to Gatling as well as performance testing  
I tried to compile the maven project using IntelliJ IDE

Below are the version details  
OS : Windows , version : Windows 10 Pro  
java version “12.0.2”  
JDK 12.0.2+10

Thanks

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [October 17, 2023, 5:52am UTC](https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369/4 "2023-10-17T05:52:10Z")

</div>

If you’re a new beginner, I really recommend that you go with Gatling Java instead of Gatling Scala as it will work out of the box with IntelliJ while Scala requires some extra steps.

---

<div class="post-metadata">

**Author:** ![slandelle](https://dub1.discourse-cdn.com/flex013/user_avatar/community.gatling.io/slandelle/32/4_2.png) [@slandelle](https://community.gatling.io/u/slandelle)\
**Post date:** [October 17, 2023, 7:03am UTC](https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369/5 "2023-10-17T07:03:17Z")

</div>

Note: there’s a bug in IntelliJ’s scala-maven-plugin support. I’ve just reported it: [https://youtrack.jetbrains.com/issue/SCL-21701/scala-maven-plugin-based-projects-shouldnt-require-the-scalaVersion-config-option-to-be-defined-in-order-to-be-properly-imported](https://youtrack.jetbrains.com/issue/SCL-21701/scala-maven-plugin-based-projects-shouldnt-require-the-scalaVersion-config-option-to-be-defined-in-order-to-be-properly-imported)

In the meantime, I’ve updated the sample project and added some boilerplate to make it work: [chore: force scalaVersion option so IntelliJ figures it out · gatling/gatling-maven-plugin-demo-scala@e62d326 · GitHub](https://github.com/gatling/gatling-maven-plugin-demo-scala/commit/e62d326e2d4f526501c180ab33bd9ee11cde5bb4)

---

<div class="post-metadata">

**Author:** ![senthilkumarmani](https://avatars.discourse-cdn.com/v4/letter/s/a587f6/32.png) [@senthilkumarmani](https://community.gatling.io/u/senthilkumarmani)\
**Post date:** [October 17, 2023, 9:42am UTC](https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369/6 "2023-10-17T09:42:26Z")

</div>

Sure let me try with Gatling Java. Thanks

---

<div class="post-metadata">

**Author:** ![system](https://europe1.discourse-cdn.com/flex013/uploads/gatling2/original/2X/b/b148e0742de35c6280726cabf3ecd3de2d320f63.png) [@system](https://community.gatling.io/u/system)\
**Post date:** [November 16, 2023, 9:42am UTC](https://community.gatling.io/t/not-able-to-build-gatling-maven-project-in-intellij/8369/7 "2023-11-16T09:42:42Z")

</div>

Closed on November 16, 2023, 9:42am UTC

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
