Built with Seam

You can find the full source code for this website in the Seam package in the directory /examples/wiki. It is licensed under the LGPL.

If you are interested in contributing back to Weld, please read on!

First, read this guide, it details all you need to know to set up your IDE, run the tests and to debug your work. If you are having problems, drop by #weld-dev on and ask for help!

Finally, make sure there is a JIRA issue, and submit your patch. We will invite you to become a committer to Weld after a developer submits useful, well designed patches. Becoming a committer looks great on your resume, and could be the deciding factor in getting you a great job!

Red Hat Inc. also hires exceptional contributors as full-time open source developers (in fact, most of the full time team members started in the community!).

Getting Started

You first step is pulling the Weld source from Git. Weld uses Maven, so run mvn install to build Weld and install it to your local maven repository. The APIs are in another project, so you'll need to check that if you have to alter them (you probably won't!).

Github has some great guides for working with Git, we suggest you start with Forking a project. We also recommend the Pro Git EBook as a general reference.

To clean the project, type mvn clean. To show the dependencies for the project, type mvn dependency:tree.

By default, snapshot dependencies won't be updated. When you update from Git you should also make sure that all your snapshot dependencies are up to date, using mvn -U clean install.

We require you to use Maven 3.

Setting up an Eclipse workspace

We recommend you set up an Eclipse workspace installing m2eclipse, and using the Import | Existing Maven Project wizard.

Developing Seam using IntelliJ IDEA

If you would like to use IntelliJ IDEA for Weld development, you can take advantage of the JBoss Seam community license. The license key and details about the terms are available on request.

Submitting your changes

We prefer you to submit your changes using a git topic branch, which you then push to a remote git repository. Having done this, create a pull request for the Weld organisation at Github. You should then link to the pull request in the associated JIRA issue. We will then use the pull request to conduct any code review needed. If you are making a lot of changes, consider splitting you changes into logical chunks. Try not to make any whitespace changes in a commit - if you want to make whitespace changes, do this in a separate commit with the message whitespace.

Running the testsuite

Weld has an extensive test suite. The test suite contains unit tests that test the RI. It also contains a test for each assertion in the spec. You should write one test for each assertion in the spec, and mark it using the @SpecAssertion(section="1.2.3") annotation. You can also use the @SpecVersion annotation to note the version of the spec you are developing the test for.

To run the whole testsuite (you should do this before submitting a patch or making a commit), run mvn clean install && mvn test -Dincontainer in the root directory, this will clean up from any previous builds, thus giving you a clean run. It will also run the entire testsuite in JBoss AS to verify the container integration. Any test failures will cause the build to fail.

To ignore test failures, you can run mvn install -Dmaven.test.failure.ignore=true.

If your branch causes test failures, it will not be integrated into master.

The Weld Git repository is checked every 15 minutes, and if changes have occurred, a build is kicked off and the testsuite run. You can find the results on the Hudson monitor

Running integration tests from Eclipse Plugin

This is useful if you want to attach a debugger to a test.

See the Arquillian, Reference Guide for details on how to setup Arquillian with m2eclipse.

The Weld integration test suite defines 3 Maven profiles:

  • Default (Use Weld Embedded to run the tests)
  • incontainer (Start and stop JBoss AS as part of the Test Run)
  • incontainer-remote (Connect to a running JBoss AS instance)

For development:

  • Start JBoss AS manually using the default startup script and have JBoss AS run in the background.
  • Configure the integration test project to use the incontainer-remote profile in m2eclipse.
  • Run your JUnit tests the same way you normally would.

Arquillian will connect and deploy the tests to your running JBoss AS instance and save you the startup/shutdown time for each test.

Coding guidelines

Commit message format

We recommend you follow the standard GIT convention of using a short subject line (less that 50 characters) summarizing the commit (including the issue number where appropriate), followed by a body describing the change in more detail. The body should be separated from the subject with a blank line.