<!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="http://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;">
    Hacking on AS7
</h3>
<span style="margin-bottom: 10px;">
    modified by <a href="http://community.jboss.org/people/jason.greene%40jboss.com">Jason Greene</a> in <i>JBoss AS7 Development</i> - <a href="http://community.jboss.org/docs/DOC-15596">View the full document</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><h4>1. Create a github account</h4><p><a class="jive-link-external-small" href="http://github.com">http://github.com</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>2. Fork jboss-as into your account</h4><p><a class="jive-link-external-small" href="http://github.com/jbossas/jboss-as">http://github.com/jbossas/jboss-as<br/></a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>3. Clone your newly forked copy onto your local workspace</h4><div> </div><pre class="jive-pre"><code class="jive-code">
$ git clone git@github.com:[your user]/jboss-as.git
Initialized empty Git repository in /devel/jboss-as/.git/
remote: Counting objects: 2444, done.
remote: Compressing objects: 100% (705/705), done.
remote: Total 2444 (delta 938), reused 2444 (delta 938)
Receiving objects: 100% (2444/2444), 1.71 MiB | 205 KiB/s, done.
Resolving deltas: 100% (938/938), done.
 
$ cd jboss-as

</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>4. Add a remote ref to upstream, for pulling future updates</h4><pre class="jive-pre"><code class="jive-code">git remote add upstream git://github.com/jbossas/jboss-as.git 
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>5. Use maven (or build.sh) (make sure you use maven 3)</h4><pre class="jive-pre"><code class="jive-code">$ mvn install
.....
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] JBoss Application Server: BOM ..................... SUCCESS [1.834s]
[INFO] JBoss Application Server: Parent Aggregator ....... SUCCESS [0.022s]
[INFO] JBoss Application Server: Domain Core ............. SUCCESS [3.051s]
[INFO] JBoss Application Server: Server Manager .......... SUCCESS [0.204s]
[INFO] JBoss Application Server: Server .................. SUCCESS [0.283s]
[INFO] JBoss Application Server: Domain Controller ....... SUCCESS [0.084s]
[INFO] JBoss Application Server: Process Manager ......... SUCCESS [0.314s]
[INFO] JBoss Application Server: Remoting ................ SUCCESS [0.390s]
[INFO] JBoss Application Server: Build ................... SUCCESS [5.696s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>6. Pulling later updates from upstream</h4><pre class="jive-pre"><code class="jive-code">$ git pull upstream master
>From git://github.com/jbossas/jboss-as
 * branch&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; master&#160;&#160;&#160;&#160; -&gt; FETCH_HEAD
Updating 3382570..1fa25df
Fast-forward
 {parent =&gt; bom}/pom.xml&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; |&#160;&#160; 70 ++++----------
 build/pom.xml&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; |&#160;&#160; 13 +--
 domain/pom.xml&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; |&#160;&#160; 10 ++
 .../src/main/resources/examples/host-example.xml&#160;&#160; |&#160;&#160;&#160; 2 +-
 .../resources/examples/jboss-domain-example.xml&#160;&#160;&#160; |&#160;&#160; 28 +++---
 .../main/resources/schema/jboss-domain-common.xsd&#160; |&#160;&#160; 12 +--
 .../main/resources/schema/jboss-domain-host.xsd&#160;&#160;&#160; |&#160;&#160;&#160; 2 +-
 domain/src/main/resources/schema/jboss-domain.xsd&#160; |&#160;&#160; 17 ++--
 pom.xml&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; |&#160; 100 ++++++++++++++++++--
 process-manager/pom.xml&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; |&#160;&#160;&#160; 3 +-
 10 files changed, 156 insertions(+), 101 deletions(-)
 rename {parent =&gt; bom}/pom.xml (85%)
</code></pre><p><span style="font-family: monospace;"><br/></span></p><h4>7. Pushing pulled updates (or local commits if you aren't using topic branches) to your private github repo (origin)</h4><pre class="jive-pre"><code class="jive-code">$ git push
Counting objects: 192, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (44/44), done.
Writing objects: 100% (100/100), 10.67 KiB, done.
Total 100 (delta 47), reused 100 (delta 47)
To git@github.com:[your user]/jboss-as.git
&#160;&#160; 3382570..1fa25df&#160; master -&gt; master
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>8. Discuss your planned changes (if you want feedback)</h4><ul><li>On the forums - <a class="" href="http://community.jboss.org/en/jbossas/dev/jboss_as7_development">http://community.jboss.org/en/jbossas/dev/jboss_as7_development</a></li><li>On IRC - <a class="jive-link-anchor-small">irc://irc.freenode.org/jboss-as7</a><span> or <a class="jive-link-external-small" href="http://webchat.freenode.net/?channels=jboss-as7">https://webchat.freenode.net/?channels=jboss-as7</a></span></li></ul><h4>9. Make sure there is a JIRA somewhere for the enhancement/fix</h4><p><a class="jive-link-external-small" href="http://jira.jboss.org">http://jira.jboss.org</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>10. Create a simple topic branch to isolate that work (just a recommendation)</h4><pre class="jive-pre"><code class="jive-code">git checkout -b my_cool_feature
</code></pre><h4>11. Make the changes and commit one or more times (Don't forget to push)</h4><pre class="jive-pre"><code class="jive-code">git commit -m 'JBAS-XXXX Frunubucate the Fromungulator'
git commit -m 'JBAS-YYYY Tripple Performance of Fromungulation'
git push my_cool_feature
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>Note that git push references the branch you are pushing and defaults to master,<strong style="font-weight: bold;"> not your working branch</strong>.</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4 style="color: #333333; font-weight: bold; margin-top: 0pt; margin-right: 0pt; margin-bottom: 0pt; margin-left: 0pt; padding-top: 10px; padding-right: 0pt; padding-bottom: 4px; padding-left: 0pt; font-size: 13pt; ">12. Rebase your branch against the latest master (applies your patches on top of master)</h4><pre class="jive-pre"><code class="jive-code">git fetch upstream
git rebase -i upstream/master
# if you have conflicts fix them and rerun rebase
git push my_cool_feature
</code></pre><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>The -i triggers an interactive update which also allows you to combine commits, alter commit messages etc. It's a good idea to make the commit log very nice for external consumption. Note that if any of your changes have conflicts, you will have to edit them and </p><h4>13. Get your changes merged into upstream</h4><ol><li>Make sure your repo is in sync with other unrelated changes in upstream before requesting your changes be merged into upstream by repeating&#160; step 12.</li><li><span>Email a pull request to </span><a class="jive-link-email-small" href="mailto:jbossas-pull-requests@lists.jboss.org" target="_blank">jbossas-pull-requests@lists.jboss.org</a><span> (if I haven't subscribed the list, do it </span><a class="jive-link-external-small" href="https://lists.jboss.org/mailman/listinfo/jbossas-pull-requests">here</a><span>) with a link to your repo, a description of the changes, and who reviewed (if any)</span></li><li>After review a maintainer will merge your patch, update/resolve issues by request, and reply when complete</li></ol><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h4>Appendix A.&#160; Adding a new external dependency</h4><ol><li>Edit pom.xml and add a property of the form "version.groupId.artifactId" which contains the Maven version of the dependency.&#160; Add your dependency to the &lt;dependencyManagement&gt; section, and use the property for the version.&#160; If your new dependency has any transitive dependencies, be sure to &lt;exclude&gt; them (or if possible, update the project so that all its dependencies are of <strong style="font-weight: bold;">provided</strong> scope).</li><li>Add your dependency to any AS modules that require it, but only with group/artifact.</li><li>Edit build/pom.xml and add your dependency with only group/artifact.</li><li>Create a directory in build/src/modules corresponding to the <strong style="font-weight: bold;">module's</strong> name (which will differ from the Maven group/artifact name; look at other modules to get a feel for the naming scheme), with a version of "main", like this: "build/src/modules/org/jboss/foo/main".</li><li>Create a module.xml file inside the "main" directory.&#160; Use a module.xml from another similar module as a template.</li><li>Edit build/build.xml and add a &lt;module-def&gt; element.&#160; The name listed in the &lt;module-def&gt; element corresponds to the <strong style="font-weight: bold;">module</strong> name.&#160; The group/artifact listed in the nested maven-resource element(s) refer to the <strong style="font-weight: bold;">Maven</strong> group/artifact name.</li><li><strong style="font-weight: bold;">Important:</strong> Make sure you did not introduce any transitive dependencies by using "mvn dependency:tree".&#160; If you did, be sure to add &lt;exclusion&gt;s for each of them to your dependency as described above.</li></ol><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Please be sure to preserve the alphabetical ordering of all POMs and the build.xml file.</p><h4>Appendix B.&#160; Adding a new AS submodule</h4><ol><li>Create the directory corresponding to the submodule and add it to the root pom.xml file.&#160; The convention is to leave off the "jboss-as-" portion, so "jboss-as-remoting" becomes "remoting".</li><li>Create a POM for your submodule (use another submodule as a template).&#160; Make sure all dependencies you specify do <strong style="font-weight: bold;">not</strong> include a version.&#160; The group ID should be "org.jboss.as", and the artifact ID should begin with "jboss-as-" and there should be a proper &lt;name&gt; for the new module.</li><li>Add the new submodule to the top section of the &lt;dependencyManagement&gt; of the top-level pom.xml.&#160; The version should be set to "${project.version}".&#160; This section is sorted alphabetically by artifact name so please preserve that ordering.</li><li>Add your submodule dependency to any AS modules that require it, but only with group/artifact.</li><li>Edit build/pom.xml and add the new submodule with only group/artifact.</li><li>Create a directory in build/src/modules corresponding to the submodule, with a version of "main", like this: "build/src/modules/org/jboss/as/new-subsystem/main".</li><li>Create a module.xml file inside the "main" directory.&#160; Use a module.xml from another subsystem as a template.</li><li>Edit build/build.xml and add a &lt;module-def&gt; element for the subsystem.&#160; Use the module name and Maven coordinates from steps 6 and 2 respectively.&#160; Use another submodule as a template.</li></ol><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Please be sure to preserve the alphabetical ordering of all POMs and the build.xml file.</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Comment by <a href="http://community.jboss.org/docs/DOC-15596">going to Community</a></p>

        <p style="margin: 0;">Create a new document in JBoss AS7 Development at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=102&containerType=14&container=2225">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>