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

Maven build #6

Merged
merged 15 commits into from
Sep 6, 2021
Merged

Maven build #6

merged 15 commits into from
Sep 6, 2021

Conversation

h-man2
Copy link
Contributor

@h-man2 h-man2 commented Sep 6, 2021

This PR switches the build process entirely to Maven as grounding work for an continuous integration prcoess at GitHub.

Major changes

To be able to switch to Maven, some major changes to the structure of USE needed to be done.

Maven modules

USE was split up into two modules:

  1. use-core
    This module can be used as a library by other tools. It has no dependency to graphical artifacts or to the shell.

  2. use-gui
    This module contains all parts for user interaction, i.e., the Shell and the USE GUI. As a consequence, the existing integration tests are also placed here, since they use the shell as the their interface.

This is not same separation as bofore, where to jar-archives were build. Beforehand, the use.jar archive, included the shell, that is now moved to the use-gui part. From an architectural point of view this is more strict.

Unit-Tests

The unit-tests were moved to the default locations recommendet by Maven: src/test/.
The input files for the USECompilerTest were moved to the resource folder.
Tests touching GUI elements were moved to the use-gui module.

Integration tests

The integration tests (sometimes called regression tests) that were located in ./test are now executed by using a JUnit TestFactory that uses the same input files as before to generate the tests. See ShellIT.java for details.
The execution itself is done during an integration testphase in maven.

This removes some dependencies that required Linux to execute (even on Windows operation systems) the tests.

Open issues

There are some things to do, to complete the switch to Maven:

  • Build a release archive
  • Generate JavaDoc-documentation
  • Restructure the rest of the project-folders

h-man2 added 15 commits July 29, 2021 16:48
- Moved core source to core module
- Added POM for core module
- Moved examples to core resources
- Moved grammar files to core resources
- Added GUI module and POM
- Moved GUI source and tests
- Moved tests
- Moved runtime to GUI (is not really independent)
- Fixed "bug" in USE grammar (values is a reserved word)
- Changed some libraries to be compatible with maven and JDK 15
- Moved USE-Compiler tests to resource folder
- Moved model test helper to source, because it is used by core and GUI (not really sound, I know)
- Improved error handling in USECompilerTest
- Removed libraries
- POM file for USE
- Ignore target directories
- Added coffeedispenser example
- Move generated parser and lexer to folder structure for package (IntelliJ now finds them)
- gitignore file for IntelliJ IDE
- Moved etc to ressource folder
- Moved Images to resource folder
- Changed access to images and properties
- Set UTF-8 as source encoding
- First version of integration tests from input files done with JUnit instead of using shell commands.
- Uses the TestFactory feature of JUnit 5.
- Integration tests are read from files placed in "it/resources/shell"
- Expected and actual output are compared via a diff library
- Second version of integration tests from input files done with JUnit instead of using shell commands.
- Now for each test a new USE instance is started to simulate the previous behavior of shell based tests
- Failing tests now writer an .expected and .actual file to ease diffing
- Aligned to styleguide
- Refactored and documented ShellIT
@h-man2 h-man2 self-assigned this Sep 6, 2021
@h-man2 h-man2 added the refactoring Internal improvements label Sep 6, 2021
@h-man2 h-man2 merged commit 132ab9b into master Sep 6, 2021
@h-man2 h-man2 deleted the maven-build branch September 6, 2021 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Internal improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant