Archetype selection using m2eclipse

I would like to create a new Maven project in Eclipse using the archetype using the New Maven project wizard. In step "Select the archetype of the" I have three directories to choose from: Nexus Indexer, Internaland Default Local. I do not understand where the content for these directories should come from. If I click the Configure button, they will be grayed out and I cannot change them.

Only the catalog Internalcontains any archetypes listed in it. Where do these archetypes come from? This is not from my local Maven repository, because there are no groups / artifacts in it (and archetypes are not listed in the repo).

Why is the list Nexus Indexerempty? I read a few posts about the need to update the Nexus index, but not how to do it. Is this different from repository indexes (which are planned to be updated daily).

As you can see, I am a little confused about the whole catalog business and how Maven, m2eclipse and Nexus interact. Any clarifications are welcome!

My setup:

  • Eclipse: Helios Service Release 2 (build code: 20110218-0911)
  • Apache Maven 3.0.3
  • m2eclipse: 12/0/20110112-1712 (configured to use an external Maven installation)
  • Open Source Sonatype Nexus ™ Version: 1.9.0.2

My local Maven settings.xml is as follows:

<settings>
  <mirrors>
    <mirror>
      <!--This sends everything else to /public -->
      <id>nexus</id>
      <mirrorOf>*</mirrorOf>
      <url>http://myserver: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>
  <servers>
      <server>
          <id>my-snapshots</id>
          <username>user</username>
          <password>password</password>
      </server>
      <server>
          <id>my-releases</id>
          <username>user</username>
          <password>password</password>
      </server>
  </servers>
</settings>
+5
source share
1

. , .xml ~/.m2.

: http://maven.apache.org/archetype/maven-archetype-plugin/specification/archetype-catalog.html

, archetype-catalog.xml

<?xml version="1.0" encoding="UTF-8"?>
<archetype-catalog>
  <archetypes>
    <archetype>
      <groupId>com.spedge</groupId>
      <artifactId>archetype-application-custom-filter</artifactId>
      <version>1.0-SNAPSHOT</version>
    </archetype>
  </archetypes>
</archetype-catalog>

, SO Archetypes: URL- Archetype Maven, ?

0

All Articles