You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2021/07/23 20:46:59 UTC

[GitHub] [maven] michael-o opened a new pull request #512: [MNG-7010] Omit "NB: JAVA_HOME should point to a JDK not a JRE" excep…

michael-o opened a new pull request #512:
URL: https://github.com/apache/maven/pull/512


   …t when that is the problem
   
   This closes #512
   
   Following this checklist to help us incorporate your 
   contribution quickly and easily:
   
    - [ ] Make sure there is a [JIRA issue](https://issues.apache.org/jira/browse/MNG) filed 
          for the change (usually before you start working on it).  Trivial changes like typos do not 
          require a JIRA issue.  Your pull request should address just this issue, without 
          pulling in other changes.
    - [ ] Each commit in the pull request should have a meaningful subject line and body.
    - [ ] Format the pull request title like `[MNG-XXX] - Fixes bug in ApproximateQuantiles`,
          where you replace `MNG-XXX` with the appropriate JIRA issue. Best practice
          is to use the JIRA issue title in the pull request title and in the first line of the 
          commit message.
    - [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
    - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough check will 
          be performed on your pull request automatically.
    - [ ] You have run the [Core IT][core-its] successfully.
   
   If your pull request is about ~20 lines of code you don't need to sign an
   [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf) if you are unsure
   please ask on the developers list.
   
   To make clear that you license your contribution under 
   the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   you have to acknowledge this by using the following check-box.
   
    - [ ] I hereby declare this contribution to be licenced under the [Apache License Version 2.0, January 2004](http://www.apache.org/licenses/LICENSE-2.0)
   
    - [ ] In any other case, please file an [Apache Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   [core-its]: https://maven.apache.org/core-its/core-it-suite/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] michael-o commented on pull request #512: [MNG-7010] Omit "NB: JAVA_HOME should point to a JDK not a JRE"

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #512:
URL: https://github.com/apache/maven/pull/512#issuecomment-885923829


   @elharo  I have simplified the PR. As mentioned by @rfscholte we should improve the remaining text in a different issue/PR.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] michael-o commented on pull request #512: [MNG-7010] Omit "NB: JAVA_HOME should point to a JDK not a JRE" excep…

Posted by GitBox <gi...@apache.org>.
michael-o commented on pull request #512:
URL: https://github.com/apache/maven/pull/512#issuecomment-885915820


   Something is wrong the Java 8 on all runners. `JAVA_HOME` isn't set. Can we fix this ourselves or GitHub support?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] elharo commented on a change in pull request #512: [MNG-7010] Omit "NB: JAVA_HOME should point to a JDK not a JRE" excep…

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #512:
URL: https://github.com/apache/maven/pull/512#discussion_r675868466



##########
File path: apache-maven/src/assembly/shared/init
##########
@@ -50,14 +50,15 @@ if [ -z "$JAVACMD" ] ; then
 fi
 
 if [ ! -x "$JAVACMD" ] ; then
-  echo "The JAVA_HOME environment variable is not defined correctly" >&2
-  echo "This environment variable is needed to run this program" >&2
-  echo "NB: JAVA_HOME should point to a JDK not a JRE" >&2
+  echo "The JAVA_HOME environment variable is not defined correctly," >&2
+  echo "this environment variable is needed to run this program." >&2
   exit 1
 fi
 
 if [ -z "$JAVA_HOME" ] ; then
   echo "Warning: JAVA_HOME environment variable is not set." >&2
+elif [ ! -x "$JAVA_HOME/bin/javac" ] ; then

Review comment:
       Honestly not sure. Bash is not my strong suit. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] elharo commented on a change in pull request #512: [MNG-7010] Omit "NB: JAVA_HOME should point to a JDK not a JRE" excep…

Posted by GitBox <gi...@apache.org>.
elharo commented on a change in pull request #512:
URL: https://github.com/apache/maven/pull/512#discussion_r675865344



##########
File path: apache-maven/src/assembly/shared/init
##########
@@ -50,14 +50,15 @@ if [ -z "$JAVACMD" ] ; then
 fi
 
 if [ ! -x "$JAVACMD" ] ; then
-  echo "The JAVA_HOME environment variable is not defined correctly" >&2
-  echo "This environment variable is needed to run this program" >&2
-  echo "NB: JAVA_HOME should point to a JDK not a JRE" >&2
+  echo "The JAVA_HOME environment variable is not defined correctly," >&2
+  echo "this environment variable is needed to run this program." >&2
   exit 1
 fi
 
 if [ -z "$JAVA_HOME" ] ; then
   echo "Warning: JAVA_HOME environment variable is not set." >&2
+elif [ ! -x "$JAVA_HOME/bin/javac" ] ; then

Review comment:
       Now that I look at this I see a problem. This is testing that JAVA_HOME does not point to a JDK. It is not testing that it does point to a JRE. The problem I encountered when I filed the bug was that JAVA_HOME pointed to a directory that did not exist. Maybe test also that $JAVA_HOME/bin/java does exist? 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] michael-o commented on a change in pull request #512: [MNG-7010] Omit "NB: JAVA_HOME should point to a JDK not a JRE" excep…

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #512:
URL: https://github.com/apache/maven/pull/512#discussion_r675866515



##########
File path: apache-maven/src/assembly/shared/init
##########
@@ -50,14 +50,15 @@ if [ -z "$JAVACMD" ] ; then
 fi
 
 if [ ! -x "$JAVACMD" ] ; then
-  echo "The JAVA_HOME environment variable is not defined correctly" >&2
-  echo "This environment variable is needed to run this program" >&2
-  echo "NB: JAVA_HOME should point to a JDK not a JRE" >&2
+  echo "The JAVA_HOME environment variable is not defined correctly," >&2
+  echo "this environment variable is needed to run this program." >&2
   exit 1
 fi
 
 if [ -z "$JAVA_HOME" ] ; then
   echo "Warning: JAVA_HOME environment variable is not set." >&2
+elif [ ! -x "$JAVA_HOME/bin/javac" ] ; then

Review comment:
       Isn't it done with `if [ ! -x "$JAVACMD" ] ; then`?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] asfgit closed pull request #512: [MNG-7010] Omit "NB: JAVA_HOME should point to a JDK not a JRE"

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #512:
URL: https://github.com/apache/maven/pull/512


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [maven] michael-o commented on a change in pull request #512: [MNG-7010] Omit "NB: JAVA_HOME should point to a JDK not a JRE" excep…

Posted by GitBox <gi...@apache.org>.
michael-o commented on a change in pull request #512:
URL: https://github.com/apache/maven/pull/512#discussion_r675870296



##########
File path: apache-maven/src/assembly/shared/init
##########
@@ -50,14 +50,15 @@ if [ -z "$JAVACMD" ] ; then
 fi
 
 if [ ! -x "$JAVACMD" ] ; then
-  echo "The JAVA_HOME environment variable is not defined correctly" >&2
-  echo "This environment variable is needed to run this program" >&2
-  echo "NB: JAVA_HOME should point to a JDK not a JRE" >&2
+  echo "The JAVA_HOME environment variable is not defined correctly," >&2
+  echo "this environment variable is needed to run this program." >&2
   exit 1
 fi
 
 if [ -z "$JAVA_HOME" ] ; then
   echo "Warning: JAVA_HOME environment variable is not set." >&2
+elif [ ! -x "$JAVA_HOME/bin/javac" ] ; then

Review comment:
       Technically, Robert's right on JIRA. Maven does not require a JDK, plugins do.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org