[英]How to index a Maven repo without Nexus/Artifactory/etc?
I run my own little Maven repo for some open source. 我为一些开源运行我自己的小Maven仓库。 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). 但是一些Maven工具正在寻找
nexus-maven-repository-index.properties
和索引(在GZ中)。 I would like to generate this index to 我想生成这个索引
How can I do that? 我怎样才能做到这一点? Is there a tool (Java main) that is able to generate an index?
是否有能够生成索引的工具(Java main)? Also tips how to use the proper Nexus Jars with a little commandline tool are welcome.
还提示如何使用适当的Nexus Jars和一些命令行工具。
I came across this post while I was searching for a solution to add a local repository to my Maven project using IntelliJ Idea. 当我在寻找一个使用IntelliJ Idea为我的Maven项目添加本地存储库的解决方案时,我遇到了这篇文章。
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: 由于Sonatype改变了他们的路径并重新组织了自上一篇文章以来的下载,这里有一个更新的分步教程,可以将您的存储库编入索引,以便与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
export REPODIR=/path/to/your/local/repo/ && java org.sonatype.nexus.index.cli.NexusIndexerCli -r $REPODIR -i $REPODIR/.index -d $REPODIR/.index -n localrepo
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? 您可以使用Maven Indexer CLI直接生成索引,但是当OSS项目可以免费使用托管版本时,为什么还要托管您自己的仓库呢?
http://nexus.sonatype.org/oss-repository-hosting.html http://nexus.sonatype.org/oss-repository-hosting.html
I was looking at maven indexer... but I am not sure what for is the last parameter indexDir in the method: 我正在看maven索引器......但是我不确定该方法中的最后一个参数indexDir是什么:
public RepositoryIndexer createRepositoryIndexer(String repositoryId,
File repositoryBasedir,
File indexDir)
is it like starting point in the repositoryBasedir? 它就像repositoryBasedir中的起点一样?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.