Code Monkey home page Code Monkey logo

Comments (6)

giltene avatar giltene commented on August 27, 2024

I too think that reporting (and verifying) the version installed would be generally useful. The simplest way to do this is to execute java -version. One can obviously do that as a step in the job itself, but it would probably be useful (and cheap enough) to do this implicitly in the action as a good logging practice, as the version information is often needs for diagnostic reasons (and the need is usually noticed after the fact, rather than as a planned thing).

from setup-java.

asarkar avatar asarkar commented on August 27, 2024

Is it possible to implement this seemingly easy ticket instead of waiting for the Big Bang #98 that could take months or even years?

from setup-java.

dmitry-shibanov avatar dmitry-shibanov commented on August 27, 2024

Hello everyone. Setup-java@v2 was released and it logs version of setup java. Please see migration guide from v1 to v2. If you have any concerns feel free to reopen the issue.

from setup-java.

asarkar avatar asarkar commented on August 27, 2024

@dmitry-shibanov I migrated to v2 and it looks good. Thank you. Couple of comments:

  1. Not a big deal, but having a default distribution would be nice.
  2. v2 seems to be more verbose, especially the downloading JDK part. Not sure if I want to see the action setting up Java in my build logs. May be hide it unless verbose: true is set?

v1

Run actions/setup-java@v1
/usr/bin/tar --version
tar (GNU tar) 1.30
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by John Gilmore and Jay Fenlason.
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/temp_1161855869 -f /home/runner/work/_temp/abd98200-ef11-4248-8e23-b2b76bf9846e
creating settings.xml with server-id: github; environment variables: username=$GITHUB_ACTOR, *** and gpg-passphrase=null
writing /home/runner/.m2/settings.xml

v2:

Run actions/setup-java@v2
Trying to resolve the latest version from remote
Resolved latest version as 8.0.282+8
Trying to download...
Downloading Java 8.0.282+8 (Zulu) from https://cdn.azul.com/zulu/bin/zulu8.52.0.23-ca-jdk8.0.282-linux_x64.tar.gz ...
Extracting Java archive...
/usr/bin/tar xz --warning=no-unknown-keyword -C /home/runner/work/_temp/89eaf85a-fb1a-4dd2-822e-925174a055b4 -f /home/runner/work/_temp/648b7ad7-d4ed-4f1e-b303-11adf58a3fae
Java 8.0.282+8 was downloaded
Setting Java 8.0.282+8 as the default

Java configuration:
  Distribution: zulu
  Version: 8.0.282+8
  Path: /opt/hostedtoolcache/Java_Zulu_jdk/8.0.282-8/x64

Creating settings.xml with server-id: github
Writing to /home/runner/.m2/settings.xml

from setup-java.

dmitry-shibanov avatar dmitry-shibanov commented on August 27, 2024

Hello @asarkar. Thank you for your response and feedback.

  1. We're not planning to make distribution field default one based on ADR.
  2. Yes, sure. Setup-java@v2 is more verbose. But I'm not sure, that we should hide this logs. If you have any concerns about it, you can create separate issue to discuss it deeper.

from setup-java.

asarkar avatar asarkar commented on August 27, 2024

Opened #157 for verbosity.

from setup-java.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.