You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Springboot app generated with nxrocks 1.2.1, type: Maven
Expected Behaviour
When nx serve app / nx run app:run / nx buildJar app / nx buildWar app / nx buildImage app / nx buildInfo app commands are run, a mvaen equivalent should be executed and the command should complete successfully.
Actual Behaviour
When nx serve app / nx run app:run / nx buildJar app / nx buildWar app / nx buildImage app / nx buildInfo app commands are run, a gradle equivalent is run (for nx serve app the command is ./gradlew.cmd bootRun), which fails due to the project not having gradle configured (I presume).
If I navigate to Java project root directory and run mvnw spring-boot:run, the application starts successfully.
Steps to reproduce the behaviour
Create an empty NX workspace (haven't tested on other workspace setups) with npx create-nx-workspace@latest app
Add the nxrocks springboot dependency npm install --save-dev @nxrocks/nx-spring-boot
Generate a Java Maven Springboot project nx g @nxrocks/nx-spring-boot:app app.
Select these options: Maven, Jar, Java 11 and Java.
Execute nx serve app from the workspace directory
Alternate way to reproduce the behaviour using existing repositories
I have two repositories where I have this bug (and no repositories where it works).
Both contain a description of how they were set up in docs/setup-guide.md
Thank you for reporting the issue. I was able to reproduce it on my windows 10 machine (which is a good sign 😄 ). I will now look into a fix. Stay tuned!
Looking at the 2 repos you mentioned in your first comment, I noticed that the Maven Wrapper (./mvnw) located at the root of the generated spring boot app, is not executable as it should.... which is causing the issue. Indeed, with current implementation of the plugin, the project build system is determined by trying to execute the ./mvnw --version command.
I wasn't able to reproduce the "non executable" ./mvnw on a new project generated from a empty Nx workspace...
Plugin Name and Version:
Nx Version (
nx --version
):Angular CLI version (
ng --version
):Operating System:
Project setup:
Expected Behaviour
When
nx serve app
/nx run app:run
/nx buildJar app
/nx buildWar app
/nx buildImage app
/nx buildInfo app
commands are run, a mvaen equivalent should be executed and the command should complete successfully.Actual Behaviour
When
nx serve app
/nx run app:run
/nx buildJar app
/nx buildWar app
/nx buildImage app
/nx buildInfo app
commands are run, a gradle equivalent is run (fornx serve app
the command is./gradlew.cmd bootRun
), which fails due to the project not having gradle configured (I presume).If I navigate to Java project root directory and run
mvnw spring-boot:run
, the application starts successfully.Steps to reproduce the behaviour
npx create-nx-workspace@latest app
npm install --save-dev @nxrocks/nx-spring-boot
nx g @nxrocks/nx-spring-boot:app app
.Select these options: Maven, Jar, Java 11 and Java.
nx serve app
from the workspace directoryAlternate way to reproduce the behaviour using existing repositories
I have two repositories where I have this bug (and no repositories where it works).
Both contain a description of how they were set up in
docs/setup-guide.md
Behaviour steps will be explained using the second repo:
git clone https://github.com/treecreate/webstore.git
cd webstore
npm install
nx serve api
Extra notes:
I was able to reproduce the bug on my laptop running Windows 10 2004.
The text was updated successfully, but these errors were encountered: