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, 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.

Maven Way

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, and the second one is the optional library used to manage logs.

159
160
161
162
163
164
165
166
167
168
169
170
<dependencies>
    <dependency>
        <groupId>org.jrebirth</groupId>
        <artifactId>core</artifactId>
        <version>0.7.5-SNAPSHOT</version>
    </dependency>
 
    <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>1.0.6</version>
    </dependency>

Releases are pushed to several repositories in this order :

  1. Our internal repository powered by Artifactory (All Jenkins build)
  2. Our public repository powered by Bintray (On demand Jenkins build)
  3. JCenter Bintray repository (Only Releases)

https://bintray.com/pkg/show/general/jrebirth/JRebirth/JRebirth and then synchronized to JCenter main Bintray repository.

So you have some alternatives to retrieve JRebirth artifacts from these repositories.

Use 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.

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

1
2
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
<?xml version="1.0" encoding="UTF-8" ?>
    <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>
    <activeProfiles>
        <activeProfile>JCenter</activeProfile>
    </activeProfiles>
</settings>

JRebirth artifactory instance

JRebirth has its own artifact repository ( repo.jrebirth.org ), but the server is not 7/7 24/24 ready. It could be offline when you need to recompile your application. Its main advantage is to manage snapshot versions, so useful when you want to test a new feature or a bug fix.

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 (like for JCenter configuration)

Into Pom.xml

3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
<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>
            <enabled>true</enabled>
        </snapshots>
        <id>jrebirth-snapshot</id>
        <name>libs-snapshot</name>
        <url>http://repo.jrebirth.org/libs-snapshot</url>
    </repository>
</repositories>

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
40
41
42
43
<profiles>
    <profile>
        <id>JRebirth_Artifactory</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>
                    <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>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>

Add this declaration into your pom.xml

It's also possible to add this declaration into the profile section of your user settings.xml or enterprise settings.xml

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)

Hybrid Configuration

You can add both JCenter, JRebirth Bintray 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 JCenter, but if sometims you need to test a snapshot version use our artifactory instance or ask us to synchronize Artifactory with Bintray.

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
<profiles>
    <profile>
        <id>JRebirth_All-In-One</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
            <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>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>