Skip to content

Latest commit

 

History

History
181 lines (118 loc) · 3.97 KB

DEV.adoc

File metadata and controls

181 lines (118 loc) · 3.97 KB

Build

./mvnw clean install -DskipTests

Test

Execute Unit and Integration tests

./mvnw test

Test Ogham against different Java and Spring Boot versions

1) First you need to start spring-initializr:

cd spring-initializr
./mvnw spring-boot:run

This project is just the spring-iniailizr provided by spring on http://start.spring.io The aim is to generate working Spring Boot projects based on real spring-initializr. The only difference is the metadata configuration defined in application.yml.

2) Launch ogham-test-classpath to generate a list of projects:

cd ogham-test-classpath
./mvnw spring-boot:run \
	-Dspring-boot.run.arguments="<output directory>" \
	-Dspring-boot.run.jvmArguments="-Dogham-version=<ogham version to test>"

This project generates several projects in <output directory>. Each project uses a different Spring Boot version and includes or not some Spring Boot features.

3) Run tests for a particular Java version:

cd <output directory>
/mvnw test -T 2.5C -f "<java version>/pom.xml"

Change project version

Changing version is done in three steps:

1) Use standard maven plugin to update version numbers for all pom.xml files:

./mvnw versions:set -DnewVersion=<new version> -DprocessAllModules

2) Update all other pom.xml files that have dependencies to Ogham (samples for example):

./mvnw com.google.code.maven-replacer-plugin:replacer:replace -N

3) Test that everything works fine and finish version update:

./mvnw versions:commit

Release a version

Test the release

Important

maven-release-plugin has an issue to correctly handle properties (see https://issues.apache.org/jira/browse/MRELEASE-920). You need to apply the patch and build locally the maven-release-plugin.

./mvnw release:prepare -DdryRun=true

Check that everything works fine and then clean everything:

./mvnw release:clean

Perform the release

./mvnw release:prepare release:perform \
	-Dsite.staging.dir=<path to ogham-site> \
	-DreleaseVersion=<release version> \
	-DdevelopmentVersion=<next dev version> \
	-Dtag=v<release version>

Documentation

Update site

Generate Asciidoctor documentation and site

First you need to clone Ogham project a second time and to checkout branch gh-pages:

git clone [email protected]:groupe-sii/ogham.git ogham-site
git checkout gh-pages

The new folder ogham-site in the example will be the folder where generated documentation and site will placed.

./mvnw clean site post-site site:stage \
	-Dsite.staging.dir=<path to ogham-site> \
	-Ddoc.ogham.version=<ogham version> \
	-Dgit.branch=v<ogham version>

This generates the documentation based on Asciidoctor and also the site with reports.

Update versions

As you have generated the documentation for a new version, you need to register this version. A Python script is used for that:

py .tools/site/generate-site-index-and-versions.py <path to ogham-site>

Update site on Github

Once generated, just push gh-pages branch on Github

Update README and Wiki for Github

cd documentation-generator
./mvnw spring-boot:run \
	-Dspring-boot.run.arguments="--generator.doc.source.root-directory=<ogham root directory> --generator.github.latestReleaseBranch=v<release version> --generator.ogham.latestReleaseVersion=<release version> --generator.github.futureDevBranch=<development branch: master> --generator.ogham.futureDevVersion=<future release version with -SNAPSHOT> --readme --wiki"

Once generated, just push on Github

Generate Asciidoctor Documentation only

./mvnw post-site -Dmaven.site.skip -N

The documentation is generated in target folder