Within this post you will see
1. Howto download JBoss sources
2. Howto compile the downloaded JBoss sources
3. Howto run tests to check the integrity of the code (you might change a class to see the difference)
Main post:
- The first thing to do is to get a user/pw for jboss.org
- Then you will have to install Subversion (SVN) on your machine
- Download the current source code with the command line "svn export https://svn.jboss.org/repos/jbossas/trunk /app/my_jboss_dev/" (takes more than an hour)
- If you want to get an older/specific JBoss.org version browse all version with Firefox:
https://svn.jboss.org/repos/jbossas/branches/
and adapt the URL in the command line, for example :
$ svn export https://svn.jboss.org/repos/jbossas/branches/JBPAPP_4_3_0_GA_CP08_JBPAPP-5432 /app/my_jboss_dev/
- After having downloaded the source files make sure to use the right Java compiler (JEE 5 in my case)
$ export JAVA_HOME=/app/java/jdk1.5.0_21/
$ export PATH=$PATH:$JAVA_HOME/bin
$ export PATH=$PATH:$JAVA_HOME/bin
- Install the right ANT version (in my case 1.6 (not 1.7+). When using Fedora remove the latest ant from your machine via "sudo yum remove ant"
$ export ANT_HOME=/app/middleware/apache-ant-1.6.5
$ export PATH=$PATH:$ANT_HOME/bin
- Set the flag to be able to run test cases
$ cd <JBoss>/build$ vi build.properties
(change build.unsecure=true)
- Build the server
$ ./build.sh
(output can be found in <JBoss>/build/output)
- Start the server
$ cd <JBoss>/build/output/jboss-4.3.0.GA_CP08/bin$ ./run.sh -c production
- Build all the testcase ( choose the right ANT version, here 1.6)
(output can be found in <JBoss>/testsuite/output)
$ export ANT_HOME=/app/middleware/ apache-ant-1.6.5/
$ export PATH=$PATH:$ANT_HOME/bin$ ./build.sh
- Run the testcases one by one
$ ./build.sh one-test -Dtest=org.jboss.test.cmp2.optimisticlock.test. OptimisticLockUnitTestCase
result: [junit] Running org.jboss.test.cmp2. optimisticlock.test. OptimisticLockUnitTestCase
[junit] Tests run: 18, Failures: 0, Errors: 0, Time elapsed: 5.276 sec
$ ./build.sh one-test -Dtest=org.jboss.test.tm.test. TransactionManagerUnitTestCase
result: [junit] Running org.jboss.test.tm.test. TransactionManagerUnitTestCase
[junit] Tests run: 28, Failures: 0, Errors: 0, Time elapsed: 0.823 sec
result: [junit] Running org.jboss.test.cmp2.
[junit] Tests run: 18, Failures: 0, Errors: 0, Time elapsed: 5.276 sec
$ ./build.sh one-test -Dtest=org.jboss.test.tm.test.
result: [junit] Running org.jboss.test.tm.test.
[junit] Tests run: 28, Failures: 0, Errors: 0, Time elapsed: 0.823 sec