On Sat, Jul 1, 2023 at 6:11 AM #ZHAO LIDA# <lida...@e.ntu.edu.sg.invalid> wrote: > > Dear Maven maintainers, > > > we are studying Maven dependency specifications and we would like to offer > several possible improvements for Maven. > > > (1) The scope management of Maven is complicated and hard to distinguish. > Maven maintained 6 scopes (i.e., compile, runtime, provided, system, test, > and import). Compare to newer package managers such as NPM, which only has > two scopes (i.e., dependencies, devdependencies), Maven has too many types of > scopes, which makes it more difficult for users to understand. We went over > all POMs on the Maven Central (around 8M artifacts, collected in March 2022) > and count the frequency of all types of scope. Some of the scopes are rarely > used. Only 0.35% of POMs in the Maven Center used system scope. Also, system > scope is similar to provided scope, and import scope can hardly be regarded > as a dependency scope. We suggest simplifying the types of scopes by merging > system into provided and removing import.
This would probably be a good idea if we were starting from a green field, but backwards compatibility with a 20 year legacy trumps good design. IMHO this isn't feasible. > (2) In the documentation of Default Artifact Handlers > (https://maven.apache.org/ref/3.9.3/maven-core/artifact-handlers.html), type > and classifier should introduce more commonly used values as their default > value to provide better examples. We found that the default values are rarely > used and are not good examples for users to understand the use of the > settings. Setting commonly used values as default can help users understand > the usage of the settings. We went over all POMs on the Maven Central (around > 8M artifacts, collected in March 2022) and count the frequency of all > possible values of classifier and type. According to our research, in > classifier, the default values have low frequencies, including tests (1.05%), > javadoc (0.35%), sources (0.29%), and client(0.01%). More commonly used > values are features (1.20%), linux-x86_64 (0.34%), and osx-x86_64 (0.27%). As > for type, the top default values are pom (4.38%), test-jar (2.85%), war > (1.08%) and the rest of the values are all below 0.1%. Other common examples > are esa (2.53%), zip (1.88%), and xml (1.31%). Maven's documentation is... Well, it is. That's about all I can say for it. It's trivial to find parts that need work, anything from typo fixes to rewrites from a blank page. Feel free to assign me as reviewer on any PRs to improve this. -- Elliotte Rusty Harold elh...@ibiblio.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org For additional commands, e-mail: dev-h...@maven.apache.org