简体   繁体   English

如何在Maven中添加OrientDB存储库?

[英]How can I add orientDB repository in maven?

I am trying to add orientdb repo in maven following these instructions . 我正在按照以下说明在Maven中添加orientdb repo。 My pom.xml looks like that: 我的pom.xml看起来像这样:

  <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>orient-test</groupId>
  <artifactId>orientdb</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
                <distribution>repo</distribution>
                  </license>
  </licenses>
  <build>
    <sourceDirectory>src</sourceDirectory>
    <plugins>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.3.6</version>
        <extensions>true</extensions>
      </plugin>
    </plugins>
  </build>
  <dependencies>
    <dependency>
    <groupId>com.orientechnologies</groupId>
    <artifactId>orient-commons</artifactId>
    <version>1.6.1-SNAPSHOT</version>
    <type>bundle</type>
  </dependency>
  <dependency>
    <groupId>com.orientechnologies</groupId>
    <artifactId>orientdb-core</artifactId>
    <version>1.6.1-SNAPSHOT</version>
    <type>bundle</type>
  </dependency>
  <dependency>
    <groupId>com.tinkerpop.blueprints</groupId>
    <artifactId>blueprints-orient-graph</artifactId>
    <version>2.5.0-SNAPSHOT</version>
    <type>bundle</type>
  </dependency>
  <repository>
    <id>sonatype-nexus-releases</id>
    <name>Sonatype Nexus Snapshots</name>
    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
  </repository>
  </dependencies>
</project>

but I keep getting these errors: 但我不断收到这些错误:

Missing artifact com.orientechnologies:orient-commons:jar:1.6.1-SNAPSHOT 缺少工件com.orientechnologies:orient-commons:jar:1.6.1-SNAPSHOT

Missing artifact com.orientechnologies:orientdb-core:jar:1.6.1-SNAPSHOT 缺少工件com.orientechnologies:orientdb-core:jar:1.6.1-SNAPSHOT

Missing artifact com.tinkerpop.blueprints:blueprints-orient-graph:jar:2.5.0-SNAPSHOT 缺少工件com.tinkerpop.blueprints:blueprints-orient-graph:jar:2.5.0-SNAPSHOT

Also is underlined in red, but there is no error message. 也用红色下划线,但是没有错误消息。

不要使用旧快照,而应将“ 1.6.1-SNAPSHOT”替换为“ 1.6.3”

I solve my problem by adding 1.6.3 version of orient-commons and oriented-core. 我通过添加1.6.3版本的Orient-Commons和Oriented-Core解决了我的问题。 For the blueprints-orient-graph you should I add the following code snippet: 对于blueprints-orient-graph,您应该添加以下代码片段:

<repositories>
    <repository>
        <id>sonatype-nexus-snapshots</id>
        <name>Sonatype Nexus Snapshots</name>
        <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
    </repository>
</repositories>

instead of what I have in the original question 而不是我原来的问题

您应确保SonoType Server中提供了所有依赖项的快照版本(其中的一些快照会定期清除): https ://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orient-commons / https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-client https://oss.sonatype.org/content/repositories/snapshots/com/orientechnologies/orientdb-core https:// /oss.sonatype.org/content/repositories/snapshots/com/tinkerpop/blueprints/blueprints-orient-graph/

I have just added following dependency in my pom.xml file & everything works like a charm. 我刚刚在我的pom.xml文件中添加了以下依赖项,并且一切工作都像一个超级按钮

<dependency>
    <groupId>com.orientechnologies</groupId>
    <artifactId>orientdb-graphdb</artifactId>
    <version>2.0.5</version>
</dependency>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM