ฉันสร้างต้นแบบสำเร็จแล้ว ต้นแบบมีการอ้างอิงใน Nexus ของบริษัทของฉัน แคตตาล็อกดูมีรูปแบบที่ดี
แต่เมื่อฉันพยายามสร้างโปรเจ็กต์จากต้นแบบนี้ maven จะมองหา jar และต้นแบบของฉันถูกบรรจุเป็น 'maven-archetype' (ดูการติดตามสแต็กด้านล่าง)
[INFO] [archetype:generate {execution: default-cli}]
[INFO] Generating project in Interactive mode
[INFO] No archetype defined. Using maven-archetype-quickstart (org.apache.maven.archetypes:maven-archetype-quickstart:1.0)
Choose archetype:
1: local -> com.XXX.archetypes:frameworkV4Project
Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : 1
Downloading: http://XXX/content/repositories/xxx-releases/com/xxx/archetypes/frameworkV4Project/1.0.0/frameworkV4Project-1.0.0.jar
[INFO] Unable to find resource 'com.XXX.archetypes:frameworkV4Project:jar:1.0.0' in repository frameworkV4Project-repo (http://XXX/content/repositories/XXX-releases)
Downloading: http://XXX/content/groups/XXX//com/XXX/archetypes/frameworkV4Project/1.0.0/frameworkV4Project-1.0.0.jar
[INFO] Unable to find resource 'com.XXX.archetypes:frameworkV4Project:jar:1.0.0' in repository XXX (http://XXX/content/groups/XXX/)
Downloading: http://XXX/content/groups/bdx-dev//com/XXX/archetypes/frameworkV4Project/1.0.0/frameworkV4Project-1.0.0.jar
[INFO] Unable to find resource 'com.XXX.archetypes:frameworkV4Project:jar:1.0.0' in repository central (http://repo1.maven.org/maven2)
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] The desired archetype does not exist (com.XXX.archetypes:frameworkV4Project:1.0.0)
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 6 seconds
[INFO] Finished at: Fri Feb 10 16:38:13 CET 2012
[INFO] Final Memory: 28M/247M
[INFO] ------------------------------------------------------------------------
D:\workspace\xxx\frameworkV4Project>
นี่คือไฟล์แค็ตตาล็อกที่พบใน Nexus :
<archetype-catalog>
<archetypes>
<archetype>
<groupId>com.rte.archetypes</groupId>
<artifactId>frameworkV4Project</artifactId>
<version>1.0.0</version>
</archetype>
หากฉันรวมต้นแบบ "โรงเรียนเก่า" ของฉันไว้เป็นขวด Nexus จะไม่อ้างอิงมัน (แคตตาล็อกต้นแบบของ Nexus ถูกสร้างขึ้นทันที ไม่สามารถแก้ไขได้) ดูเหมือนว่า Nexus จะอ้างอิงเฉพาะสิ่งประดิษฐ์ 'maven-archetype' ในแคตตาล็อกเท่านั้น
ฉันพลาดอะไรไป? จำเป็นต้องกำหนดต้นแบบเป็นต้นแบบที่บรรจุขวดหรือไม่ หรือฉันสามารถระบุประเภทของบรรจุภัณฑ์ที่ Maven ต้องมองหาได้หรือไม่?
ขอบคุณ,
มาติเยอ.