Skip to content
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

How to use maven-checkstyle-plugin? #509

Open
khalilou88 opened this issue Oct 9, 2023 · 2 comments
Open

How to use maven-checkstyle-plugin? #509

khalilou88 opened this issue Oct 9, 2023 · 2 comments

Comments

@khalilou88
Copy link
Owner

khalilou88 commented Oct 9, 2023

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

@khalilou88
Copy link
Owner Author

khalilou88 commented Dec 28, 2023

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"
      }
    }

@khalilou88
Copy link
Owner Author

@khalilou88 khalilou88 changed the title Using maven-checkstyle-plugin How to use maven-checkstyle-plugin? Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant