我使用nexus开源作为我的Maven 3.0.3的存储库管理器
Maven能够创建工件*.jar.
现在,我想知道如何将生成的工件*.jar推送到nexus repo管理器,以便其他相关模块可以从中获取.
我提到了这个指南.
在settings.xml
,我有
<server>
<id>nexus-site</id>
<username>admin</username>
<password>xxxx</password>
</server>
Run Code Online (Sandbox Code Playgroud)
它失败.
如何从mvn命令调用我的部署或如何将我的工件部署到我的nexus?
今天当我开始eclipse时,我收到以下错误消息:
在"更新索引"期间发生内部错误.Java堆空间
当我检查日志时,有以下异常:
!ENTRY org.eclipse.core.jobs 4 2 2011-06-14 13:44:26.546
!MESSAGE An internal error occurred during: "Updating indexes".
!STACK 0
java.lang.OutOfMemoryError: Java heap space
at org.sonatype.nexus.index.updater.IndexDataReader.readUTF(IndexDataReader.java:132)
at org.sonatype.nexus.index.updater.IndexDataReader.readField(IndexDataReader.java:122)
at org.sonatype.nexus.index.updater.IndexDataReader.readDocument(IndexDataReader.java:96)
at org.sonatype.nexus.index.updater.IndexDataReader.readIndex(IndexDataReader.java:63)
at org.sonatype.nexus.index.updater.DefaultIndexUpdater.unpackIndexData(DefaultIndexUpdater.java:564)
at org.sonatype.nexus.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:252)
at org.sonatype.nexus.index.updater.DefaultIndexUpdater.access$300(DefaultIndexUpdater.java:74)
at org.sonatype.nexus.index.updater.DefaultIndexUpdater$LuceneIndexAdaptor.setIndexFile(DefaultIndexUpdater.java:815)
at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:995)
at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:159)
at org.maven.ide.eclipse.internal.index.NexusIndexManager.updateRemoteIndex(NexusIndexManager.java:1085)
at org.maven.ide.eclipse.internal.index.NexusIndexManager.updateIndex(NexusIndexManager.java:1025)
at org.maven.ide.eclipse.internal.index.NexusIndexManager$1.run(NexusIndexManager.java:632)
at org.maven.ide.eclipse.internal.index.IndexUpdaterJob.run(IndexUpdaterJob.java:71)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
!SESSION 2011-06-14 13:46:30.734 -----------------------------------------------
eclipse.buildId=M20100909-0800
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86 …
Run Code Online (Sandbox Code Playgroud) 我怎样才能使用Sonatype REST Api来获取具有最高版本(最新时间构建)的构建?
http://MY_REPOSITORY/nexus/service/local/lucene/search?a=ARTIFACT_NAME&v=ARTIFACT_VERSION
Run Code Online (Sandbox Code Playgroud)
将构建版本作为ARTIFACT_VERSION
工作传递.传递v=LATEST
或v=latest
不返回最新版本.
我想知道如何配置.npmrc
文件,以便我可以拥有默认注册表和具有身份验证的不同范围注册表.
我使用Nexus作为私有存储库,我不知道如何为作用域注册表设置身份验证,只有默认注册表.
例如我的~/.npmrc
文件是:
registry=https://registry.npmjs.org/
@test-scope:registry=http://nexus:8081/nexus/content/repositories/npm-test/
email=test@user.com
_auth="…"
Run Code Online (Sandbox Code Playgroud)
如果我npm publish
为一个作用域的包test-scope
,我收到一个身份验证错误.
AFAIK,_auth
唯一适用于该registry=...
部分.有没有办法为该@test-scope:registry=...
部分指定auth密钥?
谢谢,
我已经将我的各种项目中的所有存储库配置重构为我创建的父pom,其目的是为repo和分发管理等内容提供单点配置.据我所知,这应该是最佳实践.在部署我的父pom到nexus服务器,然后尝试运行我的子项目.他们找不到我的父母pom...这对我来说是有道理的,因为他们不知道关于nexus回购的父母pom...看起来像鸡蛋和鸡蛋的东西?我错过了一些明显的东西吗
我正在尝试向我的组织介绍体面的参考管理.之前使用过Nexus和Maven,我知道它远远优于在本地构建所有东西的方法.由于这是一个.Net商店,我想使用NuGet而不是Maven.我知道二进制存储库将是最重要的一点,但没有在二进制存储库中托管NuGet存储库的经验.
在这种情况下,有任何理由支持Nexus或Artifactory吗?我们使用Jenkins和svn作为我们的CI,如果这有任何区别的话.
我在settings.xml中有以下内容
<mirrors>
<mirror>
<id>paid-jars</id>
<name>jars with license</name>
<url>http://url:8081/nexus/content/repositories/paidjars/</url>
<mirrorOf>!central</mirrorOf>
</mirror>
<mirror>
<id>Org-central</id>
<name>mirror of central</name>
<url>http://url:8081/nexus/content/repositories/central/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
Run Code Online (Sandbox Code Playgroud)
在pom.xml中我有两个罐子
但是当我运行maven clean install
它时,它试图从Org-central下载licensed.jar.
如何让它使用付费罐子下载?是否有可能首先进入Org-central,如果失败,它会尝试付费罐子?如果是这样,怎么样?我不想把repo条目放在pom.xml中
将Settings.xml
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<proxies>
<proxy>
<id>Proxy</id>
<active>true</active>
<protocol>http</protocol>
<username>username</username>
<password>******</password>
<host>host.url</host>
<port>8080</port>
<nonProxyHosts>local.net|internal.com</nonProxyHosts>
</proxy>
</proxies>
<mirrors>
<mirror>
<id>paid-jars</id>
<name>jars with license</name>
<url>http://url:8081/nexus/content/repositories/paidjars/</url>
<mirrorOf>!central</mirrorOf>
</mirror>
<mirror>
<id>Org-central</id>
<name>mirror of central</name>
<url>http://url:8081/nexus/content/repositories/central/</url>
<mirrorOf>central</mirrorOf>
</mirror>
</mirrors>
<profiles>
<profile>
<id>compiler</id>
<properties>
<JAVA_1_7_HOME>C:\Program Files (x86)\Java\jdk1.7.0_51\bin</JAVA_1_7_HOME>
</properties>
</profile>
</profiles>
</settings>
Run Code Online (Sandbox Code Playgroud) 我的团队是Maven的新手,我们无法找到关于为我们的项目选择artifactID的任何明确指导.
我知道命名约定指南说应该是artifactIDs
"无论你想要什么名字都用小写字母和没有奇怪的符号"
但是我的组中的一些人想要对groupID 和 artifactID 使用反向域名样式.
基于上述指南以及我在中央存储库中看到的所有示例,我不认为有反向域样式artifactID是有意义的,但我不知道这样做是否实际上是无效的或仅仅是不满意.我依稀记得读过一些关于各种存储库管理器无法有效处理包含句点(.)字符的artifactID的内容,但我不记得我在哪里阅读它并且我现在找不到它.
对Maven artifactID中允许的字符有什么规则(如果有的话)?
如何在Nexus 3中获得特定存储库的大小?
例如,Artifactory通过UI显示存储库"磁盘大小".
Nexus有类似的东西吗?如果不是 - 我如何通过脚本获取此信息?