Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wss-unified-agent tries to resolve mvn dependencies in gradle-only project and fails #38

Open
ckuehne opened this issue May 25, 2022 · 2 comments

Comments

@ckuehne
Copy link

ckuehne commented May 25, 2022

I have a gradle Project.
But the wss-unified-agent apparently finds maven dependencies and tries to resolve them by running maven.
But mvn is not installed on the machine.

[DEBUG] [2022-05-25 07:10:22,253 +0200] - GradleDependencyResolver - resolveDependencies - END - 3
[INFO] [2022-05-25 07:10:22,260 +0200] - Trying to resolve MAVEN dependencies
[DEBUG] [2022-05-25 07:10:22,260 +0200] - Command - executeProcess - timeout set to 60s
[DEBUG] [2022-05-25 07:10:22,261 +0200] - Command - executeProcess - start execute command 'mvn -v' in '.'
[WARN] [2022-05-25 07:10:22,261 +0200] - Command - executeProcess - Command 'mvn -v' run Failed, Exception: Cannot run program "mvn" (in directory "."): error=2, No such file or directory
[DEBUG] [2022-05-25 07:10:22,261 +0200] - MAVEN installation status: false
[DEBUG] [2022-05-25 07:10:22,262 +0200] - The command was run under [..]/product/.
[INFO] [2022-05-25 07:10:22,262 +0200] - topFolder = [..]/org.jacoco.agent-0.8.7.jar_3a83c50b4a016f281c4e9f3500d16b55/META-INF/maven/org.jacoco/org.jacoco.agent
[DEBUG] [2022-05-25 07:10:22,262 +0200] - topFolder = [..]/build/tmp/expandedArchives/org.jacoco.agent-0.8.7.jar_3a83c50b4a016f281c4e9f3500d16b55/META-INF/maven/org.jacoco/org.jacoco.agent
[DEBUG] [2022-05-25 07:10:22,262 +0200] - Command - executeProcess - timeout set to 900s
[DEBUG] [2022-05-25 07:10:22,262 +0200] - Command - executeProcess - start execute command 'mvn -v' in '[..]/build/tmp/expandedArchives/org.jacoco.agent-0.8.7.jar_3a83c50b4a016f281c4e9f3500d16b55/META-INF/maven/org.jacoco/org.jacoco.agent'
[WARN] [2022-05-25 07:10:22,263 +0200] - Command - executeProcess - Command 'mvn -v' run Failed, Exception: Cannot run program "mvn" (in directory "[..]/build/tmp/expandedArchives/org.jacoco.agent-0.8.7.jar_3a83c50b4a016f281c4e9f3500d16b55/META-INF/maven/org.jacoco/org.jacoco.agent"): error=2, No such file or directory
[DEBUG] [2022-05-25 07:10:22,263 +0200] - Failed to get maven version
[WARN] [2022-05-25 07:10:22,263 +0200] - Please install maven
...
[ERROR] [2022-05-25 07:10:22,269 +0200] - Process finished with exit code ERROR (-1)
@avinoamw1
Copy link

Hi @ckuehne ,
You can disable Maven resolution by toggling 'maven.resolveDependencies' off in your configuration.
I'm not sure how your Unified Agent is configured aside from this, so I can only recommend making sure that the Gradle resolution is enabled. See more here:
https://whitesource.atlassian.net/wiki/spaces/WD/pages/1544880156/Unified+Agent+Configuration+Parameters#Gradle

I hope this helps.

@ckuehne
Copy link
Author

ckuehne commented May 25, 2022

Hi @avinoamw1 ,

thanks. Setting maven.resolveDependencies=false resolves the issue.
However, I was hoping for something more subtle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants