Search code examples
eclipsemaven-2m2eclipsenexus

Nexus public respository empty cant create maven project


I have installed Nexus 2.8 on a Linux virtual machine. Started it and can quite happily browser to the repository. If I look at the repositories from the repository view they are all in service and none of them is blocked.

I can browse the individual repo indexes but 1 thing that concerns me is that when i update or rebuild the index i get the following where it states 0 scanned, updated read etc..

jvm 1    | 2014-07-10 12:08:02,115+0100 INFO  [pxpool-1-thread-3] admin org.sonatype.nexus.index.Def
aultIndexerManager - Remote indexes updated successfully for repository "Central" [id=central]
jvm 1    | 2014-07-10 12:08:02,123+0100 INFO  [pxpool-1-thread-3] admin org.sonatype.nexus.index.Nex
usScanningListener - Scanning of repositoryID="central" started.
jvm 1    | 2014-07-10 12:08:59,617+0100 INFO  [pxpool-1-thread-3] admin org.sonatype.nexus.index.Nex
usScanningListener - Scanning of repositoryID="central" finished: scanned=0, added=0, updated=0, rem
oved=0, scanningDuration=0:00:57.493
jvm 1    | 2014-07-10 12:09:00,025+0100 INFO  [pxpool-1-thread-3] admin org.sonatype.nexus.index.Def
aultIndexerManager - Publishing index for repository cen

my public repository is configured so that all the repositories are in the available repositories box. I didnt think that I need to do any other configuration for this just yet as i havent started playing with it just want to get the default set up working first. I have set download remote indexes for each repo to true though.

When I try to create a maven project via eclipse I am not able to create it. I get the following error in the console

10/07/2014 12:27:40 BST: [WARN] The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 is missing, no dependency information available
10/07/2014 12:27:41 BST: [WARN] The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 is missing, no dependency information available
10/07/2014 12:27:41 BST: [INFO] Using org.eclipse.m2e.jdt.JarLifecycleMapping lifecycle mapping for MavenProject: dcdw:dccd:0.0.1-SNAPSHOT @ C:\projects\lloyds\dccd\pom.xml.
10/07/2014 12:27:41 BST: [WARN] The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 is missing, no dependency information available
10/07/2014 12:27:41 BST: [WARN] The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 is missing, no dependency information available
10/07/2014 12:27:42 BST: [WARN] The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 is missing, no dependency information available
10/07/2014 12:27:42 BST: [WARN] The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 is missing, no dependency information available
10/07/2014 12:27:42 BST: [WARN] The POM for org.apache.maven.plugins:maven-compiler-plugin:jar:2.3.2 is missing, no dependency information available
10/07/2014 12:27:42 BST: [INFO] Using org.eclipse.m2e.jdt.JarLifecycleMapping lifecycle mapping for MavenProject: dcdw:dccd:0.0.1-SNAPSHOT @ C:\projects\lloyds\dccd\pom.xml.
10/07/2014 12:27:42 BST: [WARN] The POM for org.apache.maven.plugins:maven-resources-plugin:jar:2.5 is missing, no dependency information available

I can browse the remote and see that these jars exist so why cant I download them in my eclipse IDE?

my settings xml that I am using is

<?xml version="1.0"?>
<settings xmlns="http://maven.apache.org/POM/4.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
          http://maven.apache.org/xsd/settings-1.0.0.xsd">


    <localRepository>c:/maven/repository</localRepository>

    <mirrors>
        <mirror>
            <id>nexus</id>
            <mirrorOf>*</mirrorOf>
            <url>http://unix.host.ip:8081/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>
                        <updatePolicy>daily</updatePolicy>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>always</updatePolicy>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <id>central</id>
                    <url>http://central</url>
                    <releases>
                        <enabled>true</enabled>
                        <updatePolicy>daily</updatePolicy>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                        <updatePolicy>always</updatePolicy>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
    </profiles>
    <activeProfiles>
        <activeProfile>nexus</activeProfile>
    </activeProfiles>


</settings>

I have set up the proxy configuration as I am behind a firewall and confirmed that this has access as no errors are thrown and can run a health check although this returns 0 but doesnt throw any error.

Any one have a clue why this doesnt work?

Also if I put this in the url

http://unix.ip.host:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-jar-plugin/2.3.2/maven-jar-plugin-2.3.2.pom?describe

I get the following output

Describe of /groups/public/org/apache/maven/plugins/maven-jar-plugin/2.3.2/maven-jar-

plugin-2.3.2.pom

This page describes the processing of a request made by external client, using information from the request, retrieved item (or exception if not item was retrieved) and some intermittent processing states.

Processing time

1.581 ms

Request Context

Key Value
request.address 10.175.42.118
request.remoteOnly  false
request.user    admin
request.url http://hostname:8081/nexus/content/groups/public/org/apache/maven/plugins/maven-jar-plugin/2.3.2/maven-jar-plugin-2.3.2.pom?describe
request.localOnly   false
request.agent   Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/35.0.1916.153 Safari/537.36
request.asExpired   false
org.sonatype.nexus.content.internal.ContentServlet.stopwatch    1.581 ms
request.external    true
Response Outcome

NOT FOUND (Item not found, core threw exception)

Processed repositories (IDs)

public
Applied Routings

Key Value
public  []
Exception

Type

org.sonatype.nexus.proxy.repository.GroupItemNotFoundException

Message

Path /org/apache/maven/plugins/maven-jar-plugin/2.3.2/maven-jar-plugin-2.3.2.pom not found in group repository "Public Repositories" [id=public].

Exception reasoning

public : Path /org/apache/maven/plugins/maven-jar-plugin/2.3.2/maven-jar-plugin-2.3.2.pom not found in group repository "Public Repositories" [id=public].

Solution

  • Your public repository group has to have all the repositories in the left column titled "Ordered Group Repositories" and NOT in the available repositories list. See more details about that in http://books.sonatype.com/nexus-book/reference/config-sect-repo-group.html and http://books.sonatype.com/nexus-book/reference/confignx-sect-managing-groups.html

    In addition you should confirm that you can access the remote repository (start with Central) through your proxy configuration by using the Browse Remote tab in the repositories configuration.

    Once you have checked all that and fixed things I would delete the local Maven repository (~/.m2/repository) and try a command line build. Once that works ... use Eclipse with M2e..