【问题标题】:How do I get my snapshots in Nexus to appear in the m2eclipse dependency search?如何让我在 Nexus 中的快照出现在 m2eclipse 依赖项搜索中?
【发布时间】:2010-01-31 18:40:47
【问题描述】:

这个周末我一直在处理Nexus guide,我已经完成了所有设置,我可以将快照发布到我的本地 nexus 安装。

我似乎无法弄清楚如何让 m2eclipse 查看快照并将其作为“添加依赖项”搜索面板中的选项提供。我怎么做?谢谢!

如果有什么用,我的settings.xml如下:

<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">
    <localRepository />
    <interactiveMode />
    <usePluginRegistry />
    <offline />
    <pluginGroups />
    <servers>
        <server>
            <id>localSnap</id>
            <username>deployment</username>
            <password>*****</password>
        </server>
    </servers>
    <mirrors>
        <mirror>
            <!--This sends everything else to /public -->
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://localhost:8080/nexus/content/groups/public</url>
        </mirror>
    </mirrors>
    <profiles>
        <profile>
            <id>nexus</id>
            <!--Enable snapshots for the built in central repo to direct -->
            <!--all requests to nexus via the mirror -->
            <repositories>
                <repository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <activeProfiles>
        <!--make the profile active all the time -->
        <activeProfile>nexus</activeProfile>
    </activeProfiles>

</settings>

【问题讨论】:

    标签: m2eclipse snapshot nexus


    【解决方案1】:

    我现在有答案了。您必须设置 nexus 才能发布索引。 http://www.sonatype.com/people/2009/09/nexus-scheduled-tasks ...设置调度任务为m2eclipse等客户端发布索引。但是您必须等到 nexus 中的计划任务部分出现 WAITING 状态。 eclipse重启后它必须工作。问候,雅库布

    顺便说一句:您的代理存储库必须具有“下载远程索引 - 真”并且 nexus 必须能够搜索远程索引...但我想您知道

    【讨论】:

    • 您还可以打开一个 Nexus Indexes 视图(窗口 -> 显示视图),它显示 Eclipse 当前拥有的索引,并允许您在必要时手动更新索引。
    猜你喜欢
    • 2011-04-24
    • 2011-05-19
    • 2012-03-15
    • 2011-05-01
    • 2011-07-26
    • 2021-05-25
    • 2020-06-09
    • 2014-03-20
    • 1970-01-01
    相关资源
    最近更新 更多