. . .

Update your Service to the current version


General Information

The brewer-maven-plugin provides you with the ability to retrieve the newest updates for your generated services.
First, you can download the auto-generated changes with the brewer:download goal. Then, use the brewer:updateVersion goal to apply service changes that are not included within the auto-generated files. These changes often affect files that already contain your custom code or configuration such as e.g. application.yml or pom.xml.

Update a generated service

All in-depth details about the brewer-maven-plugin, such as its goals and properties, can be found in its documentation. If you want to update your generated service to the latest version, you need to follow these steps:

1. Get the latest auto-generated class files

First, use the brewer-maven-plugin to update the generated class files:

mvn brewer:download -DbrewerHost=http://<brewerHost>:<brewerPort> -Dmerge=true -DoverwriteServicesImpl=false -DoverwriteAppConfigDefinition=false -DoverwriteTestFiles=false -DcustomerName=<name> -DcustomerPassword=<secret>

If your service artifact is already stored within the hosting service (Innkeeper), we highly recommended merging it with the newly generated parts by applying the property -Dmerge=true. Additionally, you can prevent the download process from overwriting files that contain your ApiServiceImplementations, your AppConfigDefinitions or your TestImplementations ( -DoverwriteServicesImpl=false -DoverwriteAppConfigDefinition=false -DoverwriteTestFiles=false ).

Now all of your auto-generated content will be up to date.

2. Migrate your generated service to the new version

To apply the changes that affect your customized service files, execute the following command:

mvn brewer:updateVersion -DtoVersion=21.03

This is the minimum amount of info you need to provide to the command. Optionally, you can also specify the following parameters to improve your migration process (details can be found in the brewer-maven-plugin documentation):

  • -DtoVersion=21.03: Updates your service from its current state all the way up to the ApiOmat version 21.03

  • -DfromVersion=20.11: Specify the current version of your service, which will skip unnecessary migration steps to reduce process time

  • -DwithChangeLog: Will write a serviceupdate-changelog.md file that contains all the migration steps that were completed and printed out to your terminal

All the migration steps will only be executed if they weren't already done before. The changeLog in terminal and in the optional serviceupdate-changelog.md file also contains skipped migration steps. A full list of all updates can be found in the next sections.

ApiOmat 21.03.0

The following changes will be executed when updating to 21.03.0:

Generated Services

File

Update

pom.xml

Updated version of "spring-base" to 3.0.0


Updated property "feign.form.version" to 3.8.0


Updated format of Spring Boot Maven plugin


Renamed dependency "spring-cloud-starter-zipkin" to "spring-cloud-sleuth-zipkin"


Added dependency "apiomat-consul-starter"


Added vintage engine for JUnit 4


Added pom property "apiomat.service.version"

application.yml

Disabled "spring.jmx.enabled=false", because it's already disabled by default


Added application owner request configuration and activated auth service (Bouncer)


Added discovery configuration for used services


Updated CORS example configuration


Updated default Feign client configuration


Added apiomat.service.version property (including pom property placeholder)

<YourService>ConfigDefinition.java

Updated ConfigDefinition for application owner requests

Generated Service Libraries

File

Update

pom.xml

Added dependency management


Removed pinned dependency versions


Updated version of dependency "swagger-annotations" to 1.5.20