Skip to content

Add Gradle and Maven version parameters to Java - #263

Merged
joshspicer merged 3 commits into
devcontainers:mainfrom
etienne-chrp:feature/gradle-maven-version
Nov 17, 2022
Merged

Add Gradle and Maven version parameters to Java#263
joshspicer merged 3 commits into
devcontainers:mainfrom
etienne-chrp:feature/gradle-maven-version

Conversation

@etienne-chrp

Copy link
Copy Markdown
Contributor

closes #260

@etienne-chrp
etienne-chrp requested a review from a team as a code owner November 7, 2022 09:03
@etienne-chrp
etienne-chrp force-pushed the feature/gradle-maven-version branch 3 times, most recently from 6914ba6 to a15440b Compare November 7, 2022 09:13
@etienne-chrp

Copy link
Copy Markdown
Contributor Author

@microsoft-github-policy-service agree

Comment thread src/java/README.md Outdated
Comment thread src/java/devcontainer-feature.json

@joshspicer joshspicer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you for taking the time to add this functionality (and adding the test). I ran the CI and the version that the scenario is trying to pass doesn't seem to exist.

------
 > [dev_containers_target_stage 4/4] RUN cd /tmp/build-features/java_1 && chmod +x ./devcontainer-features-install.sh && ./devcontainer-features-install.sh:
#17 13.51 Enjoy!!!
#17 13.53 Updating /etc/bash.bashrc and /etc/zsh/zshrc...
#17 14.68 Version 18 not found. Available versions:
#17 14.68 19.0.1-open
#17 14.68 11.0.12-open
#17 14.68 11.0.2-open
#17 14.68 8.0.302-open
#17 14.68 8.0.282-open
#17 14.68 8.0.265-open
#17 14.69 ERROR: Feature "./java" (Unknown) failed to install! Look at the documentation at https://github.com/devcontainers/features/tree/main/src/java for help troubleshooting this error.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for opening the PR. Left some comments.

Comment thread src/java/devcontainer-feature.json
Comment thread test/java/scenarios.json
@etienne-chrp
etienne-chrp force-pushed the feature/gradle-maven-version branch 2 times, most recently from d89ef37 to 80f70e1 Compare November 8, 2022 17:09
@etienne-chrp

Copy link
Copy Markdown
Contributor Author

I created a new commit that is fixing the tests that are failing in the pipeline, as mentioned here: #263 (review)

@etienne-chrp

etienne-chrp commented Nov 9, 2022

Copy link
Copy Markdown
Contributor Author

I created a new commit that is fixing the tests that are failing in the pipeline, as mentioned here: #263 (review)

Included in the PR is a refactoring from a pipe syntax with grep to a process substitution syntax. The check helper under certain conditions is not accepting the pipe syntax and the grep was executed on the output of the check function, by using the process substitution syntax all the tests are displayed properly.

@etienne-chrp
etienne-chrp force-pushed the feature/gradle-maven-version branch 3 times, most recently from 270d27f to 9c4a93c Compare November 9, 2022 09:18
The grep with pipe syntax was creating problems with the check helper

Change them in favour of process substitution syntax
Java 18 is not available anymore in SDKMAN

Some tests asserts were generating false positives
@etienne-chrp
etienne-chrp force-pushed the feature/gradle-maven-version branch from 9c4a93c to 907e9a6 Compare November 9, 2022 09:21

@joshspicer joshspicer left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you, this looks great!

@joshspicer

Copy link
Copy Markdown
Member

I created a new commit that is fixing the tests that are failing in the pipeline, as mentioned here: #263 (review)

Included in the PR is a refactoring from a pipe syntax with grep to a process substitution syntax. The check helper under certain conditions is not accepting the pipe syntax and the grep was executed on the output of the check function, by using the process substitution syntax all the tests are displayed properly.

I agree, that check command has room for improvement. A lot of the test scripts do bash -c '<cmd> | grep <word>, but this looks more elegant :)

@joshspicer
joshspicer merged commit be4f049 into devcontainers:main Nov 17, 2022
@etienne-chrp
etienne-chrp deleted the feature/gradle-maven-version branch November 17, 2022 09:06
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 this pull request may close these issues.

[JAVA] Install a specific version of Gradle or Maven

3 participants