2013-04-23 3 views
7

मैं अब उम्र के लिए "नमूना" settings.xml फ़ाइलों की प्रतिलिपि बना रहा हूं, और लगभग सभी में यूआरएल http://central के साथ एक भंडार शामिल है। यह मुझे खराब करता है, निश्चित रूप से वास्तव में "केंद्रीय" नामक स्थानीय डोमेन पर एक मशीन हो सकती है, इसलिए यह एक वैध यूआरएन है, लेकिन यह भी (शायद?) मेवेन के लिए कुछ विशेष अर्थ होना चाहिए।मेरे मैवेन सेटिंग्स.एक्सएमएल में "http: // central" का क्या अर्थ है?

क्या यह सामान्य रूप से उपयोग किया जाता है, लेकिन वास्तविक URL को अनदेखा किया जाता है? क्या मैं इसे किसी और चीज़ से बदल सकता हूं, या इसे पूरी तरह से हटा सकता हूं? क्या यह कहीं भी दस्तावेज है?

यदि यह महत्वपूर्ण है, तो मैं एक कॉर्पोरेट नेटवर्क पर विकसित होता हूं जिसमें आंतरिक आईबिब्लियो दर्पण होता है, जो हमारे लिए "केंद्रीय" के रूप में कार्य करता है।

उत्तर

14

AFAIK, यह a bogus URL जो निम्न उदाहरण के रूप में Configure Maven to Download from Nexus में उल्लेख है: -

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

nexus profilehttp://central की a bogus URL साथ central repository से डाउनलोड करने के लिए कॉन्फ़िगर किया गया है।

यह URL दर्पण अपने single Nexus group का URL को इंगित करने के लिए एक ही settings.xml फ़ाइल में की स्थापना द्वारा ओवरराइड की गई है। नेक्सस समूह को सक्रियप्रोफाइल तत्व में सक्रिय प्रोफ़ाइल के रूप में सूचीबद्ध किया जाता है।

मुझे आशा है कि इससे मदद मिल सकती है।

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