Version 1

    One solution to test your archetypes in JBoss Central is to define a Project Example User site.


    First, grab a copy of the last version of project-examples-shared-XXXX.xml and save it locally.

    Then, you need to edit it : remove all unwanted projects and keep the one you're interested in. You will have to change :

    • the <name> so it doesn't collide with existing names in JBT
    • The archetype coordinates :
      • <archetypeGroupId>
      • <archetypeArtifactd>
      • <archetypeVersion>
      • Add/change <archetypeRepository> to point to the location of the repository (local or remote) containing the archetype under test
    • The <tag> value must be set to central
    • You may change the rest of the example properties according to your needs.
    • Save your project example descriptor locally.


    You will end up with something like :



            <category>Open Archetypes</category>
            <shortDescription>Multi Module</shortDescription>
            <description>This is an overly complex Hello world</description>
                <fix type="wtpruntime">
                    <property name="allowed-types">,,</property>
                    <property name="description">This project example requires JBoss AS 7.0/7.1 or EAP 6 </property>
                    <property name="downloadId"></property>
                <fix type="plugin">
                    <property name="id">org.eclipse.m2e.core</property>
                    <property name="versions">[1.0.0,1.2.0)</property>
                    <property name="description">This project example requires m2e &gt;= 1.0.</property>
                    <property name="connectorIds">org.eclipse.m2e.feature</property>
                <fix type="plugin">
                    <property name="id">org.maven.ide.eclipse.wtp</property>
                    <property name="versions">[0.13.1,0.17)</property>
                    <property name="description">This project example requires m2eclipse-wtp &gt;= 0.13.1.</property>
                    <property name="connectorIds">org.maven.ide.eclipse.wtp</property>
                <fix type="plugin">
                    <property name="id"></property>
                    <property name="versions">[1.3.0,1.4.0)</property>
                    <property name="description">This project example requires JBoss Maven Tools.</property>
                    <property name="connectorIds">,,,,,</property>
            <importTypeDescription>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration features.</importTypeDescription>
                <!-- Archetype coordinates-->
                <!-- You can remove the <archetypeRepository> if the archetype is available from Maven Central -->
                <!-- if you need to test with your local build
                <!-- Pre-populate the project wizard input texts-->
                <!-- Override default archetype properties -->
                    <property name="name" value="Java EE 6 webapp project"/>
            <!-- use the tag 'central' to make this example appear in JBoss Central - Project Examples section -->
            <!-- Icon to use in JBoss Central-->
            <icon path="icons/newwebprj_wiz.gif" />
            <!-- Readme / Cheatsheet to open automatically when the project is generated -->
            <welcome type="editor" url="/${project[0]}/"/>


    Now you need to open Eclipse's preferences and got to JBoss Tools > Project Examples.

    • Check 'Show experimental sites'
    • Click on the 'Add' button to add your customized project example descriptor as a User Site




    Back to JBoss Central, in the Project Examples section, click on the refresh button and see your archetype appear in the list :



    You can now test your custom archetype exactly as if it was a built-in project wizard from JBoss Central