Open khalilou88 opened 1 year ago
1- Create a lib for checkstyle linting: build-tools-checkstyle
2- add maven-checkstyle-plugin
to root pom.xml
3- add target config to nx.json
"maven-checkstyle-lint": {
"cache": true,
"dependsOn": [
{
"projects": ["build-tools-checkstyle"],
"target": "build"
}
]
}
4- add target to project.json
"maven-checkstyle-lint": {
"executor": "@jnxplus/nx-maven:run-task",
"options": {
"task": "checkstyle:check"
}
}
code is here https://github.com/khalilou88/jnxplus-examples
To lint a project, we can use run-task from nx-maven.
Based on : https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/multi-module-config.html