Comments (2)
Sry, I dont understand your issue.
from lint-maven-plugin.
This is actually something idcmp and I discussed elsewhere, that I asked him to raise as an issue here. I'll explain the reasoning.
In a pom-type Maven project, that is the parent of other modules, listing versions and scopes in <dependencyManagement>
is the recommended way of maintaining versions in single place, in a multi-module project.
However, it is rare to include <dependencies>
(as opposed to <dependencyManagement>
) in these parent projects. The sole legitimate use of this I've seen is to add things like junit, jmock, mockito, hamcrest, etc, in the test scope. Since test scope dependencies won't become transitive dependencies when other projects depend on yours, this doesn't create a mess. Including, for example, spring, in the <dependencies>
of a pom-type parent project would mean every single project that uses it as a parent, and any project that depends on those children, would all end up with a dependency or transitive dependency on spring. Unless all modules in the multi-module project truly require spring (which I've found to be rare), including spring in the <dependencies>
of the parent leads to unnecessary dependencies, a bit of a mess.
The lint maven plugin could easily enforce that all dependencies that aren't in <dependencyManagement>
, in pom-type projects, are in the test scope.
In the rare case where one might actually want to do that (eg. log4j, slf4j, etc) it's easy enough to add a NOLINT comment in the pom to allow it.
from lint-maven-plugin.
Related Issues (20)
- Recommend <type>test-jar</type> over <classifier>tests</classifier>
- RedundantDependencyVersionsRule false positive HOT 5
- NPE while building HOT 10
- Status of this project HOT 11
- create violation for <execution></execution> block without id HOT 4
- Variable vs. literal confusion HOT 2
- The examples in README.md should contain an execution ID HOT 6
- onlyRunRules ignored on master HOT 10
- please connect with travis ci to have automatic PR builds (and more) HOT 2
- add an possibility to collect all violations of a reactor project HOT 1
- Clean up logic and documentation around <rules>, <onlyRunRules>, -Drules
- The 'list' goal has been broken since 0.0.9 HOT 1
- .
- Feature request: Option to warn on multiprojects
- IllegalStateException: RedundantDependencyVersionsRule with maven expressions HOT 8
- Feature request: Warn on missing test functionality
- Feature request: Block springframework starter artifactIds HOT 2
- NPE in GAVOrder rule HOT 2
- Make it easier to configure which rules are desired HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lint-maven-plugin.