pom.xml 中缺少 hibernate ORM 快照

问题描述 投票:0回答:1

我正在尝试测试 Hibernate ORM 快照 7.0.0,但在尝试将其添加为依赖项时遇到错误

pom.xml
:

缺少工件 org.hibernate.orm:hibernate-core:jar:7.0.0-SNAPSHOT

我做错了什么?

Hibernate 网站上给出了存储库的 URL:here

pom.xml

<properties>
    <hibernate-core.version>7.0.0-SNAPSHOT</hibernate-core.version>
</properties>

<repositories>
    <repository>
        <id>hibernate-snapshots</id>
        <url>https://oss.sonatype.org/content/repositories/snapshots/org/hibernate/orm/</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>org.hibernate.orm</groupId>
        <artifactId>hibernate-core</artifactId>
        <version>${hibernate-core.version}</version>
    </dependency>
</dependencies>

还尝试了其他 StackOverflow 答案中的这个,但结果是相同的:

<profiles>
    <profile>
        <id>allow-snapshots</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
            <repository>
                <id>snapshots-repo</id>
                <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                <releases>
                    <enabled>false</enabled>
                </releases>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
    </profile>
</profiles>

hibernate maven configuration
1个回答
0
投票

唯一出错的是目录:

错误的目录:https://oss.sonatype.org/content/repositories/snapshots/org/hibernate/orm/

正确的目录:https://oss.sonatype.org/content/repositories/snapshots

<repositories>
   <repository>
       <id>hibernate-snapshots</id>
       <name>Hibernate snapshots</name>
       <url>https://oss.sonatype.org/content/repositories/snapshots</url>
   </repository>
</repositories>

© www.soinside.com 2019 - 2024. All rights reserved.