Why does maven try to download a JAR from the wrong URL?

I am trying to download a Maven dependency using the following command:

mvn dependency:get -Dartifact=org.webjars:jquery:jar:3.6.1

Note that the coordinates specify the “jar” packaging.

I am connecting to a custom repository server called repo1.ek (not public reachable) for the project I am working on.

This is the output:

[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------< org.apache.maven:standalone-pom >-------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] --------------------------------[ pom ]---------------------------------
[INFO] 
[INFO] --- dependency:3.6.1:get (default-cli) @ standalone-pom ---
[INFO] Resolving org.webjars:jquery:3.6.1:jar with transitive dependencies
Downloading from repo: http://repo1.ek/content/groups/public/org/webjars/jquery/jar/jquery-jar.pom
[WARNING] The POM for org.webjars:jquery:3.6.1:jar is missing, no dependency information available
Downloading from repo: http://repo1.ek/content/groups/public/org/webjars/jquery/jar/jquery-jar.3.6.1
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.688 s
[INFO] Finished at: 2024-05-09T07:10:24+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:3.6.1:get (default-cli) on project standalone-pom: Couldn't download artifact: org.eclipse.aether.resolution.DependencyResolutionException: The following artifacts could not be resolved: org.webjars:jquery:3.6.1:jar (absent): Could not find artifact org.webjars:jquery:3.6.1:jar in repo (http://repo1.ek/content/groups/public) -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

It seems like Maven tried to download the JAR from this URL, and cannot find it there:

http://repo1.ek/content/groups/public/org/webjars/jquery/jar/jquery-jar.3.6.1

The following URL would have worked:

http://repo1.ek/content/groups/public/org/webjars/jquery/3.6.1/jquery-3.6.1.jar

I found this source for both the colon-syntax for coordinates and the URL pattern used: https://books.sonatype.com/mvnex-book/reference/simple-project-sect-simple-core.html#:~:text=Maven%20coordinates%20are%20often%20written,%3Ajar%3A1.0%2DSNAPSHOT%20.&text=The%20group%2C%20company%2C%20team%2C,%2C%20project%2C%20or%20other%20group.

It says:

Maven coordinates are often written using a colon as a delimiter in the following format: groupId:artifactId:packaging:version

and

The standard for a Maven repository is to store an artifact in the following directory 
relative to the root of the repository:

/<groupId>/<artifactId>/<version>/<artifactId>-<version>.<packaging>

So it seems to me that org.webjars:jquery:jar:3.6.1 is using the correct order for the colon-syntax, and the URL expected by the repository server is also correct. Rather it seems to be Maven that builds an incorrect URL from the coordinates.

This is my .m2/settings.xml, in case it is relevant. The file has been prescribed by the project I am working on, so I can’t comment on why it is that way, but if the error is caused by it then fixing it is “allowed”.

<?xml version="1.0" encoding="UTF-8"?>
<settings xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <mirrors>
        <mirror>
            <mirrorOf>*</mirrorOf>
            <name>repo</name>
            <url>http://repo1.ek/content/groups/public</url>
            <id>repo</id>
        </mirror>
    </mirrors>
    <profiles>
        <profile>
          <id>nexus</id>
          <!--Enable snapshots for the built in central repo to direct -->
          <!--all requests to nexus via the mirror -->
          <repositories>
        <repository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
          </repositories>
         <pluginRepositories>
        <pluginRepository>
          <id>central</id>
          <url>http://central</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </pluginRepository>
          </pluginRepositories>
        </profile>

    </profiles>
    <activeProfiles>
       <activeProfile>nexus</activeProfile>
    </activeProfiles>
</settings>

Maven version is: Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật