Hi,

On 28.06.23 12:55, #ZHAO LIDA# 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).

As already mentioned system-scope is deprecated for a long time..


Compare to newer package managers such as NPM, which only has two scopes (i.e., 
dependencies, devdependencies),

others have already mentioned that it has more of them.


Maven has too many types of scopes, which makes it more difficult for users to 
understand.

Some people say even it has not enough of them. Having a more fine
grained control..


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.

That's really good...this can only be very old artifacts.


Also, system scope is similar to provided scope, and import scope can hardly be 
regarded as a dependency scope.

provided is completely different to provided..


We suggest simplifying the types of scopes by merging system into provided and 
removing import.

theoretically we could do something like that, but unfortunately we can
not break all 8 M artifacts...




(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%)

looks a bit strange because all artifacts which will be uploaded to
central have to have sources/javadoc ... have you checked the pom files
or the artifacts in central? Often generation of sources/javadoc or
alike a done via profiles in pom files...

Means have you used search.maven.org ?


and client(0.01%). More commonly used values are features (1.20%),

linux-x86_64 (0.34%), and osx-x86_64 (0.27%).

Could be dependent on OSGi packages...


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%).


Kind regards
Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@maven.apache.org
For additional commands, e-mail: dev-h...@maven.apache.org

Reply via email to