Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: store etc-files in mosaic-starter and copy them to bundle #423

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

kschrab
Copy link
Contributor

@kschrab kschrab commented Oct 9, 2024

Description

Default etc-files are now stored in mosaic-starter/etc rather than hidden in bundle/src/assembly/resources/etc. To include them in the bundle, the maven config has been adjusted accordingly. This change has the main advantage, that changes in the etc-files do not require a call of mvn validate anymore to be effective when starting from the IDE.

Issue(s) related to this PR

  • Resolves internal issue 912

Affected parts of the online documentation

Changes in the documentation required?

Our internal developer-documentation must be changed, as well as website documentation.

Definition of Done

Prerequisites

  • You have read CONTRIBUTING.md carefully.
  • You have signed the Contributor License Agreement.
  • Your GitHub user id is linked with your Eclipse Account.

Required

  • The title of this merge request follows the scheme type(scope): description (in the style of Conventional Commits)
  • You have assigned a suitable label to this pull request (e.g., enhancement, or bugfix)
  • origin/main has been merged into your Fork.
  • Coding guidelines have been followed (see CONTRIBUTING.md).
  • All checks on GitHub pass.
  • All tests on Jenkins pass.

Requested (can be enforced by maintainers)

  • New functionality is covered by unit tests or integration tests. Code coverage must not decrease.
  • If a bug has been fixed, a new unit test has been written (beforehand) to prove misbehavior
  • There are no new SpotBugs warnings.

Special notes to reviewer

@kschrab kschrab added the enhancement New feature or request label Oct 9, 2024
@kschrab kschrab self-assigned this Oct 9, 2024
@hoelger
Copy link
Contributor

hoelger commented Oct 10, 2024

Both IDE and bundled version tested, and they work fine 👍

I'm still a bit unsure, where the execution management will look for a file, that has no absolute path. For MosaicStarter it can be directly in it's own project folder works fine, and also in ./target/classes, right? Why did we put the tools/web folder directly into mosaic-starter (+ gitignore it) instead of putting it into target/classes?

@kschrab
Copy link
Contributor Author

kschrab commented Oct 10, 2024

Why did we put the tools/web folder directly into mosaic-starter (+ gitignore it) instead of putting it into target/classes?

When starting MOSAIC with -v it just starts a browser and gives it the relative path to tools/web/visualizer.html to open it. This path is always relative to the working directory, which is mosaic-starter (or the place where mosaic.sh is called from). That's why it's not possible to put the files to target/classes/tools/web.

The runtime.json can also only be placed in both places, since the starter is implemented in a way that it looks in both locations:
It first checks if etc/runtime.json can be found relatively to its execution directory, and if not found it searches for the path via getResourceAsStream(), which looks inside its jar or into target/classes.

bundle/pom.xml Outdated Show resolved Hide resolved
rti/mosaic-starter/pom.xml Show resolved Hide resolved
@kschrab kschrab merged commit 096fdd3 into main Oct 15, 2024
5 checks passed
@kschrab kschrab deleted the 912-maven-etc-files-handling branch October 15, 2024 11:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants