Configuring repositories with Maven, Eclipse and Nexus

View: New views
2 Messages — Rating Filter:   Alert me  

Configuring repositories with Maven, Eclipse and Nexus

by Exposito Aguilera, Francisco :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.

Hello,

 

I want to configure Maven, Eclipse and Nexus, but I am doing something wrong.

 

 

1) I have Eclipse 3.5

2) I've installed Maven 2.2.1 and configured a local repository in

settings.xml:

 

<localRepository>C:\Archivos de programa\Apache Software Foundation\iss-maven-repository</localRepository>

 

3) I´ve installed m2eclipse

4) I have installed Nexus Sonatype 1.4.0 and I've downloaded remote indexes from Nexus repositories.

 

Then I open eclipse and it begins to update indexes (maybe because of the embedded maven):

 

Updating index http://repo1.maven.org/maven2/ Downloading central : nexus-maven-repository-index.gz

 

When it finishes this upload (about 15 minutes), I add the maven installation in Window-->Preferences and I modify the C:\Documents and Settings\...\.m2\settings.xml like that:

 

<settings>

  <mirrors>

    <mirror>

      <!--This sends everything else to /public -->

      <id>nexus</id>

      <mirrorOf>*</mirrorOf>

      <url>http://localhost: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></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>

 

 

And I click on Reindex local repository. I receive the error:

 

3/11/09 17:09:45 CET: [WARN] Error scanning context: local Cannot delete C:\Workspaces\ISS_maven2\.metadata\.plugins\org.maven.ide.eclipse\nexus\loca

l\_4.cfs

3/11/09 17:09:45 CET: Unable to reindex local repository

 

Then I remove the http://repo1.maven.org/maven2 index from eclipse view "Maven Indexes", restart Eclipse and in "Maven Indexes" I update the local index properly.

 

But now, if I want to create a new maven project, nothing appears in Nexus Indexer. And if I create a project and convert it to maven and try to add a dependency, nothing appears.

 

Only appear dependencies and artifacts when I add the maven index http://repo1.maven.org/maven2.

 

Could you help me, please?

 

Thanks a lot.

 


Re: Configuring repositories with Maven, Eclipse and Nexus

by Anders Hammar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

To me, this sounds as a question for the m2eclipse mailing list. Post your question there and you'll address the m2eclipse community.

/Anders

On Wed, Nov 4, 2009 at 08:47, Exposito Aguilera, Francisco <francisco.exposito@...> wrote:

Hello,

 

I want to configure Maven, Eclipse and Nexus, but I am doing something wrong.

 

 

1) I have Eclipse 3.5

2) I've installed Maven 2.2.1 and configured a local repository in

settings.xml:

 

<localRepository>C:\Archivos de programa\Apache Software Foundation\iss-maven-repository</localRepository>

 

3) I´ve installed m2eclipse

4) I have installed Nexus Sonatype 1.4.0 and I've downloaded remote indexes from Nexus repositories.

 

Then I open eclipse and it begins to update indexes (maybe because of the embedded maven):

 

Updating index http://repo1.maven.org/maven2/ Downloading central : nexus-maven-repository-index.gz

 

When it finishes this upload (about 15 minutes), I add the maven installation in Window-->Preferences and I modify the C:\Documents and Settings\...\.m2\settings.xml like that:

 

<settings>

  <mirrors>

    <mirror>

      <!--This sends everything else to /public -->

      <id>nexus</id>

      <mirrorOf>*</mirrorOf>

      <url>http://localhost: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></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>

 

 

And I click on Reindex local repository. I receive the error:

 

3/11/09 17:09:45 CET: [WARN] Error scanning context: local Cannot delete C:\Workspaces\ISS_maven2\.metadata\.plugins\org.maven.ide.eclipse\nexus\loca

l\_4.cfs

3/11/09 17:09:45 CET: Unable to reindex local repository

 

Then I remove the http://repo1.maven.org/maven2 index from eclipse view "Maven Indexes", restart Eclipse and in "Maven Indexes" I update the local index properly.

 

But now, if I want to create a new maven project, nothing appears in Nexus Indexer. And if I create a project and convert it to maven and try to add a dependency, nothing appears.

 

Only appear dependencies and artifacts when I add the maven index http://repo1.maven.org/maven2.

 

Could you help me, please?

 

Thanks a lot.