bsideup / gradle-maven-sync-plugin

Sync your Gradle build with the dependencies from pom.xml
https://plugins.gradle.org/plugin/com.github.bsideup.maven-sync
MIT License
14 stars 6 forks source link

Question: Could not execute mvn, -q, help:effective-pom, ... #4

Open didos36 opened 7 years ago

didos36 commented 7 years ago

Hello, I'm able to execute "mvn" from my command line, but I getting that following error: Could not execute [mvn, -q, help:effective-pom, -Doutput=C:\Users\xxx\AppData\Local\Temp\effective-pom7626785958356356218.xml]

`λ mvn -v

set MAVEN_OPTS=-Xmx4096M -XX:MaxPermSize=1024m Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=1024m; support was removed in 8.0 Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T13:57:37+02:00) Maven home: C:\dev\tool\maven\bin.. Java version: 1.8.0_121, vendor: Oracle Corporation Java home: C:\dev\tool\java\jdk1.8.0_121\jre Default locale: en_GB, platform encoding: Cp1252 OS name: "windows 7", version: "6.1", arch: "amd64", family: "dos"`

What I'm doing wrong?

bsideup commented 7 years ago

Hi @didos36,

I see that you're using Windows. Frankly, I haven't tested it on Windows but will do soon!

Meanwhile, you can try to run Gradle with --debug option and check debug output, maybe it's something trivial :)

didos36 commented 7 years ago

I can confirm that using "mvn.bat" instead of "mvn" in the command solve the issue.

But well, I hit issues with maven scope provided...

bsideup commented 7 years ago

@didos36 you can configure "provided" as shown in the test: https://github.com/bsideup/gradle-maven-sync-plugin/blob/master/src/test/resources/features/basic.feature#L17

mvn.bat workaround sounds odd, but I'll take a look, thanks for investigating it!

didos36 commented 7 years ago

Yes as a complete newbie with gradle, testing with "mvn.bat" was just a way for me to see what happened zdoing this workaround. Thanks fot the tips with configuration tag, seems to work now

bsideup commented 7 years ago

:+1:

I recommend you to check https://github.com/bsideup/gradle-maven-sync-plugin/blob/master/src/test/resources/features/ They contain some good examples of usage and readable by human :)