Finding Groovy on Mac OS after installing it via SDKMAN - macos

I am using Mac OS and have installed groovy via SDKMAN. It says that groovy is installed however I do not know where it has been installed or how to open it and if I need to install an environment to open it in. Any help would be hugely appreciated.

When you install groovy (or other tool) via sdkman, it defines an environment variable: _TOOL_HOME in this particular case it will be GROOVY_HOME.
Run:
echo $GROOVY_HOME
in terminal and you will know the place where it's installed.

Related

Fastlane fails on Jenkins google-api-client-0.38.0 requires ruby version ~> 2.4

As a proof of concept, I successfully built a local Jenkins server on my MacBook (MacOS is Catalina) and the pipeline uses Fastlane scripts to clone, build, and distribute successfully.
Now, I have a Mac Server in our Data Center and I completed the same build-out and installed Jenkins. When I run the same pipeline, it fails, so I tried executing from the command line and it fails with this error:
google-api-client-0.38.0 requires ruby version ~> 2.4
Apparently, my install used ruby 3.0, so I followed recommendations to install rbenv and down level to 2.4. the installers were successful, but still the problem persists and uses ruby 3.0. The paths defined in my profiles look correct.
There are two key differences between my local server and the server in the data center that I can think of that may be influencing this problem:
My MacBook was upgraded to Catalina where the DataCenter iMac was built factory-fresh with Catalina. Note that an Apple version of ruby is installed with Catalina.
I do not have Xcode installed, only the CLI xcode-select version 2373; I would like to keep the IDEs off of this server, so there isn't a temptation to fix code on this dedicated Jenkins server.
Any recommendations to further troubleshoot this installation?
First, you probably will have to install Xcode, to use all of its tools (the CLI won't cut it). I recommend xcode-install to manage xcode versions via CLI. That is one key difference in your setup.
However, there're probably shenanigans with your $PATH environment within Jenkins. From what I understood from your description, you were able to run fastlane normally by invoking it via Terminal, but it won't work in Jenkins, is that right? Check the $PATH in Jenkins and make sure it matches the $PATH in your Terminal. rbenv and other ruby version managers require you to execute some startup code (e.g. eval "$(rbenv init -)" in case of rbenv) before being able to use it, and then setting up the right $PATH is required to make everything work as expected (i.e. have it point at Ruby 2.4 instead of 3.0).

How to run jenkins with old version of Java instead the latest default one on MacOS?

I'm setting up Jenkins on my Macbook (High Sierra), seems like the default version of Java is Java 9, which causes issue "java.lang.AssertionError: InstanceIdentity is missing its singleton"
I changed the Java home of my Mac from 9.x to 8 already, but when I reinstall, same trouble still comes along.
I checked the System Properties under Manage Jenkins/System Information, the value java.specification.version still is "9".
So how can I install Jenkins with old version of Java?
Or any workaround for it?
Here is what worked for me with OS X 10.13.2 (High Sierra).
I used "brew install jenkins" to install Jenkins. You can find instructions from http://flummox-engineering.blogspot.com/2016/01/installing-jenkins-os-x-homebrew.html, for example.
Download JDK 8 from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Set your JAVA_HOME and JDK_HOME to point to the version you downloaded. (Put this is your .bash_profile if needed.)
For example,
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
export JDK_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
Type in "jenkins --httpPort=9898" or whatever port is desired to start Jenkins.
If you aren't using the brew installation, you can open the start script at
/Library/Application Support/Jenkins/jenkins-runner.sh
and set your JAVA_HOME at the top of the script using the following line
export JAVA_HOME="`/usr/libexec/java_home -v 1.8`"
Then restart Jenkins and you'll be running Jenkins on 1.8

How to run eclipse on bash on Ubuntu on Windows?

I have eclipse installed on my windows machine, but I can't seem to use it with bash so I installed eclipse on the bash terminal by using "sudo apt-get install eclipse". It installed fine, but I can't figure out how to launch the eclipse GUI from the linux subsystem so I can use it like the windows version. I tried using Xming and exporting DISPLAY, but that didn't work. Any ideas?
from what i understood from the link below, you require to update .bashrc to direct the GUI display to a X Server process. I installed xMing to run X Server from Windows 10. i also had to install gtk components that allowed me to run sublime text GUI from within WSL.
https://medium.com/#pck/how-to-use-sublime-text-3-from-command-line-with-ubuntu-bash-terminal-in-windows-10-subsystems-for-aa2ad59d088c
hope this helps
IMHO you should not install eclipse by apt but simply get your desired eclipse product from from https://www.eclipse.org/downloads/packages , download and unzip it to your wanted location and just start eclipse.
Reasons:
I do not know any Linux distribution containing a newer eclipse bundled, so you are always having older versions being slower and having less features
You can update your eclipse installation directly inside eclipse Check for updates
You can have multiple installations at same time
If you want to get rid of a eclipse installation just remove the folder and you are done.
But of course you can also use bash directly in Windows with Eclipse.
Please look at
https://stackoverflow.com/a/62724163/2590615 or take a glimpse at You Tube Video about Bash Debugging with Bash Editor eclipse plugin on a Windows 10 machine
PS: I am the maintainer of the mentioned eclipse plugin

Apache Ant 1.9.6 Installation on Mac OSx - Does not run - Command not Found

I downloaded and installed apache ant 1.9.6 on my Mac OSx El Capitan 10.11.3 in /usr/local/, added the path to the bash_profile, however, I am unable to make it run. I get the following message back, as opposed to the version
-bash: ant: command not found
I did a lot of stackoverflow, however, couldn't find solution to this.
This is how my /usr/local looks:
This is how my bash_profile parameters for apache ant looks:
# Apache Ant
export ANT_HOME=“/usr/local/ant”
export PATH=$PATH:$ANT_HOME/bin
Could you please give me any hint that you may have.
Thank you.
Remove the quotes when you set ANT_HOME
It should be
export ANT_HOME=/usr/local/ant
This is only tangentially related to your issue, but you may want to look into homebrew, using this package manager on my mac I simply do
brew intall ant It gets your PATH setup automatically.
It also lets you upgrade to future versions with brew upgrade ant
The detailed and easy steps of installing ant using homebrew on Mac OSX is already discussed here:
How can I install Apache Ant on Mac OS X?
I installed homebrew and I was able to successfully install ant using homebrew package.

Python 3.5 for OS X El Capitan

I am using OS X El Capitan and my default Python version is 2.7.10.
How can I change the default version to Python 3.5 for Terminal use?
El Capitan comes bundled with 2.7 and is used internally, so its best you don't do anything with it.
The easiest way is to download the Mac installer,
https://www.python.org/ftp/python/3.5.0/python-3.5.0-macosx10.6.pkg
Install it by following the steps in the GUI, go to terminal and to start python type,
python3
For Brew, kindly refer to the document,
Installing Python on Mac OS X
It has a step-by-step guide to help you through the entire process of installing python 3.x
Regards.
Leave Python 2.X as it is.
Download Python either from https://www.python.org/ftp/python/3.5.0/python-3.5.0-macosx10.6.pkg or HomeBrew or via Anaconda from https://www.continuum.io/downloads.
add an alias in your ~/.bash_profile as follows
alias python='python3'
Hope that helped
you can use other answers and update your python version (actually you shouldnt update 2.7 because it makes problems for your applications that uses that version of python) OR
Use
Python3
Because you have it already
for your works like making virtual environments in that version.
My suggestion for you if you want to use different python versions on your system that could be so useful for ML and Data minings is USING
Pyenv
helps you manage you python versions.

Resources