views:

234

answers:

1

Hi,

I've been working through the Nexus guide this weekend and I've got everything set up, to the point that I can publish a snapshot to my local nexus install.

I can't seem to work out how to get m2eclipse to see the snapshot and offer it as an option in the Add Dependencies search panel. How do I do that? Thanks!

In case it's of any use, my settings.xml is as follows:

<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"&gt;
    <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&lt;/url&gt;
        </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&lt;/url&gt;
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <url>http://central&lt;/url&gt;
                    <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>
+3  A: 

I have the answer now. you have to set up nexus to publish the index. http://www.sonatype.com/people/2009/09/nexus-scheduled-tasks ...Set up the schedule task to publish the index for clients like m2eclipse. But you must wait until WAITING status appears at the scheduled task section in nexus. After eclipse restart it must work. Regards, Jakub

BTW: your proxied repositories must have "Download Remote Indexes - true" and nexus must be able to search through remote indexes... but I supposed you know that

lisak
You can also open a Nexus Indexes view (Window -> Show View) which shows the indexes Eclipse currently has and will let you manually update the indexes if necessary.
Brabster