I have a remote Windows computer with Cygwin 1.7.35 installed on it and we use it as a slave for CI testing with Jenkins.
I created a Jenkins job to build a Maven project (after cloning from repository).
The Jenkins contains Cygpath 1.5 plugin and the registry path to Cygwin is SOFTWARE/Cygwin/Setup
I use a PreStep to clone the project from a repository:
source ~/.profile > /dev/null
cd /cygdrive/c
rm -rf .$WORKSPACE/project-name
hg clone something something
The repository clone works fine.
The build fails and I get this error in the console output:
ERROR: Failed to parse POMs
hudson.util.IOException2: Failed to locate Cygwin installation. Is Cygwin installed?
at hudson.plugins.cygpath.CygpathLauncherDecorator$GetCygpathTask.getCygwinRoot(CygpathLauncherDecorator.java:138)
etc...
I tried rewriting the Path variable from C:\cygwin64\bin to C:/cygwin64/bin and back.
I tried this on Cygwin 1.7.32 first and then on 1.7.35 again.
I tried changing the path in the registry entry from C:\Cygwin64 to C:Cygwin64\bin and back.
Nothing works.
My colleague builds his project on the same Jenkins server with the same slave, but he is using an Ant project with build.xml and it works just fine.
Please, do you have any suggestions on how to solve this?
Thanks!
Peter
I found an answer.
I created a new registry entry under
SOFTWARE\Cygnus Solutions\Cygwin\
string rootdir aiming to cygwin64.
Which is strange, because in my Jenkins I use cygpath 1.5 which should find the correct path of Cygwin installation which is under registry path SOFTWARE\Cygwin\setup.
I also had to change the Jenkins slave machine configuration, because the slave machine Java SDK version is different than Java SDK version in global Jenkins settings.
I hope that someone finds this helpful!
Peter
I looked in the source code of the file which threw the exception and found out that it wants a string from the key
'HKLM/SOFTWARE/Wow6432Node/Cygwin/setup'
named 'rootdir' which has the absolute path to your Cygwin installation.
Edit: I ended up creating the key 'setup' because it didn't exist.
Related
last week I got new laptop from company so I had to do new installation from scratch.
I installed my JDK, Maven, git bash and IDE, configured environment variables for MAVEN_HOME and JAVA_HOME... added them to Path with for example: %JAVA_HOME%\bin and same for maven.
Both JDK and Maven work perfectly fine with cmd and git bash or even with maven plugin in IntelliJ.
But if i want to open terminal inside of IDE and run some maven command it will give me mvn not found error.
I use /wanna use git bash, but it gives same error for cmd inside of IDE as well.
I've checked terminal system environemtns setting in IDE and I can find MAVEN_HOME inside and I even tried to add M2_HOME but error is the same (I do reset terminal after every change).
Also, in git bash if I write echo $PATH it will return me my variables as it can be seen here:
/mingw64/bin:/usr/bin:/c/Users/user.name/bin:/c/Program Files (x86)/Common Files/Oracle/Java/javapath:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:
/c/Windows/System32/WindowsPowerShell/v1.0:/c/Windows/System32/OpenSSH:/c/Program Files/Docker/Docker/resources/bin:/c/ProgramData/DockerDesktop/version-bin:%JAVA_H
OME%/bin:%MAVEN_HOME%/bin:/cmd:/c/Users/prese/AppData/Local/Microsoft/WindowsApps:/c/Users/username/AppData/Local/Programs/Microsoft VS Code/bin:/c/Program Files/herok
u/bin
I never had an issue like this as usually all I had to do after installig java/maven and git bash was to change default terminal in IDE to git bash.... and that's it.
But something is different this time around.
Please do share what can I do and/or try.
EDIT:
If I write:
export PATH=$PATH:/c/Program\ Files/Apache\ Maven/apache-maven-3.6.3/bin
This will set maven and it will work... but only for this instance of terminal... new instace and session will not have it
I am attempting the installation of ESP-IDF toolchain for windows with the installer from here
However the installation fails with the exit-code=128.
Since I am a newbie I am not sure if I am missing something assuming the installer will take care of installation of all the dependencies
I am attaching the logs here for the reference
System Spec:
1.OS : windows 10
2. Processor : I7-8th Gen
If you have installed git and python (I think you do if you tried to use the windows installer beforehand), you can try to install the toolchain from the terminal.
Open a CMD (Win+R, cmd, Intro)
Create a new folder (be aware that ESP-IDF does not like spaces in the path)
2.1 mkdir C:\esp
2.2 cd C:\esp
Clone the repository from git into the current directory with:
git clone -b v4.2 --recursive https://github.com/espressif/esp-idf.git . <= don't forget the . at the end
Run install.bat
Once installed, you can run in the folder you project lives c:\esp\export.bat which will set the environment variables for you to use idf.py tool.
If you are trying to install ESP-IDF on Windows and still having issues, try the latest installer with some pre-install verification.
You can download here: IDF-Installer
Alternatively, you can try this tool: idf-env
I just got my free Sonatype Maven repo and have been attempting to do a release. However whilst trying to do this I get an error when maven-gpg-plugin attempts to sign artifacts.
I get a ton of asterisks showing beforehand and I just press enter and then I get this issue, here's my full log: http://pastebin.com/GkLbFgBF
Here are the command line parameters I am attempting to use
clean install javadoc:javadoc javadoc:jar source:jar release:clean release:prepare release:perform
I installed gpg4win thinking that might solve this but it hasn't.
As each system is differently configured the following steps works in some cases.
when you receive this error message, “gpg is not recognized as an internal or external command” then you need to update your PATH variable.
To do this without reboot:
Open up a command prompt window
Paste this in:
SET PATH=%PATH%;C:\Program Files (x86)\GNU\GnuPG
Hit Enter
A quick and easy fix (at least for me) was to just copy the gnupg using the File Explorer interface from whatever folder it got saved to when you originally downloaded it. Then make sure it's pasted into both Program Files (x86) and Program Files folders in c: or Windows(c:)
I was getting the gpg is not recognized as an internal or external command error during a Linux Mint authentication check. Checked the PATH saw that C:\*AnyDirectory*\gnupg\bin was absent. Went to my c: folder in File Explorer and searched gnupg saw that it was in Program Files but not in Program Files (x86) fixed that now I get C:\Program Files (x86)\gnupg\bin in my PATH and the error message went away.
You can also use another plugin https://www.simplify4u.org/sign-maven-plugin/ for signing artifacts.
sign-maven-plugin does not use gpg for signing, it use java BouncyCastle for signing artifacts so you need not install gpg executable and plugin works on any operating system without special configuration.
I made a golang app on my machine that uses cron. On my machine, I
"go get github.com/robfig/cron"
to download and install dependency then in my app I
"import cron "github.com/rk/go-cron""
the app works fine and runs the way I want. I then upload it to the server where it's supposed to run and try to "go get github.com/robfig/cron" as I did on my machine, but then it gave me this
I downloaded and installed github but still the same result. I'm guessing the problem is with github on my server machine
I am new to golang and andy kind of help would be greatly appreciated. Thanks.
What you need to install is git. It is the version control system (VCS) used by GitHub.
The native GitHub application does not provide the command line tools used by Go.
Git can be found and downloaded at http://git-scm.com/downloads
Once installed, make sure you have the path to the Git cmd folder in your %PATH% environment variable.
You can check this by running the command: echo %PATH%
On a Windows installation, you might find it located here:
C:\Program Files (x86)\Git\cmd
I recently installed the springsource tool suite plugin for eclipse, running on windows 7. But when I open a command prompt (by typing cmd in the windows start menu) and type in:
mvn --version
I get the following response:
'mvn' is not recognized as an internal or external command, operable program, or batch file.
So I then downloaded the stand-alone version of springsource tool suite, which is not what I want. And nonetheless, I still get the same response on the command line when I type in mvn --version. Can anyone tell me how to fix this problem?
I get the same response when I type in java -version . So this might be a command prompt problem. I a following the exact syntax from web tutorials.
EDIT:
I just tried to download m2e in the eclipse marketplace, but got the message that there is nothing new to install. This seems to indicate that I have maven installed, so then how do I access it via the command line in windows 7?
You have to configure your Maven environment variable to be able to use it in the command prompt.
In your case there's no need to download the maven binars because it comes with STS, just find the Maven folder inside the STS directory.
"___" is not recognized as an internal or external command
is shown when program is not installed or the path of that program is not set (to execute from other path).
remember, in "STS", maven is not configured to work out of STS (and terminal usage is out of STS usage).
we have to install it.
maven download link is here
download latest maven from here
extract it where ever you want.
i extracted as below (see the bin,boot,conf,... folders are shown below as in the image):
as this maven download is extracted from zip file (it is not setup), you will have to add this extracted path to "PATH" variable in windows environment.
follow this to set environment path:
now "mvn" command must work.
but
in my case i had to restart STS (spring tool suit) for this to work