Towards Better Dependency Scope Settings in Maven Projects.

Haolin Yang,Lin Chen,Yulu Cao,Yanhui Li,Yuming Zhou
DOI: https://doi.org/10.1145/3609437.3609447
2023-01-01
Abstract:The emergence of build automation tools with dependency management features has significantly impacted software development. However, in the configuration process, improper settings of some configuration items, such as the dependency scope setting, may cause severe problems in the development process. Improper setting of dependency scope may cause problems such as missing dependencies and redundant dependencies, and may even spread the problem to the downstream of the software ecosystem. We conduct the first comprehensive empirical study of dependency scope settings in Maven projects to investigate the current state of dependency scope settings. We collect 5,433 commits from 65 popular open-source projects on GitHub, including 20,076 dependency scope settings. We also manually analyze 124 improper scope setting issues sampled from 2,609 Java projects. By analyzing these data, we reveal the typical symptoms and root causes of problems caused by improper dependency scope settings, and summarize 5 patterns of dependency scope modification. We provide suggestions for developers to better set and manage the dependency scope, and provide some ideas and experiences for the development of tools related to dependency scope setting.
What problem does this paper attempt to address?