Error building war

Hi,
We need to build a WAR in production mode but when we execute “./gradlew -Pvaadin.productionMode=true bootWar” get this error :

  • What went wrong:
    PS C:\Users\francesc.domenech\ws\goal4\goal4\app> ./gradlew -Pvaadin.productionMode=true bootWar

FAILURE: Build failed with an exception.

  • What went wrong:
    Task ‘.productionMode=true’ not found in root project ‘app’.

Thanks,

Hello!

Do you run command from IDE terminal? On Windows, IDEA uses PowerShell so you should follow their syntactic:

./gradlew "-Pvaadin.productionMode=true" bootWar

Or run command without quotes from CMD.

Hi,
We have run the command with quotes from IDE’s terminal but the error persit. Our project is a composite project with version 1.5.3 of Jmix.
The error is :
FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:compileJava’.

Could not resolve all files for configuration ‘:compileClasspath’.
Could not find org.powel.goal4:gescom-starter:0.0.1.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/org/powel/goal4/gescom-starter/0.0.1/gescom-starter-0.0.1.pom
- https://global.repo.jmix.io/repository/public/org/powel/goal4/gescom-starter/0.0.1/gescom-starter-0.0.1.pom
- file:/C:/Users/francesc.domenech/.m2/repository/org/powel/goal4/gescom-starter/0.0.1/gescom-starter-0.0.1.pom
Required by:
project :
Could not find org.powel.goal4:gester-starter:0.0.1.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/org/powel/goal4/gester-starter/0.0.1/gester-starter-0.0.1.pom
- https://global.repo.jmix.io/repository/public/org/powel/goal4/gester-starter/0.0.1/gester-starter-0.0.1.pom
- file:/C:/Users/francesc.domenech/.m2/repository/org/powel/goal4/gester-starter/0.0.1/gester-starter-0.0.1.pom
Required by:
project :
Could not find org.powel.goal4:gestri-starter:0.0.1.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/org/powel/goal4/gestri-starter/0.0.1/gestri-starter-0.0.1.pom
- https://global.repo.jmix.io/repository/public/org/powel/goal4/gestri-starter/0.0.1/gestri-starter-0.0.1.pom
- file:/C:/Users/francesc.domenech/.m2/repository/org/powel/goal4/gestri-starter/0.0.1/gestri-starter-0.0.1.pom
Required by:
project :

  • Try:

Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.

Do you run command from the application directory? You should build your application using build.gradle file from *my_composite_project_name*-all directory. For instance:

C:\Users\user\projects\composite-projects\inventory-all> ./gradlew "-Pvaadin.productionMode=true" :application:bootWar

Thanks,
With ./gradlew “-Pvaadin.productionMode=true” :application:bootWar, all works fine.