← Back to team overview

dhis2-devs-core team mailing list archive

new app build cycle

 

Hi there,

we have created a new build cycle for apps. So far it works only for the
settings app.


*Build cycle*

1. Apps are developed in github repos.

2. Apps are built with npm.

3. Apps are deployed to our Sonatype <https://oss.sonatype.org/> maven
snapshot repository as jar files.

4. Apps are defined as maven dependencies in the core code in dhis-web-apps
module (on launchpad).

5. In dhis-web-apps in core, maven unpacks the jar file and copies it to
target directory, where it becomes part of the war file.



*What you need to do (if you are a front end dev)*

Assuming npm 4+ is installed.

1. Install gnupg, on ubuntu: $ sudo apt-get install gnupg

2. Generate a key pair with: $ gpg --gen-key

    (Go with the defaults, this is for artefact signing)

3. Place a "settings.xml" file here: ~/.m2/settings.xml . Found here
<https://github.com/dhis2/dhis2-server-admin/blob/master/maven/settings.xml>
.

    (Private repo but not very secure, I know)

3. Pull the latest settings <https://github.com/dhis2/settings-app> app
from github: $ git clone git@xxxxxxxxxx:dhis2/settings-app.git

4. Install the app it with: $ npm install

5. Build the app with: $ npm run build

    (This will create a ./build directory with all app resources)

6. Deploy to maven snapshot repo with: $ mvn deploy

    (This is the only step that must be repeated).

7. Install dhis 2 core code / dhis-web-apps at launchpad with: $ mvn clean
install

    (See in dhis-web-apps/pom.xml for details, new app will be downloaded,
unpacked and included in war file).



Will put this in the developer docs once its decided where the developer
docs should reside. These are mainly one-time steps, only $ mvn deploy is
required to deploy to the repo.

The benefit of this is that apps can now be developed independently and
anywhere and then be pulled into main core / server build through the maven
repo.


Lars







-- 
Lars Helge Øverland
Lead developer, DHIS 2
University of Oslo
Skype: larshelgeoverland
http://www.dhis2.org <https://www.dhis2.org>

Follow ups