我为一些开源运行我自己的小 Maven 存储库。我没有专用服务器,因此我使用 Google 代码存储库< /a>,部署到文件系统,然后提交并推送。非常适合我。
但一些 Maven 工具正在寻找 nexus-maven-repository-index.properties
和索引(在 GZ 中)。我想生成这个索引来
- 消除警告:它不在这里
- Maven 不会尝试存储不存在的工件。
我怎样才能做到这一点?有没有一个工具(Java main)可以生成索引?还欢迎提示如何通过一些命令行工具使用正确的 Nexus Jars。
I run my own little Maven repo for some open source. I have no dedicated server so I use a Google code repository, deploy to file system and then commit and push. Works perfect for me.
But some Maven tools are looking for a nexus-maven-repository-index.properties
and the index (in GZ). I would like to generate this index to
- get rid of the warning that it's not here
- Maven doesn't try the repo for artefacts that are not there.
How can I do that? Is there a tool (Java main) that is able to generate an index? Also tips how to use the proper Nexus Jars with a little commandline tool are welcome.
发布评论
评论(3)
我在寻找使用 IntelliJ Idea 将本地存储库添加到我的 Maven 项目的解决方案时遇到了这篇文章。
由于 Sonatype 自上一篇文章以来更改了路径并重新组织了下载,因此这里有一个更新的分步教程,用于对您的存储库进行索引以与 IntelliJ Idea 一起使用:
I came across this post while I was searching for a solution to add a local repository to my Maven project using IntelliJ Idea.
Since Sonatype changed their paths and reorganized the downloads since the last post, here is an updated step-by-step tutorial to get your repository indexed for use with IntelliJ Idea:
export REPODIR=/path/to/your/local/repo/ && java org.sonatype.nexus.index.cli.NexusIndexerCli -r $REPODIR -i $REPODIR/.index -d $REPODIR/.index -n localrepo
您可以使用 Maven Indexer CLI 直接生成索引,但是当 OSS 项目可以免费使用托管的存储库时,为什么还要费心托管自己的存储库呢?
http://nexus.sonatype.org/oss-repository-hosting.html
You can use the Maven Indexer CLI to product the index directly, but why bother hosting your own repo when OSS projects can use a hosted one for free?
http://nexus.sonatype.org/oss-repository-hosting.html
我正在查看 Maven 索引器...但我不确定方法中的最后一个参数 indexDir 的作用是什么:
它是否像repositoryBasedir 中的起点?
I was looking at maven indexer... but I am not sure what for is the last parameter indexDir in the method:
is it like starting point in the repositoryBasedir?