Skip to content

Commit

Permalink
Merge pull request #119 from fmidev/fmi-avi-messageconverter-bom
Browse files Browse the repository at this point in the history
Apply fmi-avi-messageconverter-bom
  • Loading branch information
kasarit authored Sep 13, 2022
2 parents ad35d81 + f653de8 commit 484a7f8
Show file tree
Hide file tree
Showing 4 changed files with 130 additions and 35 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

### Changed

- ...
- Use fmi-avi-messageconverter-bom to manage library versions [#119]

### Deprecated

Expand Down Expand Up @@ -53,3 +53,5 @@ Initial release.
[#117]: https://github.com/fmidev/aviation-message-archiver/pull/117

[#118]: https://github.com/fmidev/aviation-message-archiver/pull/118

[#119]: https://github.com/fmidev/aviation-message-archiver/pull/119
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Generated - DO NOT EDIT! Instead, edit sources under src/doc directory. -->
<!--
After editing the source file or changing pom.xml, run at project root:
mvn resources:copy-resources@readme
mvn validate resources:copy-resources@readme
-->

# Aviation Message Archiver
Expand Down Expand Up @@ -160,7 +160,7 @@ using H2 (in-memory) or PostGIS database engine.
```

5. Check
some [actuator endpoints](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/actuator.html#actuator.endpoints)
some [actuator endpoints](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/actuator.html#actuator.endpoints)
to see that the application is running and healthy.
* info: <http://localhost:8080/actuator/info>
* health: <http://localhost:8080/actuator/health>
Expand Down Expand Up @@ -284,11 +284,11 @@ Application configuration properties are collected in a YAML file called [applic
file is a base configuration, acting as an example. You can use it as a base for your own application configuration
file. In your custom configuration file you need to add and/or override only changed or forced properties in your own
configuration file, because the provided base configuration file is loaded as well.
See [External Application Properties](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/features.html#features.external-config.files)
See [External Application Properties](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/features.html#features.external-config.files)
in Spring Boot reference documentation for instructions on how to apply your custom configuration file.

Runtime behavior is controlled
using [Spring profiles](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/features.html#features.profiles)
using [Spring profiles](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/features.html#features.profiles)
which are activated by the application launch command. Profiles declared in the provided configuration are described in
the [application.yml] file.

Expand Down Expand Up @@ -769,17 +769,17 @@ See the provided [application.yml] for an example.
### Spring Boot configuration properties

Many of the properties in [application.yml] configuration file control the behavior of Spring Boot features. Look at
the [Spring Boot Reference Documentation](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/)
the [Spring Boot Reference Documentation](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/)
for more information on these. Some of related sections are:

* [Profiles](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/features.html#features.profiles)
* [Logging](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/features.html#features.logging)
* [Data](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/data.html)
* [Data Properties](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/application-properties.html#appendix.application-properties.data)
* [Data Migration Properties](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/application-properties.html#appendix.application-properties.data-migration)
* [Graceful Shutdown](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/web.html#web.graceful-shutdown)
* [Timeout property](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/application-properties.html#application-properties.core.spring.lifecycle.timeout-per-shutdown-phase)
* [Actuator Endpoints](https://docs.spring.io/spring-boot/docs/2.6.3/reference/html/actuator.html#actuator.endpoints)
* [Profiles](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/features.html#features.profiles)
* [Logging](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/features.html#features.logging)
* [Data](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/data.html)
* [Data Properties](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/application-properties.html#appendix.application-properties.data)
* [Data Migration Properties](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/application-properties.html#appendix.application-properties.data-migration)
* [Graceful Shutdown](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/web.html#web.graceful-shutdown)
* [Timeout property](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/application-properties.html#application-properties.core.spring.lifecycle.timeout-per-shutdown-phase)
* [Actuator Endpoints](https://docs.spring.io/spring-boot/docs/2.7.2/reference/html/actuator.html#actuator.endpoints)

## License

Expand Down
117 changes: 105 additions & 12 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,10 @@
<spring-boot.version>2.7.2</spring-boot.version>
<auto-value.version>1.9</auto-value.version>
<guava.version>31.1-jre</guava.version>
<fmi-avi-messageconverter.version>6.1.0</fmi-avi-messageconverter.version>
<fmi-avi-messageconverter-tac.version>5.1.0</fmi-avi-messageconverter-tac.version>
<fmi-avi-messageconverter-iwxxm.version>4.1.0</fmi-avi-messageconverter-iwxxm.version>
<avidb-schema.version>1.0.0</avidb-schema.version>

<avidb-schema.branch-rawname>avidb-schema-${avidb-schema.version}</avidb-schema.branch-rawname>

<spring-boot.repackage.classifier>bundle</spring-boot.repackage.classifier>

<doclint>all,-missing</doclint>
Expand All @@ -83,6 +82,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>fi.fmi.avi.converter</groupId>
<artifactId>fmi-avi-messageconverter-bom</artifactId>
<version>1.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>

Expand Down Expand Up @@ -142,17 +148,14 @@
<dependency>
<groupId>fi.fmi.avi.converter</groupId>
<artifactId>fmi-avi-messageconverter</artifactId>
<version>${fmi-avi-messageconverter.version}</version>
</dependency>
<dependency>
<groupId>fi.fmi.avi.converter</groupId>
<artifactId>fmi-avi-messageconverter-tac</artifactId>
<version>${fmi-avi-messageconverter-tac.version}</version>
</dependency>
<dependency>
<groupId>fi.fmi.avi.converter</groupId>
<artifactId>fmi-avi-messageconverter-iwxxm</artifactId>
<version>${fmi-avi-messageconverter-iwxxm.version}</version>
</dependency>
<dependency>
<groupId>fi.fmi.avi.avidb</groupId>
Expand Down Expand Up @@ -249,6 +252,100 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>dependency-properties</id>
<phase>validate</phase>
<goals>
<goal>properties</goal>
</goals>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>build-helper-regex-artifact-branch-rawnames</id>
<phase>validate</phase>
<goals>
<goal>regex-properties</goal>
</goals>
<configuration>
<regexPropertySettings>
<regexPropertySetting>
<name>fmi-avi-messageconverter.branch-rawname</name>
<value>${fi.fmi.avi.converter:fmi-avi-messageconverter:jar}</value>
<regex>^.*/(fmi-avi-messageconverter-[0-9\.]+(-SNAPSHOT)?)\.jar.*$</regex>
<replacement>$1</replacement>
<failIfNoMatch>true</failIfNoMatch>
</regexPropertySetting>
<regexPropertySetting>
<name>fmi-avi-messageconverter-iwxxm.branch-rawname</name>
<value>${fi.fmi.avi.converter:fmi-avi-messageconverter-iwxxm:jar}</value>
<regex>^.*/(fmi-avi-messageconverter-iwxxm-[0-9\.]+(-SNAPSHOT)?)\.jar.*$</regex>
<replacement>$1</replacement>
<failIfNoMatch>true</failIfNoMatch>
</regexPropertySetting>
<regexPropertySetting>
<name>fmi-avi-messageconverter-tac.branch-rawname</name>
<value>${fi.fmi.avi.converter:fmi-avi-messageconverter-tac:jar}</value>
<regex>^.*/(fmi-avi-messageconverter-tac-[0-9\.]+(-SNAPSHOT)?)\.jar.*$</regex>
<replacement>$1</replacement>
<failIfNoMatch>true</failIfNoMatch>
</regexPropertySetting>
</regexPropertySettings>
</configuration>
</execution>
<execution>
<id>build-helper-regex-artifact-branch-names</id>
<phase>validate</phase>
<goals>
<goal>regex-properties</goal>
</goals>
<configuration>
<regexPropertySettings>
<regexPropertySetting>
<name>fmi-avi-messageconverter.branch-name</name>
<value>${fmi-avi-messageconverter.branch-rawname}</value>
<regex>^.*-SNAPSHOT$</regex>
<replacement>main</replacement>
<failIfNoMatch>false</failIfNoMatch>
</regexPropertySetting>
<regexPropertySetting>
<name>fmi-avi-messageconverter-iwxxm.branch-name</name>
<value>${fmi-avi-messageconverter-iwxxm.branch-rawname}</value>
<regex>^.*-SNAPSHOT$</regex>
<replacement>main</replacement>
<failIfNoMatch>false</failIfNoMatch>
</regexPropertySetting>
<regexPropertySetting>
<name>fmi-avi-messageconverter-tac.branch-name</name>
<value>${fmi-avi-messageconverter-tac.branch-rawname}</value>
<regex>^.*-SNAPSHOT$</regex>
<replacement>main</replacement>
<failIfNoMatch>false</failIfNoMatch>
</regexPropertySetting>
<regexPropertySetting>
<name>avidb-schema.branch-name</name>
<value>${avidb-schema.branch-rawname}</value>
<regex>^.*-SNAPSHOT$</regex>
<replacement>main</replacement>
<failIfNoMatch>false</failIfNoMatch>
</regexPropertySetting>
</regexPropertySettings>
</configuration>
</execution>
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
Expand All @@ -258,8 +355,8 @@
Generate documentation and include it in SCM. Requires plugin version >=3.
https://stackoverflow.com/a/68687685
-->
<preparationGoals>resources:copy-resources@readme scm:add -Dincludes=README.md</preparationGoals>
<completionGoals>resources:copy-resources@readme scm:add -Dincludes=README.md</completionGoals>
<preparationGoals>validate resources:copy-resources@readme scm:add -Dincludes=README.md</preparationGoals>
<completionGoals>validate resources:copy-resources@readme scm:add -Dincludes=README.md</completionGoals>
</configuration>
</plugin>

Expand All @@ -280,10 +377,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

Expand Down
18 changes: 9 additions & 9 deletions src/doc/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- ${doc.msg.generated} -->
<!--
After editing the source file or changing pom.xml, run at project root:
mvn resources:copy-resources@readme
mvn validate resources:copy-resources@readme
-->

# Aviation Message Archiver
Expand Down Expand Up @@ -85,11 +85,11 @@ Supported message types and formats are listed in the table below. Generally, th

* TAC format message types that are supported
by [fmi-avi-messageconverter-tac](https://github.com/fmidev/fmi-avi-messageconverter-tac)
library [`TAC_TO_GENERIC_AVIATION_WEATHER_MESSAGE_POJO`](https://github.com/fmidev/fmi-avi-messageconverter-tac/blob/fmi-avi-messageconverter-tac-${fmi-avi-messageconverter-tac.version}/src/main/java/fi/fmi/avi/converter/tac/conf/TACConverter.java)
library [`TAC_TO_GENERIC_AVIATION_WEATHER_MESSAGE_POJO`](https://github.com/fmidev/fmi-avi-messageconverter-tac/blob/${fmi-avi-messageconverter-tac.branch-name}/src/main/java/fi/fmi/avi/converter/tac/conf/TACConverter.java)
conversion and
* IWXXM format message types that are supported
by [fmi-avi-messageconverter-iwxxm](https://github.com/fmidev/fmi-avi-messageconverter-iwxxm)
library [`IWXXM_STRING_TO_GENERIC_AVIATION_WEATHER_MESSAGE_POJO`](https://github.com/fmidev/fmi-avi-messageconverter-iwxxm/blob/fmi-avi-messageconverter-iwxxm-${fmi-avi-messageconverter-iwxxm.version}/src/main/java/fi/fmi/avi/converter/iwxxm/conf/IWXXMConverter.java)
library [`IWXXM_STRING_TO_GENERIC_AVIATION_WEATHER_MESSAGE_POJO`](https://github.com/fmidev/fmi-avi-messageconverter-iwxxm/blob/${fmi-avi-messageconverter-iwxxm.branch-name}/src/main/java/fi/fmi/avi/converter/iwxxm/conf/IWXXMConverter.java)
conversion.

| Message type | TAC | IWXXM 2.1 | IWXXM 3.0 |
Expand Down Expand Up @@ -138,11 +138,11 @@ using H2 (in-memory) or PostGIS database engine.
3. Prepare an SQL script to populate the `avidb_stations` table. This is optional for testing the application, but all
messages will be rejected without a matching location indicator in the `icao` column of `avidb_stations` table.
* **H2:**
See [schema-h2.sql](https://github.com/fmidev/avidb-schema/blob/avidb-schema-${avidb-schema.version}/h2/schema-h2.sql)
See [schema-h2.sql](https://github.com/fmidev/avidb-schema/blob/${avidb-schema.branch-name}/h2/schema-h2.sql)
for the schema, and [h2-data/example/avidb_stations.sql](src/main/resources/h2-data/example/avidb_stations.sql)
for an insertion template.
* **PostGIS:**
See [schema-postgresql.sql](https://github.com/fmidev/avidb-schema/blob/avidb-schema-${avidb-schema.version}/postgresql/schema-postgresql.sql)
See [schema-postgresql.sql](https://github.com/fmidev/avidb-schema/blob/${avidb-schema.branch-name}/postgresql/schema-postgresql.sql)
for the schema,
and [postgresql-data/example/avidb_stations.sql](src/main/resources/postgresql-data/example/avidb_stations.sql)
for an insertion template.
Expand Down Expand Up @@ -486,7 +486,7 @@ Populate properties parsed from message content.
order of preference for reading the station ICAO code.
Available message types are specified in the map property `production-line.type-ids`. Available location indicator
types are specified
in [GenericAviationWeatherMessage.LocationIndicatorType](https://github.com/fmidev/fmi-avi-messageconverter/blob/fmi-avi-messageconverter-${fmi-avi-messageconverter.version}/src/main/java/fi/fmi/avi/model/GenericAviationWeatherMessage.java)
in [GenericAviationWeatherMessage.LocationIndicatorType](https://github.com/fmidev/fmi-avi-messageconverter/blob/${fmi-avi-messageconverter.branch-name}/src/main/java/fi/fmi/avi/model/GenericAviationWeatherMessage.java)
enum.
Example:
```yaml
Expand All @@ -508,7 +508,7 @@ Populate properties parsed from message content.
* `default-location-indicator-types` (optional) - Default list of location indicator types in order of preference
for reading the station ICAO code.
Only used when the message type-specific list is not configured. Available location indicator types are specified
in [GenericAviationWeatherMessage.LocationIndicatorType](https://github.com/fmidev/fmi-avi-messageconverter/blob/fmi-avi-messageconverter-${fmi-avi-messageconverter.version}/src/main/java/fi/fmi/avi/model/GenericAviationWeatherMessage.java)
in [GenericAviationWeatherMessage.LocationIndicatorType](https://github.com/fmidev/fmi-avi-messageconverter/blob/${fmi-avi-messageconverter.branch-name}/src/main/java/fi/fmi/avi/model/GenericAviationWeatherMessage.java)
enum.
Example:
```yaml
Expand Down Expand Up @@ -758,10 +758,10 @@ The following mappings must exist under `production-line` application configurat
* `route-ids`: Map route name, preferably same as database column `avidb_message_routes.name`, to database
column `avidb_message_routes.route_id`.
* `format-ids`:
Map [`GenericAviationWeatherMessage.Format.name()`](https://github.com/fmidev/fmi-avi-messageconverter/blob/fmi-avi-messageconverter-${fmi-avi-messageconverter.version}/src/main/java/fi/fmi/avi/model/GenericAviationWeatherMessage.java)
Map [`GenericAviationWeatherMessage.Format.name()`](https://github.com/fmidev/fmi-avi-messageconverter/blob/${fmi-avi-messageconverter.branch-name}/src/main/java/fi/fmi/avi/model/GenericAviationWeatherMessage.java)
to database column `avidb_message_format.format_id`.
* `type-ids`:
Map [`MessageType.name()`](https://github.com/fmidev/fmi-avi-messageconverter/blob/fmi-avi-messageconverter-${fmi-avi-messageconverter.version}/src/main/java/fi/fmi/avi/model/MessageType.java)
Map [`MessageType.name()`](https://github.com/fmidev/fmi-avi-messageconverter/blob/${fmi-avi-messageconverter.branch-name}/src/main/java/fi/fmi/avi/model/MessageType.java)
to database column `avidb_message_types.type_id`.

See the provided [application.yml] for an example.
Expand Down

0 comments on commit 484a7f8

Please sign in to comment.