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

Make efficient use of Maven caching in CI and Docker builds #6132

Closed
poikilotherm opened this issue Aug 29, 2019 · 0 comments · Fixed by #6133
Closed

Make efficient use of Maven caching in CI and Docker builds #6132

poikilotherm opened this issue Aug 29, 2019 · 0 comments · Fixed by #6133
Milestone

Comments

@poikilotherm
Copy link
Contributor

poikilotherm commented Aug 29, 2019

This is related to my other dependency housekeeping things. See #5288 and #5360.
Also related to gdcc/dataverse-kubernetes#64.


  1. Maven downloads the world for dependencies and again for plugins. These downloads should be avoided when the POM is unchanged.
    • Clarification: Maven will cache this locally, e. g. in a .m2/repo dir, but in ephemeral build envs, this will be lost after each build.
  2. All modern CI tools like Travis, Jenkins, GitLab, ... offer caching for reuse during next build.
  3. Docker layers offer caching.

To efficiently cache all dependencies and plugins, one needs to tell Maven it shall "download the world" before executing anything else. After that, Maven can be used in offline mode: mvn -o ....

However, the official dependency plugin target mvn dependency:go-offline does NOT download everything which is necessary: plugins are missing. There are some bugs for this, see MDEP-82, MDEP-516 and many more, but this has not been resolved yet.

For further enhancement of our CI and Docker efforts, I would like to add a Maven plugin. It will do no harm to anyone else, as you need to explicitly use it. Otherwise it will do just nothing.
https://github.com/qaware/go-offline-maven-plugin

poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 29, 2019
Enables to use Maven in offline mode: mvn -o package

See IQSS#6132 for details.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 29, 2019
Since 2013, the initial commit d6868ad, added the endorsed Java API.
These days, there is no reference to be found installing the resulting files.
The API was not included in the WAR file.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 29, 2019
Will not affect others, as it is completely unrelated to stages.
Enables to use Maven in offline mode: mvn -o package

See IQSS#6132 for details.
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Aug 29, 2019
poikilotherm added a commit to poikilotherm/dataverse that referenced this issue Sep 3, 2019
@pdurbin pdurbin added this to the 4.17 milestone Oct 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants