You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/05/21 10:00:00 UTC

[jira] [Commented] (DELTASPIKE-1473) Improve dependency consistency in JSF module (dependency-analyze + requireExplicitDependencyScope)

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

ASF subversion and git services commented on DELTASPIKE-1473:
-------------------------------------------------------------

Commit a598e725d46b5e588858c18ad2cbc3a3dba23163 in deltaspike's branch refs/heads/master from Christian Munier
[ https://gitbox.apache.org/repos/asf?p=deltaspike.git;h=a598e725d ]

DELTASPIKE-1473: Improved dependency consistency in the JSF module

- removed obsolete dependencies
- added used transitive dependencies as explicite dependencies
- narrowed down dependency scopes that were too broad


> Improve dependency consistency in JSF module (dependency-analyze + requireExplicitDependencyScope)
> --------------------------------------------------------------------------------------------------
>
>                 Key: DELTASPIKE-1473
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1473
>             Project: DeltaSpike
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: JSF-Module
>    Affects Versions: 2.0.0
>            Reporter: Christian Munier
>            Priority: Minor
>              Labels: pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> As a follow-up to DELTASPIKE-1472 I think it would be helpful to include the {{analyze-only}} goal of {{maven-dependency-plugin}} so that dependency scopes that are to broad may come to attention while executing the build. In addition I find it helpful to activate the maven-enforcer-plugin with the rule {{requireExplicitDependencyScope}} so that an explicit scope has to be defined for each dependency.
> By doing this, I dicovered the following obsolete dependencies in the JSF module:
> {noformat}
> api -> jakarta.el-api (compile)
> impl -> deltaspike-proxy-module-api (compile)
> impl -> xml-apis (test)
> {noformat}
> The following dependencies are used transitively, but are not explicitely defined:
> {noformat}
> api -> junit-jupiter-api (test)
> impl -> arquillian-container-test-api (test)
> impl -> arquillian-junit-core (test)
> impl -> arquillian-test-api (test)
> impl -> shrinkwrap-api (test)
> impl -> selenium-api (test)
> impl -> selenium-support (test)
> {noformat}
> The following scopes seem to be too broad:
> {noformat}
> impl -> jakarta.el-api (compile)
> impl -> tomcat-servlet-api (compile)
> {noformat}
> I think we should always declare Jakarta EE APIs as "provided", because an Application Server already supplies the correct API version fitting its runtime.
> I will supply a PR to show my idea.
> If you like this idea, we could transfer this configuration to other modules. The configuration for the {{analyze}} goal of the {{maven-dependency-plugin}} could then be moved up to one of its parents or distributed according to modules that inherit dependencies to their children.
> Further questions:
> * Should dependency {{deltaspike-proxy-module-impl-asm}} be defined as an (optional) dependency of {{jsf-impl}} so that it will likely be automatically be included in the classpath? Or should it rather not be included by default, leaving it up to the consumer?
> * Should compile/provided dependency {{tomcat-servlet-api}} be changed to Jakarta Servlet API?
> * Should {{dependency junit-jupiter-api}} be replaced by JUnit Core (since it seems to have been used accidentally and only within this single project)?



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