khalilou88 / jnxplus

Nx plugins that adds Java/Kotlin monorepo support to Nx workspace using Gradle and Maven
MIT License
65 stars 16 forks source link

Extra colon in utils.getExpressionValue() causes generation of application to fail #1389

Closed jeffreyhilaire closed 2 weeks ago

jeffreyhilaire commented 2 weeks ago

Use the @jnxplus/nx-maven:application generator results in a maven error as can be seen below:

nx generate @jnxplus/nx-maven:application --name=flex --configFormat=.yml --groupId=ht.soho.maestria.api --parentProject=api --directory=apps --aggregatorProject='ht.soho.maestria' --framework=none --minima
l=true --tags=assets --no-interactive --dry-run --verbose

 NX  Generating @jnxplus/nx-maven:application

Error: Cannot find configuration for 'ht.soho.maestria'

 NX   Command failed: ./mvnw -Dmaven.repo.local=/home/jhilaire/projects/soho/maestria-monolith/.m2/repository help:evaluate -Dexpression=project.basedir -q -DforceStdout -pl :ht.soho.maestria:api

In the generated maven command, an extra colon is added before the maven project name here.

When removed manually from the source code, I am able to correctly specify the coordinates ht.soho.maestria:api using the aggregatorProject property.

jeffreyhilaire commented 2 weeks ago

I think the issue was elsewhere. I tried again and it works fine now.

khalilou88 commented 2 weeks ago

Aggregator project should be the name of your project or empty for the root project. Here it's a package name