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.
| Online: | 15 Members of 2837 |
You first step is downloading Seam and building it, see Seam SVN Repository and Building Seam.
Seam currently has two branches; trunk, for all new development, and the Seam_2_0 branch to which bugfixes only should be backported.
Seam SVN comes with a .project file, and an ant task is used to generate the .classpath file from the Maven POM's used to describe project dependencies. To generate the .classpath, in seam/ run ant build eclipseclasspath. Then, refresh the project.
The eclipseclasspath target automatically attaches any -sources.jar it finds in your local Maven repository. To populate your local Maven repository with all the available source jars for Seam dependencies and make them available in Eclipse, run ant build downloadDependenciesSources eclipseclasspath.
If you would like to use IntelliJ IDEA for Seam development, you can take advantage of the JBoss Seam community license. The license key and details about the terms are available on request by one of the other team members.
Seam has a mixture of unit and integration tests.
To run the whole testsuite (you should do this before submitting a patch or making a commit), run ant cleanall testall testreport. This generates a report in jboss-seam/test-report/junit-noframes.html.
If you want to run the testsuite in coverage mode, run ant cleanall coverageall testreport. This generate a report in jboss-seam/test-report/coverage.html. As the coverage target instruments the Seam jars, don't forget to run a ant cleanall build before using Seam normally.
You can also run the integration tests individually. For example, to run the MessagingTest from the core integration test suite
cd jboss-seam/src/test/integration ant testclass -DclassName=MessagingTest
This is useful if you want to attach a debugger to a test.
Make sure you have the test structure and libraries built/available by running ant test for the testsuite you are trying to run. Running ant clean removes some of these folders.
Download the TestNG Eclipse Plugin. Go to the debug menu, and choose Open Debug Dialog. Create a new TestNG configuration, give it a name, and set the project to Seam.
Choose the test or suite to run.
From the Classpath tab, remove all user entries, and add these JARs:
Then, using the Advanced... option, add these folders:
If you can't see any of these jars/folders, you need to refresh the project.
Then, just hit debug, and the test output will appear in the console.
Here are a few style guidelines for writing code:
public void foo()
{
log.info("foo");
}
And most importantly, take a look at some existing files, and be consistent!
You can find an Eclipse code format template in the SVN checkout (seam/eclipse-code-formatter-profile.xml); apply it by going to the project's Properties -> Java Code Style -> Formatter -> Import.
How about posting a code formatting preset for Eclipse (and other IDEs perhaps)? This would ensure that everyone adheres to the same coding style.
I knew I forgot something! We have a template in SVN, and I've added a note about it to the page. Thanks!
Is there any place proper way to start understanding the internals of Seam before start contributing
It is not quite as easy to get going using . By using any of the built in import features in IDEA (importing .project or either of the pom.xml) does not really result in anything useful. If anyone has set up the Seam sources (core for instance) nicely in IntellJ I would be happy to get some direction.
1) svn co https://svn.jboss.org/repos/seam/trunk seam
2) downloaded and extracted JBoss4.2.2.GA and reset the jboss.home in default.build.properties
3) ran ant build eclipseclasspath in seam/
4) ran ant build downloadDependenciesSources eclipseclasspath
apparently that installed maven2 as well since I didn't have it previously.
ran ant in examples/booking and examples/wiki successfully
problem is project reference probems in Eclipse (JDBS) when creating a java project for wiki or booking. when I create a java project at seam/ (the whole source path), I only see warnings.
my wiki/.classpath file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry excluding="org/jboss/seam/wiki/core/model/" kind="src" path="src/main"/>
<classpathentry kind="src" path="src/main/org/jboss/seam/wiki/core/model"/>
<classpathentry kind="src" path="src/plugin"/>
<classpathentry kind="src" path="src/test"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="lib/commons-lang-2.3.jar"/>
<classpathentry kind="lib" path="lib/dbunit-2.2.jar"/>
<classpathentry kind="lib" path="lib/ehcache-1.3.0.jar"/>
<classpathentry kind="lib" path="lib/ejb3-persistence.jar"/>
<classpathentry kind="lib" path="lib/hibernate3.jar"/>
<classpathentry kind="lib" path="lib/hibernate-annotations.jar"/>
<classpathentry kind="lib" path="lib/hibernate-commons-annotations.jar"/>
<classpathentry kind="lib" path="lib/hibernate-entitymanager.jar"/>
<classpathentry kind="lib" path="lib/hibernate-search.jar"/>
<classpathentry kind="lib" path="lib/hibernate-tools.jar"/>
<classpathentry kind="lib" path="lib/hibernate-validator.jar"/>
<classpathentry kind="lib" path="lib/j4j.jar"/>
<classpathentry kind="lib" path="lib/jakarta-oro-2.0.8.jar"/>
<classpathentry kind="lib" path="lib/jboss-archive-browsing.jar"/>
<classpathentry kind="lib" path="lib/jdom.jar"/>
<classpathentry kind="lib" path="lib/jmimemagic-0.1.0.jar"/>
<classpathentry kind="lib" path="lib/lucene-highlighter-2.1.0.jar"/>
<classpathentry kind="lib" path="lib/rome-0.9.jar"/>
<classpathentry kind="lib" path="lib/ws-commons-util-1.0.2.jar"/>
<classpathentry kind="lib" path="lib/xmlrpc-client-3.1.jar"/>
<classpathentry kind="lib" path="lib/xmlrpc-common-3.1.jar"/>
<classpathentry kind="output" path="build/exploded/wiki.war/WEB-INF/classes"/>
</classpath>
when I looked at the compileclasses ant target for wiki build.xml, the classpathref is based on "build.classpath" which is:
<path id="build.classpath">
<fileset refid="globallibs" />
<fileset dir="${local.lib.dir}"/>
</path>
with globallibs being seam/lib and local.lib.dir being wiki/lib.
When I tried adding to my wiki project buildpath in eclipse, seam/lib/*.jar minus some other jars as follows:
<fileset id="globallibs" dir="${global.lib.dir}">
<include name="*.jar"/>
<!-- The Seam bundled Hibernate is too old to even compile this application! -->
<exclude name="hibernate*"/>
<exclude name="ejb3-persistence*"/>
<exclude name="jboss-seam-gen.jar" />
</fileset>
and refreshing, I then see hundreds of errors in the problems view.
how can I fix this?
Current reading list: Effective Java, 2nd ed.; Java Power Tools; Ubuntu Linux Toolbox