Maven和db4o依赖关系 [英] Maven and db4o dependency

查看:272
本文介绍了Maven和db4o依赖关系的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很高兴在Java世界中测试新的框架,并决定创建一个利用Maven和db4o的新项目。我开始得到一个Maven的挂起,但是我很难添加db4o作为项目的依赖。第一个问题是db4o不存在于官方的Maven存储库中。接下来的问题是db4o似乎最近重组了他们整个网站的URI:s,所以我一直在尝试浏览他们的网站时收到网站未找到的消息。



我发现某个潜在的Maven存储库应该在 https://source.db4o.com/ maven ,但我得到所有的时间错误阅读原型目录 https://source.db4o.com/maven 当我尝试访问它时,无法找到存储库中的资源。



所以,有关如何通过Maven获取db4o的任何建议?我使用M2Eclipse插件通过Eclipse管理Maven。

解决方案

使用以下代码片段为我工作:

 < project> 
< repositories>
< repository>
< id> source.db4o< / id>
< url> http://source.db4o.com/maven< / url>
< / repository>
< / repositories>

...

<依赖关系>
<依赖关系>
< groupId> com.db4o< / groupId>
< artifactId> db4o-full-java5< / artifactId>
< version> 8.1-SNAPSHOT< / version> <! - 最新版本 - >
< / dependency>
...
< / dependencies>
< / project>


I'm intrigued to test new frameworks in the Java world, and decided to create a new project that takes advantage of Maven and db4o. I'm starting to get a hang of Maven, but I have a hard time adding db4o as a dependency to the project. First problem is that db4o doesn't exist in the official Maven repositories. Next up comes the problem that db4o seem to have recently restructured their whole site's URI:s, so I'm getting 'site not found' messages all the time when I try to navigate their site.

I found somewhere a potential Maven repository that should be at https://source.db4o.com/maven but I get all the time "Error reading archetype catalog https://source.db4o.com/maven Unable to locate resource in repository" when I try to access it.

So, any suggestions on how I'll get db4o up through Maven? I've managing Maven through Eclipse with the M2Eclipse plugin.

解决方案

Works for me with the following snippet:

<project>
  <repositories>
    <repository>
      <id>source.db4o</id>
      <url>http://source.db4o.com/maven</url>
    </repository>
  </repositories>

  ...

  <dependencies>
    <dependency>
      <groupId>com.db4o</groupId>
      <artifactId>db4o-full-java5</artifactId>
      <version>8.1-SNAPSHOT</version> <!-- latest version -->
    </dependency>
    ...
  </dependencies>
</project>

这篇关于Maven和db4o依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆