2011-08-15 12 views
5

新しいMavenプロジェクトウィザードを使用してアーキタイプを使用して、Eclipseで新しいMavenプロジェクトを作成したいとします。 「Select a Archetype」ステップでは、Nexus IndexerInternalおよびDefault Localから3つのカタログを選択できます。私はこれらのカタログの内容がどこから来るべきか理解していません。 「設定」ボタンをクリックすると、すべて灰色で表示され、変更できません。m2eclipseを使用したアーキタイプ選択

カタログには、Internalカタログのみがリストされています。これらのアーキタイプはどこから来ていますか?グループ/成果物がそこにないので、私のローカルのMavenリポジトリからではありません(また、リポジトリのアーキタイプもリストされていません)。

Nexus Indexerのリストが空白なのはなぜですか? Nexusのインデックスを更新する必要がある記事を読みましたが、これを行う方法はありません。これは、リポジトリー索引(毎日更新される予定です)とは異なります。

ご覧のとおり、カタログビジネス全体と、Maven、m2eclipse、Nexusがどのように連携しているのか、少し混乱しています。どんな説明も大歓迎です!

マイセットアップ:

  • のEclipse:ヘリオスサービスリリース2(IDのビルド:20110218から0911)を
  • のApache Mavenの3.0.3
  • m2eclipse:0.12.1.20110112-1712は、(使用するように設定外部Mavenのインストール)
  • Sonatypeネクサス™オープンソース版、バージョン:1.9.0.2

私の地元のMavenのsettings.xmlは次のようになります。

<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> 
+0

うーん、私は私がTapestryプロジェクトを作成する際に問題が発生したときにその答えを見たいのですが、それはリストに載せるべきですが、そうではなく、どうやって修正するのか分かりません。 –

答えて

0

デフォルトのアーキタイプカタログに新しいアーキタイプを含めることができます。これは手動プロセスで、〜/ .m2ディレクトリ内のカスタム.xmlファイルに追加する必要があります。詳細については

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

と参照のために、ここではテンプレート原型-の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には良いリンクがあります:What are the URLs of all the Maven Archetype catalogs that you know about?

関連する問題