<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="https://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Test archetypes in JBoss Central
</h3>
<span style="margin-bottom: 10px;">
created by <a href="https://community.jboss.org/people/fbricon">Fred Bricon</a> in <i>JBoss Tools</i> - <a href="https://community.jboss.org/docs/DOC-18203">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>One solution to test your archetypes in JBoss Central is to define a <a class="" href="https://community.jboss.org/docs/DOC-14955">Project Example User site</a>.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>First, grab a copy of the last version of <a class="jive-link-external-small" href="http://anonsvn.jboss.org/repos/jbosstools/trunk/download.jboss.org/jbosstools/examples/">project-examples-shared-XXXX.xml </a>and save it locally.</p><p>Then, you need to edit it : remove all unwanted projects and keep the one you're interested in. You will have to change :</p><ul><li>the <name> so it doesn't collide with existing names in JBT</li><li>The archetype coordinates : <ul><li><archetypeGroupId></li><li><archetypeArtifactd></li><li><archetypeVersion></li><li>Add/change <archetypeRepository> to point to the location of the repository (local or remote) containing the archetype under test</li></ul></li><li>The <tag> value must be set to <strong>central</strong></li><li>You may change the rest of the example properties according to your needs.</li><li>Save your project example descriptor locally.</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>You will end up with something like :</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><pre class="jive-pre"><code class="jive-code jive-xml"><span class="jive-xml-tag"><projects></span>
    <span class="jive-xml-tag"><project></span>
        <span class="jive-xml-tag"><category></span>Open Archetypes<span class="jive-xml-tag"></category></span>
        <span class="jive-xml-tag"><name></span>multi-helloworld<span class="jive-xml-tag"></name></span>
        <span class="jive-xml-tag"><included-projects></span>multi<span class="jive-xml-tag"></included-projects></span>
        <span class="jive-xml-tag"><shortDescription></span>Multi Module<span class="jive-xml-tag"></shortDescription></span>
        <span class="jive-xml-tag"><priority></span>1<span class="jive-xml-tag"></priority></span>
        <span class="jive-xml-tag"><description></span>This is an overly complex Hello world<span class="jive-xml-tag"></description></span>
        <span class="jive-xml-tag"><size></span>8192<span class="jive-xml-tag"></size></span>
        <span class="jive-xml-tag"><url/></span>
        <span class="jive-xml-tag"><fixes></span>
            <span class="jive-xml-tag"><fix type="wtpruntime"></span>
                <span class="jive-xml-tag"><property name="allowed-types"></span>org.jboss.ide.eclipse.as.runtime.70, org.jboss.ide.eclipse.as.runtime.71, org.jboss.ide.eclipse.as.runtime.eap.60<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="description"></span>This project example requires JBoss AS 7.0/7.1 or EAP 6 <span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="downloadId"></span>org.jboss.tools.runtime.core.as.710<span class="jive-xml-tag"></property></span>
            <span class="jive-xml-tag"></fix></span>
            <span class="jive-xml-tag"><fix type="plugin"></span>
                <span class="jive-xml-tag"><property name="id"></span>org.eclipse.m2e.core<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="versions"></span>[1.0.0,1.2.0)<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="description"></span>This project example requires m2e &gt;= 1.0.<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="connectorIds"></span>org.eclipse.m2e.feature<span class="jive-xml-tag"></property></span>
            <span class="jive-xml-tag"></fix></span>
            <span class="jive-xml-tag"><fix type="plugin"></span>
                <span class="jive-xml-tag"><property name="id"></span>org.maven.ide.eclipse.wtp<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="versions"></span>[0.13.1,0.17)<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="description"></span>This project example requires m2eclipse-wtp &gt;= 0.13.1.<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="connectorIds"></span>org.maven.ide.eclipse.wtp<span class="jive-xml-tag"></property></span>
            <span class="jive-xml-tag"></fix></span>
            <span class="jive-xml-tag"><fix type="plugin"></span>
                <span class="jive-xml-tag"><property name="id"></span>org.jboss.tools.maven.core<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="versions"></span>[1.3.0,1.4.0)<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="description"></span>This project example requires JBoss Maven Tools.<span class="jive-xml-tag"></property></span>
                <span class="jive-xml-tag"><property name="connectorIds"></span>org.jboss.tools.maven.feature,org.jboss.tools.maven.cdi.feature,org.jboss.tools.maven.hibernate.feature,org.jboss.tools.maven.jaxrs.feature,org.jboss.tools.maven.portlet.feature,org.jboss.tools.maven.seam.feature<span class="jive-xml-tag"></property></span>
            <span class="jive-xml-tag"></fix></span>
        <span class="jive-xml-tag"></fixes></span>
        <span class="jive-xml-tag"><importType></span>mavenArchetype<span class="jive-xml-tag"></importType></span>
        <span class="jive-xml-tag"><importTypeDescription></span>The project example requires the m2e, m2eclipse-wtp and JBoss Maven Integration features.<span class="jive-xml-tag"></importTypeDescription></span>
       
       
        <span class="jive-xml-tag"><defaultMavenProfiles></span>arq-jbossas-remote<span class="jive-xml-tag"></defaultMavenProfiles></span>       
        <span class="jive-xml-tag"><mavenArchetype></span>
            <span class="jive-xml-comment"><!-- Archetype coordinates-->
            <span class="jive-xml-tag"><archetypeGroupId></span>org.openarchetypes<span class="jive-xml-tag"></archetypeGroupId></span>
            <span class="jive-xml-tag"><archetypeArtifactId></span>multi-javaee6-archetype<span class="jive-xml-tag"></archetypeArtifactId></span>
            <span class="jive-xml-tag"><archetypeVersion></span>0.0.1-SNAPSHOT<span class="jive-xml-tag"></archetypeVersion></span>
            <!-- You can remove the <span class="jive-xml-tag"><archetypeRepository></span> if the archetype is available from Maven Central -->
            <span class="jive-xml-tag"><archetypeRepository></span><a class="jive-link-external-small" href="http://open-archetypes.github.com/maven-repo/snapshots/" target="_blank">http://open-archetypes.github.com/maven-repo/snapshots/</a><span class="jive-xml-tag"></archetypeRepository></span>
            <!-- if you need to test with your local build
            <span class="jive-xml-tag"><archetypeRepository></span>file:/path/to/your/local/mavenrepo/<span class="jive-xml-tag"></archetypeRepository></span>
             -->
           
            <!-- Pre-populate the project wizard input texts-->
            <span class="jive-xml-tag"><groupId></span>foo.bar<span class="jive-xml-tag"></groupId></span>
            <span class="jive-xml-tag"><artifactId></span>multi<span class="jive-xml-tag"></artifactId></span>
            <span class="jive-xml-tag"><version></span>0.0.1-SNAPSHOT<span class="jive-xml-tag"></version></span>
            <span class="jive-xml-tag"><javaPackage></span>foo.bar.multi<span class="jive-xml-tag"></javaPackage></span>
            <!-- Override default archetype properties -->
            <span class="jive-xml-tag"><properties></span>
                <span class="jive-xml-tag"><property name="name" value="Java EE 6 webapp project"/></span>
            <span class="jive-xml-tag"></properties></span>
        <span class="jive-xml-tag"></mavenArchetype></span>
       
        <!-- use the tag 'central' to make this example appear in JBoss Central - Project Examples section -->
        <span class="jive-xml-tag"><tags></span>central<span class="jive-xml-tag"></tags></span>
       
        <!-- Icon to use in JBoss Central-->
        <span class="jive-xml-tag"><icon path="icons/newwebprj_wiz.gif" /></span>
       
        <!-- Readme / Cheatsheet to open automatically when the project is generated --></span>
        <span class="jive-xml-tag"><welcome type="editor" url="/${project[0]}/readme.md"/></span>
    <span class="jive-xml-tag"></project></span>
<span class="jive-xml-tag"></projects></span>   
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Now you need to open Eclipse's preferences and got to JBoss Tools > Project Examples.</p><ul><li>Check 'Show experimental sites'</li><li>Click on the 'Add' button to add your customized project example descriptor as a User Site</li></ul><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-18203-1-18531/add-user-site.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18203-1-18531/450-417/add-user-site.png </span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>Back to JBoss Central, in the Project Examples section, click on the refresh button and see your archetype appear in the list :</p><p><a href="https://community.jboss.org/servlet/JiveServlet/showImage/102-18203-1-18532/archetype-central.png"><span> https://community.jboss.org/servlet/JiveServlet/downloadImage/102-18203-1-18532/450-150/archetype-central.png </span></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>You can now test your custom archetype exactly as if it was a built-in project wizard from JBoss Central </p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Comment by <a href="https://community.jboss.org/docs/DOC-18203">going to Community</a></p>
        <p style="margin: 0;">Create a new document in JBoss Tools at <a href="https://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2128">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>