Fork me on GitHub

How to use JRebirth Application Framework

This page will help you setting up your project to work with JRebirth.

Installation

Manual Download

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 directly from the home page or here:
apps.jrebirth.org

This distribution mode will be improved in the future for those you don't want to deal with an artifact repository.

Maven Way

Currently the easy way to get all 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 an optional library used to manage logs. The second one is the core library of JRebirth Application Framework. The last one is used to displayed basic JRebirth Preloader.

231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<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>core</artifactId>
        <version>8.0.3</version>
    </dependency>
 
    <dependency>
        <groupId>org.jrebirth.af</groupId>
        <artifactId>preloader</artifactId>
        <version>8.0.3</version>
    </dependency>
</dependencies>

We will see in the next chapter how to configure your build to get all JRebirth dependencies.

Maven Repositories

Choose your destiny !
...and finish brillantly 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 :

  1. OJO, Open Source Repository hosted by JFrog and powered by Artifactory (Snapshots and Releases) oss.jfrog.org
  2. Our public repository powered by Bintray (Only Releases, On demand Jenkins build)
  3. JCenter Bintray repository (Only Releases, Superset of Maven Central)
  4. Our internal repository powered by Artifactory (could be offline)
  5. Maven Central, all releases are synchronized with Central repository
  6. Any subset of all available repositories

JRebirth is published on Maven Central repository with the help of Bintray synchronization (without having to modify your pom files).
If you don't want to bother yourself with all these settings, you should just proxy JCenter repository.

When searching the latest versio of JRebirth, 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.

OJO Repo

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:

  1. Add a repositories section into the pom.xml of your project.
  2. Add a profile section into your settings.xml

OJO into Pom.xml

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>

OJO into Settings.xml

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>
                <url>http://oss.jfrog.org/artifactory/libs-release</url>
            </repository>
            <repository>
                <snapshots />
                <id>snapshots</id>
                <name>libs-snapshot</name>
                <url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>central</id>
                <name>plugins-release</name>
                <url>http://oss.jfrog.org/artifactory/plugins-release</url>
            </pluginRepository>
            <pluginRepository>
                <snapshots />
                <id>snapshots</id>
                <name>plugins-snapshot</name>
                <url>http://oss.jfrog.org/artifactory/plugins-snapshot</url>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>

Bintray

JRebirth artifacts are pushed to Bintray repository and then automatically synchronized to JCenter main Bintray repository. Only release version are managed. These repository can also host other kind of binaries.

It's possible to add only JRebirth Bintray repository to your project, but it's more convenient to add JCenter repository which aggregate all configured Bintray repositories .

JCenter

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, moreover since it has became a superset of Maven Central.

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>
                <url>http://jcenter.bintray.com</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>central</id>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <name>bintray-plugins</name>
                <url>http://jcenter.bintray.com</url>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>

JRebirth Repo

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 (like Applications) that are not pushed on OJO or Bintray.

You have 2 ways to plug your maven build to our server:

  1. Add a repositories section into the pom.xml of your project
  2. Add a profile section into your settings.xml

JRebirth repo into Settings.xml

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>
                <url>http://repo.jrebirth.org/libs-release</url>
            </repository>
            <repository>
                <snapshots />
                <id>jrebirth-snapshot</id>
                <name>libs-snapshot</name>
                <url>http://repo.jrebirth.org/libs-snapshot</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>jrebirth-plugin-release</id>
                <name>plugins-release</name>
                <url>http://repo.jrebirth.org/plugins-release</url>
            </pluginRepository>
            <pluginRepository>
                <snapshots />
                <id>jrebirth-plugin-snapshot</id>
                <name>plugins-snapshot</name>
                <url>http://repo.jrebirth.org/plugins-snapshot</url>
            </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

Maven Central

Maven Central is the default repository used by any Maven installation, so you don't have to configure something to be able to grab JRebirth artifacts.
JRebirth artifacts are synchronized with Central since 7.7.0 version.

Hybrid Configuration

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) or JCenter.
If sometimes you need to test a Snapshot version use OJO (Snapshot repo) and our Artifactory instance or ask us a custom build.

All-In-One Profile

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>
                <url>http://oss.jfrog.org/artifactory/libs-release</url>
            </repository>
            <repository>
                <snapshots />
                <id>snapshots</id>
                <name>libs-snapshot</name>
                <url>http://oss.jfrog.org/artifactory/libs-snapshot</url>
            </repository>
            <repository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>jcenter</id>
                <name>bintray</name>
                <url>http://jcenter.bintray.com</url>
            </repository>
            <repository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>jrebirth-release</id>
                <name>libs-release</name>
                <url>http://repo.jrebirth.org/libs-release</url>
            </repository>
            <repository>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
                <id>jrebirth-snapshot</id>
                <name>libs-snapshot</name>
                <url>http://repo.jrebirth.org/libs-snapshot</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>central</id>
                <name>plugins-release</name>
                <url>http://oss.jfrog.org/artifactory/plugins-release</url>
            </pluginRepository>
            <pluginRepository>
                <snapshots />
                <id>snapshots</id>
                <name>plugins-snapshot</name>
                <url>http://oss.jfrog.org/artifactory/plugins-snapshot</url>
            </pluginRepository>
            <pluginRepository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>jcenter-plugin</id>
                <name>bintray-plugins</name>
                <url>http://jcenter.bintray.com</url>
            </pluginRepository>
            <pluginRepository>
                <snapshots>
                    <enabled>false</enabled>
                </snapshots>
                <id>jrebirth-plugin-release</id>
                <name>plugins-release</name>
                <url>http://repo.jrebirth.org/plugins-release</url>
            </pluginRepository>
            <pluginRepository>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
                <id>jrebirth-plugin-snapshot</id>
                <name>plugins-snapshot</name>
                <url>http://repo.jrebirth.org/plugins-snapshot</url>
            </pluginRepository>
        </pluginRepositories>
    </profile>
</profiles>