gradle-maven-exec-plugin icon indicating copy to clipboard operation
gradle-maven-exec-plugin copied to clipboard

Unable to set goals

Open bellini-ea opened this issue 4 years ago • 5 comments

Hi I'm on gradle 6.2.1 and using the kotlin DSL. I'm trying to setup this plugin but having issues getting access to be able to set goals.

register<MavenExec>("mytask")` { goals(listOf("")) }

I get the following on the goals part in Intellij:

Cannot access 'com.github.dkorotych.gradle.maven.exec.DefaultMavenExecSpec.Trait.FieldHelper' which is a supertype of 'com.github.dkorotych.gradle.maven.exec.MavenExec'. Check your module classpath for missing or conflicting dependencies

On the commandline I get this:

` Could not resolve all artifacts for configuration ':classpath'. Could not find com.github.dkorotych.gradle.maven.exec:gradle-maven-exec-plugin:2.2.1. Searched in the following locations: - https://plugins.gradle.org/m2/com/github/dkorotych/gradle/maven/exec/gradle-maven-exec-plugin/2.2.1/gradle-maven-exec-plugin-2.2.1.pom If the artifact you are trying to retrieve can be found in the repository but without metadata in 'Maven POM' format, you need to adjust the 'metadataSources { ... }' of the repository declaration. Required by: project :

Appreciate any guidance here.

image

bellini-ea avatar Mar 19 '20 04:03 bellini-ea

hey, did you manage to solve in the meanwhile?

elect86 avatar May 28 '20 11:05 elect86

I did not. Couldn't find a way so ended up calling maven as a direct os call.

bellini-ea avatar May 28 '20 14:05 bellini-ea

Sorry, guys, I can’t devote enough time to this task now.

There is an example here, I tried to port my standard test scripts to Kotlin and some tasks work. I think I just do not have the knowledge to correctly port the script from Groovy to Kotlin

But I will always accept a working PR

dkorotych avatar May 29 '20 17:05 dkorotych

I'd love to do that!

elect86 avatar May 29 '20 17:05 elect86

Here you go, remains left only:

  • ru.vyarus.quality but since I upgraded to 6.4.1 it look useless
  • ext.year and ext.developers under license{ .. }, no idea how to convert them
  • for the mavenExecPlugin under pluginBundle{ plugins { .. } } I don't know if I should use create or register
  • groovydoc can be removed or?
  • no idea how to replace with versionPattern

elect86 avatar May 29 '20 20:05 elect86