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

feat(pacmak/java): isolate maven repositories #1709

Merged
merged 1 commit into from
Jun 2, 2020

Conversation

RomainMuller
Copy link
Contributor

@RomainMuller RomainMuller commented Jun 2, 2020

When preparing a Java package using Maven, jsii-pacmak now configures
a dedicated localRepository for its own use. This prevents artifacts
cached from previous builds as well as local build artifacts to possibly
interfere with the compilation process.

This has the side-effect to force a re-download of all dependencies on
each build (except those that are generated as part of the same build),
which results in a performance degradation. It should be possible to
make the local repository location user-configurable so this impact can
be mitigated on a case-by-case basis.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

When preparing a Java package using Maven, `jsii-pacmak` now configures
a dedicated `localRepository` for it's own use. This prevents artifacts
cached from previous builds as well as local build artifacts to possibly
interfere with the compilation process.

This has the side-effect to force a re-download of all dependencies on
each build (except those that are generated as part of the same build),
which results in a performance degradation. It should be possible to
make the local repository location user-configurable so this impact can
be mitigated on a case-by-case basis.
@mergify mergify bot added the contribution/core This is a PR that came from AWS. label Jun 2, 2020
@aws-cdk-automation
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: AutoBuildProject6AEA49D1-Blkkw9bQFn8A
  • Commit ID: 2f25a47
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@@ -1,3 +1,4 @@
.m2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why oh why not in a tempdir somewhere?

Copy link
Contributor Author

@RomainMuller RomainMuller Jun 2, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because local iterations will be much faster for not re-downloading things every single time. You can nuke this directory when you need it...

Additionally, I don't like dropping temporary directories somewhere where I will not be able to clean them up. I consider this is loitering.

@mergify
Copy link
Contributor

mergify bot commented Jun 2, 2020

Thank you for contributing! ❤️ I will now look into making sure the PR is up-to-date, then proceed to try and merge it!

@mergify mergify bot added the pr/ready-to-merge This PR is ready to be merged. label Jun 2, 2020
@mergify mergify bot merged commit 4904cd8 into master Jun 2, 2020
@mergify mergify bot deleted the rmuller/java-isolation branch June 2, 2020 14:57
@mergify
Copy link
Contributor

mergify bot commented Jun 2, 2020

Merging (with squash)...

@mergify mergify bot removed the pr/ready-to-merge This PR is ready to be merged. label Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution/core This is a PR that came from AWS.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants