2011-08-15 14 views
5

का उपयोग करके मैं न्यू मैवेन प्रोजेक्ट विज़ार्ड का उपयोग करके आर्किटेप का उपयोग करके एक्लिप्स में एक नया मेवेन प्रोजेक्ट बनाना चाहता हूं। "एक आर्केटाइप का चयन करें" चरण में, मेरे पास चुनने के लिए तीन कैटलॉग हैं: Nexus Indexer, Internal और Default Local। मुझे समझ में नहीं आता कि इन कैटलॉग की सामग्री कहां से आ रही है। अगर मैं "कॉन्फ़िगर करें" बटन पर क्लिक करता हूं, तो वे सभी गले से बाहर हो जाते हैं और मैं उन्हें संशोधित नहीं कर सकता।आर्केटाइप चयन m2eclipse

केवल Internal कैटलॉग में सूचीबद्ध कोई भी archetypes है। ये archetypes कहां से आ रहे हैं? यह मेरे स्थानीय मेवेन भंडार से नहीं है क्योंकि समूह/कलाकृतियों इसमें नहीं हैं (और रेपो में आर्केटीप्स सूचीबद्ध नहीं हैं)।

Nexus Indexer सूची खाली क्यों है? मैंने कुछ पोस्ट पढ़ी हैं जिन्हें नेक्सस इंडेक्स को अपडेट करने की आवश्यकता है, लेकिन यह कैसे नहीं किया जाए। क्या यह भंडार सूचकांक से अलग है (जिसे दैनिक अद्यतन किया जाना निर्धारित है)।

जैसा कि आप देख सकते हैं, मैं पूरे कैटलॉग व्यवसाय के बारे में थोड़ा उलझन में हूं और कैसे मैवेन, एम 2clipse और नेक्सस बातचीत करते हैं। कोई स्पष्टीकरण सबसे स्वागत है!

मेरे सेटअप:

  • ग्रहण: Helios सेवा रिलीज़ 2 (आईडी बिल्ड: 20,110,218-0911)
  • अपाचे 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

हम्म, मैं 'इसका उत्तर देखना पसंद है क्योंकि मुझे टेपेस्ट्री परियोजना बनाने में परेशानी हो रही है, इसे सूचीबद्ध किया जाना चाहिए लेकिन यह नहीं है और मुझे नहीं पता कि इसे कैसे ठीक किया जाए, बमर! –

उत्तर

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> 

इसके अतिरिक्त है, यहाँ इतना के बारे में Archetypes पर एक अच्छा लिंक है: What are the URLs of all the Maven Archetype catalogs that you know about?

संबंधित मुद्दे