-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cannot serve #20
Comments
Hi @vladimirdrayling Thank you for raising this. You need to build api before serving it. |
Hi @khalilou88 :) After clearing ⠴ Nx is waiting on 1 dependent project tasks before running tasks from api...
[INFO]
[INFO] --------------------------< de.eon:greeting >---------------------------
⠇ Nx is waiting on 1 dependent project tasks before running tasks from api...
⠋ Nx is waiting on 1 dependent project tasks before running tasks from api...
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory /Users/vladimir.drayling/dev/web/apps/eon/libs/greeting/src/main/resources
[INFO] skip non existing resourceDirectory /Users/vladimir.drayling/dev/web/apps/eon/libs/greeting/src/main/resources
⠸ Nx is waiting on 1 dependent project tasks before running tasks from api...
[INFO] Nothing to compile - all classes are up to date
⠼ Nx is waiting on 1 dependent project tasks before running tasks from api...
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ greeting ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ greeting ---
[INFO] Changes detected - recompiling the module!
⠧ Nx is waiting on 1 dependent project tasks before running tasks from api...
⠇ Nx is waiting on 1 dependent project tasks before running tasks from api...
[INFO] Tests are skipped.
⠙ Nx is waiting on 1 dependent project tasks before running tasks from api...
[INFO] Building jar: /Users/vladimir.drayling/dev/web/apps/eon/libs/greeting/target/greeting-0.0.1-SNAPSHOT.jar
⠹ Nx is waiting on 1 dependent project tasks before running tasks from api...
[INFO] Installing /Users/vladimir.drayling/dev/web/apps/eon/libs/greeting/target/greeting-0.0.1-SNAPSHOT.jar to /Users/vladimir.drayling/.m2/repository/de/eon/greeting/0.0.1-SNAPSHOT/greeting-0.0.1-SNAPSHOT.jar
[INFO] Installing /Users/vladimir.drayling/dev/web/apps/eon/libs/greeting/pom.xml to /Users/vladimir.drayling/.m2/repository/de/eon/greeting/0.0.1-SNAPSHOT/greeting-0.0.1-SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6.907 s
✔ 1/1 dependent project tasks succeeded [0 read from cache]
Hint: you can run the command with --verbose to see the full dependent project outputs
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> nx run api:build
Executor ran for Build: {}
[INFO] Scanning for projects...
[INFO]
[INFO] -----------------------------< de.eon:api >-----------------------------
[INFO] Building api 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.675 s
[INFO] Finished at: 2022-03-04T13:46:01+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project api: Could not resolve dependencies for project de.eon:api:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at de.eon:greeting:jar:0.0.1-SNAPSHOT: Failed to read artifact descriptor for de.eon:greeting:jar:0.0.1-SNAPSHOT: Could not find artifact de.eon:boot-multi-module:pom:0.0.1-SNAPSHOT -> [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/DependencyResolutionException
——————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> NX Ran target build for project api and 1 task(s) it depends on (10s)
✖ 1/2 failed
✔ 1/2 succeeded [0 read from cache] |
Can you please provide nx.json content? |
{
"npmScope": "eon",
"affected": {
"defaultBase": "master"
},
"cli": {
"defaultCollection": "@nrwl/angular",
"packageManager": "yarn"
},
"implicitDependencies": {
"package.json": {
"dependencies": "*",
"devDependencies": "*"
},
".eslintrc.json": "*"
},
"tasksRunnerOptions": {
"default": {
"runner": "@nrwl/workspace/tasks-runners/default",
"options": {
"cacheableOperations": ["build", "lint", "test", "e2e"]
}
}
},
"targetDependencies": {
"build": [
{
"target": "build",
"projects": "dependencies"
}
]
},
"generators": {
"@nrwl/angular:application": {
"style": "scss",
"linter": "eslint",
"unitTestRunner": "jest",
"e2eTestRunner": "cypress"
},
"@nrwl/angular:library": {
"linter": "eslint",
"unitTestRunner": "jest"
},
"@nrwl/angular:component": {
"style": "scss"
}
},
"defaultProject": "web-client",
"plugins": ["@jnxplus/nx-boot-maven"]
} |
the nx.json file has the part about building deps:
Really, I don't see any problem, try with |
Unfortunately I didn't get it to work :( So here is the repo |
Could you remove the two tests files from api and test again.
|
Hi, could it be related to the problem mentioned in this stackoverflow answer?: https://stackoverflow.com/a/19525334/1078986 I got the same error and can fix by running What is missing is the artifact for the parent project. After running command above you will find |
@asinkxcoswt I'm a newbie regarding java. But your suggestion worked out! Thank you! Also thank you @khalilou88 for the help! Together you helped to get this to work! :) Do I need to execute the @khalilou88 is there a way to integrate the command into |
I am not an expert and don't know much about how maven works internally. But as I inspect its behaviors, I found that the parent installed artifact
and then rebuild
It turns out For my project, my team has decided to always re-install the parent project when
|
@asinkxcoswt @vladimirdrayling Maybe we can add |
Unfortunately I'm not a maven spring boot expert, so I can't really answer your question |
@vladimirdrayling now the build should work without running |
Doesn't serve the
api
project with thegreeting
lib.Error
nx report
The text was updated successfully, but these errors were encountered: