[ 
https://issues.apache.org/jira/browse/MENFORCER-422?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17633957#comment-17633957
 ] 

George Gastaldi commented on MENFORCER-422:
-------------------------------------------

Hi [~lfvjimisola], 
{quote}We have a similar request and I was wondering if it could be handled 
together or it might already be. Looking at the PR and 
[docs|https://github.com/apache/maven-enforcer/pull/180/files#diff-52ca79536e0b1dc2298afdae5b7e6357c5af22eef6b5c63444237c5e189a037b]
 it seems as if it's the entire <rules> section that can be externalized. 
However, only to a file or classpath. Or am I missing that an URL is supported?
{quote}
Because that could introduce security risks (and it would need to reuse 
existing proxy settings), I decided to not support external URLs in the initial 
implementation, but they could be added if there is a compelling use case.

Another idea is to download the external file (as a separate maven plugin - see 
[https://github.com/maven-download-plugin/maven-download-plugin])  before the 
enforcer plugin is executed. This would allow you to cache responses and avoid 
unnecessary network roundtrips - also would require no changes in this plugin. 
{quote}What is the status of this issue and PR(s)? What release can it be 
suspected to be released with? And will URLs be supported?
{quote}
[The Pull Request|https://github.com/apache/maven-enforcer/pull/180] was merged 
but I don't think there is a release in central with this feature yet. Maybe 
[~ppalaga] can answer that. Feel free to add support for URLs if you think it 
makes sense. I'd suggest to make sure the implementation reuses any existing 
proxy settings defined in settings.xml.
{quote}Are there any other plugins that use something similar to "classpath:" 
but for URLs that we could/should align with, e.g. "url:" vs "uri:"?
{quote}
I asked the same in 
[https://github.com/apache/maven-enforcer/pull/180#discussion_r943902433,] but 
apparently there is none
 

> Support declaring external banned dependencies in an external file/URL
> ----------------------------------------------------------------------
>
>                 Key: MENFORCER-422
>                 URL: https://issues.apache.org/jira/browse/MENFORCER-422
>             Project: Maven Enforcer Plugin
>          Issue Type: New Feature
>            Reporter: George Gastaldi
>            Priority: Major
>
> There are some use cases where the list of banned dependencies declared in an 
> enforcer plugin configuration needs to be reused in another project. It would 
> be nice if the {{bannedDependencies}} rule could read the list of banned 
> dependencies from an external file/URL



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to