mulesoft-labs / raml-for-jax-rs

This project is all about two way transformation of JAX-RS-annotated Java code to RAML API description and back.
Other
295 stars 181 forks source link

Gradle plugin not in maven repository?? #287

Closed ghost closed 6 years ago

ghost commented 7 years ago

I try to use the gradle plugin 2.1.0 but it is not found. Same if I try to compile the example project.

XXXXXX@ESEKIGALA121:~/project/raml-for-jax-rs/raml-to-jaxrs/examples/gradle-examples/gradle-jaxb-example$ ll
total 8
drwxrwxr-x  4 XXXXXX  ERICSSON\Domain Users   136B Jul 14 13:12 ./
drwxrwxr-x  6 XXXXXX  ERICSSON\Domain Users   204B Jul 14 13:12 ../
-rw-rw-r--  1 XXXXXX  ERICSSON\Domain Users   604B Jul 14 13:12 build.gradle
drwxrwxr-x  3 XXXXXX  ERICSSON\Domain Users   102B Jul 14 13:12 src/
XXXXXX@ESEKIGALA121:~/project/raml-for-jax-rs/raml-to-jaxrs/examples/gradle-examples/gradle-jaxb-example$ gradle build

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'gradle-examples'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not find org.raml.jaxrs:raml-to-jaxrs-gradle-plugin:2.1.0.
     Searched in the following locations:
         file:/Users/XXXXXX/.m2/repository/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/2.1.0/raml-to-jaxrs-gradle-plugin-2.1.0.pom
         file:/Users/XXXXXX/.m2/repository/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/2.1.0/raml-to-jaxrs-gradle-plugin-2.1.0.jar
         https://repository.mulesoft.org/snapshots/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/2.1.0/raml-to-jaxrs-gradle-plugin-2.1.0.pom
         https://repository.mulesoft.org/snapshots/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/2.1.0/raml-to-jaxrs-gradle-plugin-2.1.0.jar
         https://repository.mulesoft.org/releases/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/2.1.0/raml-to-jaxrs-gradle-plugin-2.1.0.pom
         https://repository.mulesoft.org/releases/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/2.1.0/raml-to-jaxrs-gradle-plugin-2.1.0.jar
         https://repo1.maven.org/maven2/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/2.1.0/raml-to-jaxrs-gradle-plugin-2.1.0.pom
         https://repo1.maven.org/maven2/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/2.1.0/raml-to-jaxrs-gradle-plugin-2.1.0.jar
     Required by:
         project :

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.213 secs
XXXXXX@ESEKIGALA121:~/project/raml-for-jax-rs/raml-to-jaxrs/examples/gradle-examples/gradle-jaxb-example$ 
mweirauch commented 7 years ago

It should be -wrapper? See https://repository-master.mulesoft.org/nexus/content/repositories/releases/org/raml/jaxrs/jaxrs-to-raml-gradle-plugin-wrapper/

I just stumbled over the fact in a maven build that the groupId also changed from org.raml to org.raml.jaxrs.

ghost commented 7 years ago

Wrapper does not work as well, it says the implementation file not found.

And you sent a jaxrs to raml wrapper link. I am looking for from gradle to jaxrs

jpbelang commented 7 years ago

@jstoiko is something missing ?

jstoiko commented 7 years ago

@jpbelang not sure what's wrong. The buildscript.dependencies in raml-for-jax-rs/raml-to-jaxrs/examples/gradle-examples/build.gradle is definitely wrong. It should be raml-to-jaxrs-gradle-plugin-wrapper instead of raml-to-jaxrs-gradle-plugin, no?

jpbelang commented 7 years ago

Actually, no. The wrapper is just to allow for maven to build the gradle plugin.

jpbelang commented 7 years ago

The raml gradle plugin is not deployed in maven central: https://search.maven.org/#search%7Cga%7C1%7Craml-gradle-plugin

I'm looking into it now, but I don't have access to central.

jstoiko commented 7 years ago

@jpbelang: I think it's here: https://search.maven.org/#search%7Cga%7C1%7Craml-to-jaxrs-gradle-plugin. The artifact ID is raml-to-jaxrs-gradle-plugin-wrapper on Maven Central.

nwillc commented 7 years ago

The -wrapper plugin is not the actual plugin as far as gradle is concerned. Gradle will pull down that artifact but then you get a "Could not find implementation class 'org.raml.jaxrs.gradle.RamlToJaxrsPlugin ... " error on the "apply plugin: 'ramltojaxrs'" That "wrapper" plugin looks like the code for the plugin, perhaps the plugin can be built from it I don't know.

nwillc commented 7 years ago

Checked out the repo. Built parts with mvn, did the suggested "gradle wrapper --gradle-version 3.3", explicitly set the version in the build.gradle to 2.1.0, and built the plugin with "./gradlew install". Then manually uploaded the plugin jar it to our maven repo. I can at least now apply the plugin. This is a very sloppy state of things.

euclio commented 7 years ago

I see that there was a commit regarding this issue? Does there just need to be a new release?

glever commented 6 years ago

Indeed, seems to be just a release issue. The plugin is unavailable on mavenCentral or the mulesoft repos. I cloned raml-for-jax-rs and did a mvn clean install, after which I could use it following the instructions on the raml-to-jaxrs-gradle-plugin project page.

olkow commented 6 years ago

I'm yet another person who is affected by the missing jaxrs-to-raml-gradle-plugin artefact at mavenCentral or mulesoft mvn repos. As for other users the procedure:

  1. clone the raml-for-jax-rs,
  2. do mvn install

results in the jaxrs-to-raml-gradle-plugin jar being installed in my local repo. Such state of things is fine for a school project, however, at my work it not acceptable.

As @glever suggested this seems to be just a release issue. Mulesoft guys, do you have any plan to release the jaxrs-to-raml-gradle-plugin to mavenCentral?

huyuwen commented 6 years ago

Any progress on this issue? There is still no correct release in Maven Central or Mulesoft.

jpbelang commented 6 years ago

That is the issue we are working on. It should result in a 3.0.2 release.

jpbelang commented 6 years ago

Could anybody check to see if the 3.0.2-SNAPSHOT version of the gradle plugin is available in the Mulesoft repo ?

huyuwen commented 6 years ago

There is no gradle plugin (3.0.2) released in either of the following links. https://repository.mulesoft.org/snapshots/org/raml/jaxrs/ https://repository.mulesoft.org/releases/org/raml/jaxrs/

It is not possible to search such plugin from search.maven.org

jpbelang commented 6 years ago

I see them here

https://repository-master.mulesoft.org/nexus/content/repositories/snapshots/org/raml/jaxrs/jaxrs-to-raml-gradle-plugin/ https://repository-master.mulesoft.org/nexus/content/repositories/snapshots/org/raml/jaxrs/raml-to-jaxrs-gradle-plugin/

@jstoiko is this the right place ? (It's where I see all the snapshots...)

soberich commented 6 years ago

My 5 cents are ... Won't that be great to have it on gradle-plugin portal .. to just get it like this

plugins {
...
}

?

edeandrea commented 6 years ago

Hello Mule team - any updates on this 10 months later? This leaves the entire Gradle community in limbo for the time being.

jpbelang commented 6 years ago

It's there.