gretty-gradle-plugin / gretty

Advanced gradle plugin for running web-apps on jetty and tomcat.
MIT License
129 stars 36 forks source link

Unable to build project using gretty version 2.3.1 #269

Closed nileshkhaire closed 2 years ago

nileshkhaire commented 2 years ago

I am not able to build project using gretty version 2.3.1 .

image

I searched for this library on the maven central and it seems that version 2.3.1 is not exist. Does it mean version deleted from Maven central ? As per my knowledge this is not a good practice.

image

Unfortunately, I don't want to upgrade to latest version or newer version for some reasons. Is there possibility to use version 2.3.1

Thank you .

f4lco commented 2 years ago

Hello @nileshkhaire!

I searched for this library on the maven central and it seems that version 2.3.1 is not exist. Does it mean version deleted from Maven central ? As per my knowledge this is not a good practice.

We never published Gretty 2.x to Maven Central, that is why you cannot find it. Back in the day, we published to JCenter / Bintray repositories. I'm sorry to break the news to you, but Bintray was sunset in May 2021. See #192 and the announcement: https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter/

It looks like mvnrepository still maintains some of the links, which are dead by now:

image

https://mvnrepository.com/artifact/org.gretty/gretty-runner-jetty?repo=jcenter

I suppose your best option is to build from source, and perhaps to deploy to your local Maven repository on your machine, or to deploy the artifacts to a (company internal) private repository.

nileshkhaire commented 2 years ago

Thank you for quick r4esponse @f4lco .

I tried to build from source but I see errors .

Command I used: gradle.bat build

* What went wrong:
A problem occurred configuring project ':libs:gretty'.
> Failed to notify project evaluation listener.
   > org.gradle.api.publish.maven.internal.publication.MavenPublicationInternal.getPublishableFiles()Lorg/gradle/api/file/FileCollection;

Is there any documentation on how to build the project ? Unfortunately, I didn't find it .

Thank you :)

f4lco commented 2 years ago

I have no trouble building on macOS. Please make sure to set Java 8 as JDK, and check with ./gradlew -version(or your platform's equivalent). For me, ./gradlew publishMavenJavaPublicationToMavenLocal appears to be working:

$ ll ~/.m2/repository/org/gretty/gretty/2.4.0-SNAPSHOT/
total 2032
-rw-r--r--  1 falco  staff   210K Oct  6 15:49 gretty-2.4.0-SNAPSHOT-javadoc.jar
-rw-r--r--  1 falco  staff    60K Oct  5 23:13 gretty-2.4.0-SNAPSHOT-sources.jar
-rw-r--r--  1 falco  staff   734K Oct  6 15:49 gretty-2.4.0-SNAPSHOT.jar
-rw-r--r--  1 falco  staff   2.1K Oct  6 15:49 gretty-2.4.0-SNAPSHOT.pom
-rw-r--r--  1 falco  staff   1.1K Oct  6 15:49 maven-metadata-local.xml

I see that the build task includes integration tests, you may omit those. They are not relevant to using the Gretty plugin, and may have accumulated code rot over the years (and when it's just the failure to cope changes in operating systems).

nileshkhaire commented 2 years ago

Hello @f4lco ,

I am still getting the same error. This could be because of proxy or restriction to run executables (like .exe or .dll ) .

As there are lot of efforts involved in building from source finally we have decided to upgrade gretty to 3.0.5 . And it is working fine, obviously we had to upgrade to Tomcat 9 .

So I am closing this ticket . Hope it is okay for you.

Thank you for your quick support and building this awesome plugin. :)

f4lco commented 2 years ago

Hope it is okay for you.

Sure thing 😄 Thank you for your feedback @nileshkhaire, I really appreciate it. It's been a pleasure, I wish you and your team the best.