blob: 5eaf8827e38366f635df8585bc1c717925a99b2e [file] [log] [blame]
= Source Code
:jbake-type: page
:jbake-status: published
*We have moved to GIT.
This means that anything you may find elsewhere on the site about SVN is no longer valid!*
The documentation will be updated over the next few days and weeks but if you find anything that is *really* misleading then please send a message to the developer list at: link:mailto:dev@tomee.apache.org[dev@tomee.apache.org]
Probably the best GIT tutorial on the planet can be found here: https://www.atlassian.com/git/ - This is a great reference for both existing and new GIT users.
Please take a look.
== GIT Information for Everyone
You can browse the source code via the http://gitbox.apache.org/repos/asf/tomee.git[web interface].
If you intend to hack on TomEE then it is recommended that you create a https://github.com[GitHub Account] and https://help.github.com/articles/fork-a-repo/[fork] the TomEE repository so that you can submit pull requests (See below).
If you just want to build the source version then you can download (aka clone) the sources of Apache TomEE with a GIT client from the following URL https://gitbox.apache.org/repos/asf/tomee.git - The 'master' branch is the current development branch.
Performing the checkout from a command line using the GIT client (recommended) is as easy as executing the following command:
----
git clone https://gitbox.apache.org/repos/asf/tomee.git tomee
----
If you want to checkout a specific branch then you can just change that in the command:
----
git clone -b tomee-1.7.x https://gitbox.apache.org/repos/asf/tomee.git tomee-1.7.x
----
Or alternatively with Apache Maven 3.0.5 or later:
----
mvn scm:checkout -DconnectionUrl=scm:git:https://gitbox.apache.org/repos/asf/tomee.git -DcheckoutDirectory=tomee
----
NOTE: This method does not require the GIT client.
== GIT Information for TomEE Contributors
*Please read our own detailed GitFlow workflow information xref:git.adoc[here]*
We will be using the https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow[Gitflow Workflow] from day one.
Please read and understand how this works.
See https://help.github.com/articles/using-pull-requests/[here] for information on pull requests.
The official Apache Committer documentation can be found https://gitbox.apache.org/#committers-getting-started[here]
== Continuous integration
Apache TomEE continuous integration relies on http://ci.apache.org/[Apache Buildbot].
All builders are available http://ci.apache.org/builders[from the page].
* http://ci.apache.org/builders/tomee-1.7.x-ubuntu[Apache TomEE 1.7.x under Ubuntu]
* http://ci.apache.org/builders/tomee-trunk-ubuntu[Apache TomEE 2.x under Ubuntu]
* http://ci.apache.org/builders/tomee-trunk-win-sunjdk[Apache TomEE 2.x under Windows using a Sun/Oracle JDK]
* http://ci.apache.org/builders/tomee-trunk-win-ibmjdk6[Apache TomEE 2.x under Windows using an IBM JDK]
== Maven
To build the code, you'll need to grab a copy of http://maven.apache.org[Apache Maven], version 3.0.5 or later.
== Memory Settings
It is pretty much guaranteed that you will need to give Maven an increase on the available memory.
+ Depending on the OS you are working on the fix can be as easy as (Note: _-XX:MaxPermSize=256M_ is ignored by Java 8):
----
export MAVEN_OPTS="-Xmx768m -XX:MaxPermSize=256M -XX:ReservedCodeCacheSize=64m -Xss2048k"
----
on MacOS and Unices or
----
set "MAVEN_OPTS=-Xmx768m -XX:MaxPermSize=256M -XX:ReservedCodeCacheSize=64m -Xss2048k"
----
on MS Windows.
== Full Build
A fast build that skips all tests, generates no reports and creates full distribution archives is as follows:
----
mvn -Dsurefire.useFile=false -DdisableXmlReport=true -DuniqueVersion=false -ff -Dassemble -DskipTests -DfailIfNoTests=false clean install
----
The full build with tests takes around 2 hours:
----
mvn -Dassemble clean install
----
The output of those commands should end with "BUILD SUCCESSFUL"
It is of course possible to just compile and test individual modules.
Just change to the module directory and run the same commands as above.
== Quick Build
If you are in real a hurry (and let's face it most of us are) you can run a quick build without the examples using the _quick_ profile:
----
mvn -Pquick -Dsurefire.useFile=false -DdisableXmlReport=true -DuniqueVersion=false -ff -Dassemble -DskipTests -DfailIfNoTests=false clean install
----
== Binary locations
Once built, the TomEE binaries will be located at:
....
ls [project]/tomee/apache-tomee/target/*.zip
tomee/apache-tomee/target/apache-tomee-jaxrs-[version]-SNAPSHOT.zip
tomee/apache-tomee/target/apache-tomee-plus-[version]-SNAPSHOT.zip
tomee/apache-tomee/target/apache-tomee-webprofile-[version]-SNAPSHOT.zip
tomee/apache-tomee/target/apache-tomee-plume-[version]-SNAPSHOT.tar.gz
....
The OpenEJB standalone binaries will be located at:
....
ls [project]/assembly/openejb-standalone/target/*.zip
assembly/openejb-standalone/target/apache-openejb-[version]-SNAPSHOT.zip
....