-
Notifications
You must be signed in to change notification settings - Fork 35
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
Bug Report - .jqassistant.yml of a maven module not applied #441
Comments
I had a look at the provided example, the situation is a bit more complex than loading configuration file(s). The current setup implies that both (the parent and the module) are treated as one project with one database covering both (this is given by the Maven plugin declaration in the parent). For that reason analyze is skipped in the module, but there's no group config for the parent, leading to no analyze at all. The main question is: What do you want to achieve? Is it correct to assume that you want an aggregator project that builds several modules at once where each of the modules is treated as a separate project in the sense of scanning and analysis (each using its own database instance)? |
So I should be able to fix it with a group config or by removing the plugin from the parent? What I want to achieve is pretty much what you described: I have a parent with several child modules that I want to scan separately and store the results in a separate database per child module. |
This setup is already supported and should work:
Please give it a try and provide feedback if it works as expected. Nevertheless we will check if we can remove the duplicated reading of the config file (which is caused by specifying the configurationLocation parameter). |
Thanks for clarification. Following your hints, I got it to work as expected. |
This ticket duplicates the first issue from jqassistant-archive/jqa-maven-plugin#83 which to me is not fixed. As I cannot reopen a ticket, I opted for creating a new one.
Bug Description
jqassistant.yml on a Maven child module is not actually applied if a build is started on the parent. The log suggests to load the configuration but actually it does not execute the analysis. If the build is started on the child module, everything works as intended.
Expected Behaviour
No matter if the build is started from parent or module, the configured group in '.jqassistant.yml' of the
module should be used for jQA analysis.
Your Environment
How can we reproduce the bug?
Child module build
\jqa-groups-test\jqa-groups-test-module> mvn clean install
[...]
[INFO] --- jqassistant-maven-plugin:2.3.0:analyze (default-cli) @ jqa-groups-test-module ---
[INFO] Loading configuration from file '\jqa-groups-test\jqa-groups-test-module.jqassistant.yml'.
[INFO] Rules directory '\jqa-groups-test\jqa-groups-test-module\jqassistant' does not exist, skipping.
[INFO] Executing analysis for 'jqa-groups-test-module'.
[...]
=> Configuration is loaded, analysis is started - all good ✅.
Parent build
\jqa-groups-test> mvn clean install
[...]
[INFO] --- jqassistant-maven-plugin:2.3.0:analyze (default-cli) @ jqa-groups-test-module ---
[INFO] Loading configuration from file '\jqa-groups-test\jqa-groups-test-module.jqassistant.yml'.
[INFO] Loading configuration from file '\jqa-groups-test\jqa-groups-test-module.jqassistant.yml'.
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ jqa-groups-test-module ---
[...]
=> Configuration is loaded twice (sketchy already), analysis is not started, next build step is commenced - not good ❌
Definition of Done for the Implementers
Remove this hint: these checkboxes can be checked like this: [x]
The text was updated successfully, but these errors were encountered: