Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 3.0.1, 3.0.2, 3.0.3
-
Fix Version/s: None
-
Component/s: Artifacts and Repositories
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
I fear we need to rethink the changes done in MNG-4191.
While expressing my dislike about the strict classpath separation on IRC a few times already since quite a few months, this now really turns out into having a hugely negative kickback.
Basically every business project I saw being upgraded to maven3 compat got all their <repositories> sections dupped into <pluginRepositories>.
This can't be it!
The reason for it is that lots of plugins need dependencies to 'normal' artifacts.
- hibernate-maven-plugin
- jboss-maven-plugin
- tomcat-maven-plugin
- openjpa-maven-plugin
- cargo
.... you name it ...
basically ALL plugins which serve as helper for any 3rd party libraries and products.
In addition, this problem also hits all use cases where plugins get 'resources' via dependencies, like:
- maven-checkstyle-plugin
- maven-pmd-plugin
- emma-maven-plugin
- maven-remote-resources-plugin
- etc
Have you ever had one project which uses none of those plugins? Then you are happy and don't need that. But for all other projects there is a good chance that you will end up duplicating all your repository sections as pluginRepository ...
In most of our Apache projects this just doesn't show off because maven.central is by default defined as both <repository> and <pluginRepository>. But once you hit a company situation, you will get this problem
Jason already proposed to drop the <pluginRepository> section completely in MNG-2750.
Maybe that's the way to go?