I have installed rust and cargo using rustup and I don't know why but somehow the cargo stopped working because it cannot initialize git index in hidden folder..
The problem is:
cargo run
> error: failed to get `reqwest` as a dependency of package `whatever 0.1.0 (C:\somewhere\in\windows\whatever)`
>
> Caused by:
> failed to initialize index git repository (in "C:\\somewhere\\in\\windows\\.cargo\\registry\\index\\github.com-some1hash")
>
> Caused by:
> failed to mark Git repository folder as hidden: ; class=0s (2)
It could be because our corp has decreased privileges of all users but this means I can't compile anything on Windows..
edit: The versions are cargo 1.65.0 and rustc 1.65.0 under Windows 10 Enterprise. All of the folders in path are created, but are empty as it fails on hiding the folder..
Related
Environment:
Linux + JDK 11 + Gradle 5.0
I have several gradle projects which must build from sources without Internet connection/ For example this one git clone --depth 1 --branch 3.0.0 https://github.com/bobbylight/RSyntaxTextArea.git for that first of all I built this project online then copy ~/.gradle to $PROJECT_DIR/grdl , next I want to test this build offine. I perform gradle --stop , clear whole ~/.gradle directory then turn off Internet and run following script:
cp -r ./grdl/* ~/.gradle
cd RSyntaxTextArea
gradle --offline clean build
And everything builds good until I move these files to a different Linux+JDK11+Gradle 5.0 offline machine. When I run same script there I have following errors:
./build.sh
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':RSyntaxTextArea'.
> Could not resolve all artifacts for configuration ':RSyntaxTextArea:classpath'.
> Could not download coveralls-gradle-plugin.jar (org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.8.2): No cached version available for offline mode
> Could not download httpmime.jar (org.apache.httpcomponents:httpmime:4.3): No cached version available for offline mode
> Could not download org.eclipse.jgit.jar (org.eclipse.jgit:org.eclipse.jgit:3.6.0.201412230720-r): No cached version available for offline mode
> Could not download http-builder.jar (org.codehaus.groovy.modules.http-builder:http-builder:0.7.1): No cached version available for offline mode
> Could not download httpclient.jar (org.apache.httpcomponents:httpclient:4.3): No cached version available for offline mode
> Could not download jsch.jar (com.jcraft:jsch:0.1.50): No cached version available for offline mode
> Could not download JavaEWAH.jar (com.googlecode.javaewah:JavaEWAH:0.7.9): No cached version available for offline mode
> Could not download json-lib-jdk15.jar (net.sf.json-lib:json-lib:2.3): No cached version available for offline mode
> Could not download nekohtml.jar (net.sourceforge.nekohtml:nekohtml:1.9.16): No cached version available for offline mode
> Could not download xml-resolver.jar (xml-resolver:xml-resolver:1.2): No cached version available for offline mode
> Could not download httpcore.jar (org.apache.httpcomponents:httpcore:4.3): No cached version available for offline mode
> Could not download commons-beanutils.jar (commons-beanutils:commons-beanutils:1.8.0): No cached version available for offline mode
> Could not download commons-logging.jar (commons-logging:commons-logging:1.1.3): No cached version available for offline mode
> Could not download commons-codec.jar (commons-codec:commons-codec:1.6): No cached version available for offline mode
> Could not download commons-collections.jar (commons-collections:commons-collections:3.2.1): No cached version available for offline mode
> Could not download ezmorph.jar (net.sf.ezmorph:ezmorph:1.0.6): No cached version available for offline mode
> Could not download commons-lang.jar (commons-lang:commons-lang:2.4): No cached version available for offline mode
> Could not download xercesImpl.jar (xerces:xercesImpl:2.9.1): No cached version available for offline mode
> Could not download xml-apis.jar (xml-apis:xml-apis:1.3.04): No cached version available for offline mode
I have four of five gradle projects with similar problem. Surprisingly, one went offline fine on both machines, this one - git clone --depth 1 --branch 0.27 https://github.com/JFormDesigner/FlatLaf.git . I think that I don't understand gradle cache properly. Could you help me to build gradle projects without Internet? It could be any version of Gradle but I tied to Linux + JDK 11.
I think you are hitting this issue: https://github.com/gradle/gradle/issues/1338
That is, cache items are non relocatable. Copying the whole ~/.gradle folder may not be enough, especially if ~ resolves to a different path than in the original machine (i.e. different user). The full path needs to be exactly the same (with Gradle 5.0).
The issue suggests however that version 6.1 makes the cache relocatable, so perhaps you'll have more luck with a recent version (7.2 is the latest at this point in time).
EDIT: The release notes and these docs confirm that the cache can be copied across deployments as of version 6.1.1.
One solution that worked for me is to copy the $'username'/.gradle/caches/modules-2/files-2.1 folder
This contains all the libraries that gradle has cached and could be reused.
I think this was not possible with gradle versons < gradle 6.1.
After copying the files-2.1 folder you can sync the gradle project with the offline mode toggled on intellij/eclipse.
If it still does not work copy the entire caches folder.
I'm having an issue with running a test suite through Jenkins and I can't figure out why it's failing.
My job is set up with maven and according to others, maven is set up on the jenkins server (I don't have permission to check myself). The job is set to run on a specific node using labels (can't check the settings on the labels myself either).
This is the error I get when I run (more or less).
Running as SYSTEM
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
[EnvInject] - Loading node environment variables.
Building remotely on SELECTEDNODE in workspace E:...
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
using credential ABCD
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
...
...
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE"
ERROR: Maven Home null doesnt exist
Started calculate disk usage of build
Finished Calculation of disk usage of build in 0 seconds
Started calculate disk usage of workspace
Finished Calculation of disk usage of workspace in 0 seconds
Finished: FAILURE
This message keeps repeating
Installer "Extract *.zip/*.tar.gz" cannot be used to install "mvn.3.5.2" on the node "SELECTEDNODE" even though I have this version of maven installed on the selected node (I do not know if this version is on the Jenkins server, just that a maven version is on the server. I am assuming it is the correct version as I mentioned it needed to be this version and have not heard otherwise). Is this what is causing the issue?
There are usually 2 ways to get maven installed for you build. One is on the node server itself and define that maven path in the jenkins node configuration and the other way is to have the maven automatically installed from internet which appears to be the case in your case..when you have multiple maven defined you need to specifically select the maven for your job.
We have recently migrated our multimodule(each module with a pom.xml) repository from SVN to GIT.SCM connection in all pom.xml files updated from svn to git.
When i am trying to create a branch from git repository using maven release plugin it fails with the below error
"Failed to execute goal org.apache.maven.plugins:maven-release-plugin:2.5:branch (default-cli) on project intgr: An error is occurred in the checkin process: Exception while executing SCM command. Error while executing command. Error while executing process. Cannot run program "/bin/sh" (in directory "/u01/remote-agent-home/xml-data/build-dir/IN-CDBFG-JOB1/mahirepository"): error=7, Argument list too long -> [Help 1]"
On examining logs i understand below command generated this error.
"[INFO] Checking in modified POMs... [INFO] Executing: /bin/sh -c cd /u01/remote-agent-home/xml-data/build-dir/IN-CDBFG-JOB1/mahirepository && git add -- intgr-parent/pom.xml archetypes/pom.xml and 1000 more pom files "
Is there a way i can workaround or fix this issue?
Maven version : Apache Maven 3.0.4
JDK version : 1.7.0_01
Maven command :
mvn -s ./settingsBamboo.xml --batch-mode release:branch -DbranchName=${bamboo.branchname} -DupdateWorkingCopyVersions=true -DsuppressCommitBeforeBranch=true -DautoVersionSubmodules=true -DremoteTagging=false -DupdateBranchVersions=false -X
I am currently facing this problem as well, but I got a bit further on this.
The issue has nothing to do with Java or Maven, it's a Linux limitation.
using getconfig MAX_ARGS you can find the max amount of bytes you can use as arguments.
Large maven commands can easily go beyond this, and the amount of bytes differs largely per distro.
Check the amount of bytes you can use, and try to get your command below that.
You could for example move into the build dir first, and then run the command relative.
Another solution would be to increase the amount of usable space, but I have so far not gotten that working.
If anyone does or you have fixed this yourself, let me know.
I'm new to Gradle and while trying to install Gradle in my PC with Windows OS, I got the below mentioned error
Error: Could not find or load main class org.gradle.launcher.GradleMain
Only thing I did is that I followed the gradle installation steps given in gradle site Gradle installation and typed
gradle -v
in command prompt and I got the above mentioned exception. Any clue as to what had happened and how to resolve it.
This is what I have done :
Downloaded the zip file
Copied 'gradle-3.5' from the zip file to a folder I created in C drive (C:\Gradle)
Set GRADLE_HOME to 'C:\Gradle\gradle-3.5'
Set Path to '%GRADLE_HOME%\bin'
Opened cmd and typed gradle -v and got this error
I stopped all gradle daemons by running ./gradlew --stop and the error was resolved for me.
Basically this means that Gradle can't find your gradle/wrapper/gradle-wrapper.jar.
You have to follow Step 3 and setup environment variables:
Microsoft Windows users
In File Explorer right-click on the This PC (or Computer) icon, then
click Properties -> Advanced System Settings -> Environmental
Variables.
Under System Variables select Path, then click Edit. Add an entry for
C:\Gradle\gradle-3.5\bin. Click OK to save.
Source: https://gradle.org/install#configure
The easiest way, is to simply use gradlew.bat in your project and it will auto download Gradle for you!
I had the same issue after I removed the cache, the Gradle worker was running and I was getting this error
Error: Could not find or load main class worker.org.gradle.process.internal.worker.GradleWorkerMain
Steps I performed to resolve the error
Use gradle --stop or ./gradlew --stop
Delete the workerMain.lock file under $USER/.gradle/caches/version/workerMain
re-run the Gradle command
I'm trying to run maven-android-sdk-deployer on my OpenShift Jenkins. It needs at least Maven 3.1.1 to run, whereas OpenShift currently uses version 3.0.5 as default. Thus I tried to configure a custom Maven installation.
My Maven system configuration:
name: maven-3.1.1
install automatically: true
one installer with "Unzip archive" (I also tried "Install from Apache" with the same result.)
label: empty
download url: http://mirror.synyx.de/apache/maven/maven-3/3.1.1/binaries/apache-maven-3.1.1-bin.zip
subfolder in archive: apache-maven-3.1.1
It seems to install Maven, because there is another error message, if "subfolder in archive" doesn't match. The zip file is valid.
But I cannot use it in the job.
I created a freestyle job and added a Maven step with the configured Maven installation.
There is an error message, when running the job:
[maven-android-sdk-deployer] $ app-root/data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.1/apache-maven-3.1.1/bin/mvn install -P 4.1
FATAL: command execution failed
java.io.IOException: Cannot run program "app-root/data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.1/apache-maven-3.1.1/bin/mvn" (in directory "app-root/data/jenkins/workspace/maven-android-sdk-deployer"): error=2, No such file or directory
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
at hudson.Proc$LocalProc.<init>(Proc.java:244)
... 13 more
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.UNIXProcess.forkAndExec(Native Method)
... 17 more
Workaround for command line
I checked the file system the maven-android-sdk-deployer workspace and app-root/data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.1/apache-maven-3.1.1/bin/mvn both exist on the myappbldr-gear.
When I run the command from commandline I get the same error, whereas appending ~/ to the maven path works as intended:
[maven-android-sdk-deployer] $ ~/app-root/data/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.1.1/apache-maven-3.1.1/bin/mvn install -P 4.1
Looks like this is an administration problem. How can I fix this?