This page will help you setting up your project to work with JRebirth.
JRebirth is composed by a set of jar files, you just have to add them into your application classpath to use them.
To get them you can download manually JRebirth distribution archive, but it could be out of date.
This distribution mode will be improved in the future for those you don't want to deal with an artifact repository.
Currently the easy way to get JRebirth jar files is to use maven convention.
You just need to add these dependencies into your pom.xml to begin to play with
JRebirth Core features.
The first one is the core library of JRebirth Application Framework.
The second one is used to displayed basic JRebirth Preloader.
The last one an optional library used to manage logs.
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 | < dependencies > <!-- Use logback logger --> < dependency > < groupId >ch.qos.logback</ groupId > < artifactId >logback-classic</ artifactId > < version >1.0.13</ version > </ dependency > < dependency > < groupId >org.jrebirth.af</ groupId > < artifactId >preloader</ artifactId > < version >7.7.0</ version > </ dependency > < dependency > < groupId >org.jrebirth.af</ groupId > < artifactId >core</ artifactId > |
We will see in the next chapter how to configure your build to get all JRebirth dependencies.
Choose your destiny !
...and finish it ! (aka your wonderful application :)
All JRebirth libraries are pushed to several repositories and you must choose how you want to retrieve them.
They are pushed in this order :
JRebirth is not yet on Maven Central repository because the upload policy is too restrictive
(actually it requires to update your pom to be allowed to send your artifacts on a third-party
repository that will be synchronized with Central).
If you don't want to bother yourself with all these settings, you should just proxy OJO repository.
The first location to check is OJO because releases and snapshots are pushed automatically to it, so check it out first !
Let's have a macro look on all these alternatives.
JRebirth is firstly pushed to OJO ( oss.jfrog.org/simple/oss-release-local/org/jrebirth/ - Open Source Software repo provided by JFrog as an artifactory instance ).
You have 2 ways to plug your maven build to this server:
You can simply add this declaration into your
pom.xml
file to let Maven downloading all
JRebirth dependencies.
A lot of people don't recommend to put repositories declaration into pom files, because a Maven build
should only depend on Maven Central dependencies without any third library repositories.
JRebirth is not pushed yet on Maven Central repo, so this snippet does the trick to start to work.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | < repositories > < repository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >central</ id > < name >libs-release</ name > </ repository > < repository > < snapshots /> < id >snapshots</ id > < name >libs-snapshot</ name > </ repository > </ repositories > |
This way is so far better but has an important drawback, your build won't work if you don't use
the right profile.
So you should share this declaration somewhere in order to let your project 'buildable' by other
contributors.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | < profiles > < profile > < id >OJO</ id > < repositories > < repository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >central</ id > < name >libs-release</ name > </ repository > < repository > < snapshots /> < id >snapshots</ id > < name >libs-snapshot</ name > </ repository > </ repositories > < pluginRepositories > < pluginRepository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >central</ id > < name >plugins-release</ name > </ pluginRepository > < pluginRepository > < snapshots /> < id >snapshots</ id > < name >plugins-snapshot</ name > </ pluginRepository > </ pluginRepositories > </ profile > </ profiles > |
JRebirth artifacts are pushed to Bintray repository and then automatically synchronized to JCenter main Bintray repository. Only release version are managed.
It's possible to add only JRebirth Bintray repository to your project, but it's more convenient to add JCenter repository which aggregate all Bintray repositories.
JCenter is a new social Java repository hosted on Bintray website. It allows to broadcast thousand of libraries without the pitfall to update your pom.xml in order to push them on a proxy repository. JCenter is absolutely a fabulous alternative to Maven Central, it can also host other kinf of binaries.
If you want to use JCenter repository, you must add this into your Maven settings.xml. Pay attention that at this time JCenter contains only 'Release' artifacts, no 'snapshot' versions
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | < profiles > < profile > < id >JCenter</ id > < repositories > < repository > < id >central</ id > < snapshots > < enabled >false</ enabled > </ snapshots > < name >bintray</ name > </ repository > </ repositories > < pluginRepositories > < pluginRepository > < id >central</ id > < snapshots > < enabled >false</ enabled > </ snapshots > < name >bintray-plugins</ name > </ pluginRepository > </ pluginRepositories > </ profile > </ profiles > |
JRebirth has its own artifact repository ( repo.jrebirth.org ), but the server is not 7/7 24/24 ready due to energy savings. It could be offline when you need to recompile your application, so you shouldn't use it into your builds. It's mainly used as proxy for our developers, although it also hosts all JRebirth binaries.
You have 2 ways to plug your maven build to our server:
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 | < profiles > < profile > < id >JRebirth</ id > < repositories > < repository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >jrebirth-release</ id > < name >libs-release</ name > </ repository > < repository > < snapshots /> < id >jrebirth-snapshot</ id > < name >libs-snapshot</ name > </ repository > </ repositories > < pluginRepositories > < pluginRepository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >jrebirth-plugin-release</ id > < name >plugins-release</ name > </ pluginRepository > < pluginRepository > < snapshots /> < id >jrebirth-plugin-snapshot</ id > < name >plugins-snapshot</ name > </ pluginRepository > </ pluginRepositories > </ profile > </ profiles > |
It's also possible to add this declaration into the profile section of your user settings.xml or enterprise settings.xml
You can add both OJO, JCenter, and JRebirth Artifactory repositories, if you want to be up-to-date at any time.
If you just want to deal with stable release use only OJO (Release repo) and JCenter.
If sometimes you need to test a
snapshot version use OJO (Snapshot repo) and our Artifactory instance or ask us a custom build.
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 | < profiles > < profile > < id >JRebirth_All-In-One</ id > < activation > < activeByDefault >true</ activeByDefault > </ activation > < repositories > < repository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >central</ id > < name >libs-release</ name > </ repository > < repository > < snapshots /> < id >snapshots</ id > < name >libs-snapshot</ name > </ repository > < repository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >jcenter</ id > < name >bintray</ name > </ repository > < repository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >jrebirth-release</ id > < name >libs-release</ name > </ repository > < repository > < snapshots > < enabled >true</ enabled > </ snapshots > < id >jrebirth-snapshot</ id > < name >libs-snapshot</ name > </ repository > </ repositories > < pluginRepositories > < pluginRepository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >central</ id > < name >plugins-release</ name > </ pluginRepository > < pluginRepository > < snapshots /> < id >snapshots</ id > < name >plugins-snapshot</ name > </ pluginRepository > < pluginRepository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >jcenter-plugin</ id > < name >bintray-plugins</ name > </ pluginRepository > < pluginRepository > < snapshots > < enabled >false</ enabled > </ snapshots > < id >jrebirth-plugin-release</ id > < name >plugins-release</ name > </ pluginRepository > < pluginRepository > < snapshots > < enabled >true</ enabled > </ snapshots > < id >jrebirth-plugin-snapshot</ id > < name >plugins-snapshot</ name > </ pluginRepository > </ pluginRepositories > </ profile > </ profiles > |