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

Code Infrastructure: create a Maven Parent POM and integrate existing #8394

Closed
poikilotherm opened this issue Feb 3, 2022 · 1 comment · Fixed by #8395
Closed

Code Infrastructure: create a Maven Parent POM and integrate existing #8394

poikilotherm opened this issue Feb 3, 2022 · 1 comment · Fixed by #8395
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Component: Containers Anything related to cloudy Dataverse, shipped in containers. Feature: Developer Guide
Milestone

Comments

@poikilotherm
Copy link
Contributor

poikilotherm commented Feb 3, 2022

This is influenced by #7662 / #8320 , #8383, #6505 / #6986, #8250, #2331 and related.

Tagging @qqmyers @landreev @scolapasta @pdurbin here.
EDIT: @pdurbin suggested this is related to #2331 and @donsizemore suggested this might be related to activities by @akio-sone

Current status

  • Currently, there is a standalone pom.xml to compile, test and package the Dataverse WAR.
  • The ZIP downloader JAR also has a standalone pom.xml in subdir scripts/zipdownload

Envisioned future

  • Create a parent POM in a subdirectory of project root (e.g. conf/pom.xml or a new folder structure modules/dataverse-parent/pom.xml or similar).
  • Inherit in edu.harvard.iq.dataverse POM from parent
  • Move relevant sections and parts from <properties>, <pluginRepositories>, <repositories>, <dependencyManagement> and maybe some of <build> into the parent POM
  • Make ZIP downloader POM inherit from parent

Possibilities

  • Enable consistent dependency management for main project and ZIP downloader
  • Enable central configuration of Maven metadata, repositories etc (also needed to upload to Maven Central one day)
  • Enable dependencies between our modules
  • Enable starting to transform the main codebase from a monolith to a modulith, enabling reuse of code parts like storage access (looking at you, ZIP downloader)
  • Decouple main development POM maintenance from other activities like Maven based containers (but still be able to depend on them!)
  • Future replacement of scripts/installer/Makefile with a Maven submodule dataverse-release doing the packaging? Maybe also doing the actual release process (JReleaser FTW!)?
  • Future release dataverse-parent on its own, enabling other projects to inherit.

Hints

  • @pdurbin suggested to give an example of a not-to-complex project using Maven modules. Here is a very similar one to Dataverse 😋 : https://github.com/DSpace/DSpace (Although they aren't having a parent in a subdirectory - this is sth we need to be backward compatible for at least some time)
  • The current pom.xml will not be moved, just transformed. No Git history "lost"/"invisible". Any developer currently acclimated with using mvn <target> to interact with the main codebase on project basedir will not need to change habits. Obviously shared properties etc would be managed within the parent.
  • The parent POM is not only usable for inheritance, but also for aggregation. Accessing the subdirectory and running a Maven target will include all submodules in one go, respecting dependencies.
  • For easier insights into my suggestion, I created a working pull request: 8394 maven mods #8395 Feel free to add any suggestions etc.
@poikilotherm poikilotherm added Component: Code Infrastructure formerly "Feature: Code Infrastructure" Component: Containers Anything related to cloudy Dataverse, shipped in containers. Feature: Developer Guide labels Feb 3, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 3, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 3, 2022
…QSS#8394

This includes moving/inheriting some project properties from the parent.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 3, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 3, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 3, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 3, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 3, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 3, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
…QSS#8394

This includes moving/inheriting some project properties from the parent.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 7, 2022
IQSS#8394

The Spring Boot method to create an executable fat/uber JAR is offering a much better
experience than what Maven Assembly does. It provides a custom bootloader to load
JARs from the JAR, which means less potential for conflicts etc.

It also offers options to be integrated in other workflows like container images etc.
The package is now about 8.2 MB in size, which is negligible compared to 8.0 MB via
the Assembly plugin.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
…QSS#8394

This includes moving/inheriting some project properties from the parent.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
IQSS#8394

The Spring Boot method to create an executable fat/uber JAR is offering a much better
experience than what Maven Assembly does. It provides a custom bootloader to load
JARs from the JAR, which means less potential for conflicts etc.

It also offers options to be integrated in other workflows like container images etc.
The package is now about 8.2 MB in size, which is negligible compared to 8.0 MB via
the Assembly plugin.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
landreev added a commit to poikilotherm/dataverse that referenced this issue Feb 9, 2022
(to reflect the changed name of the jar file) IQSS#8394
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 10, 2022
This commit adds a lot of new terms used to understand how parent POMs
work. It also introduces many graphs to visualize the described.

The parent POM used within the Dataverse codebase is explained: what it
does, how it's connected to other parts etc.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 10, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 10, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 11, 2022
As the version element has been from the WAR POM to the Parent POM and
been made flexible via the 'revision' property, the release guide needed
to be adapter accordingly.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 11, 2022
pdurbin added a commit that referenced this issue Feb 14, 2022
pdurbin added a commit that referenced this issue Feb 15, 2022
pdurbin added a commit that referenced this issue Feb 15, 2022
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Feb 15, 2022
pdurbin added a commit to poikilotherm/dataverse that referenced this issue Mar 4, 2022
…en plugin IQSS#8394"

This reverts commit 424400b.

We believe this is causing our Jenkins job to fail. It's showing this:

[JaCoCo plugin] Overall coverage: class: 0.0, method: 0.0, line: 0.0, branch: 0.0, instruction: 0.0, complexity: 0.0

When we expect something more like this:

[JaCoCo plugin] Overall coverage: class: 73.52321, method: 46.495075, line: 41.614933, branch: 33.08663, instruction: 41.725876, complexity: 31.795692
@poikilotherm
Copy link
Contributor Author

This has been solved with the merge of #8395

@pdurbin pdurbin added this to the 5.10 milestone Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Code Infrastructure formerly "Feature: Code Infrastructure" Component: Containers Anything related to cloudy Dataverse, shipped in containers. Feature: Developer Guide
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants