7

Where can I get/download groovy-all-4.0.0.jar containing all the important Groovy 4.0 modules/classes in one file?

Till now I've found only a pom file, but I cannot use Maven.

https://repo1.maven.org/maven2/org/apache/groovy/groovy-all/4.0.0/groovy-all-4.0.0.pom

Jost Schwider
  • 73
  • 1
  • 7
  • 1
    There is no groovy-all jar. You might create an empty maven project with groovy-all pom dependency, execute mvn compile and look to local m2, all related jars will be downloaded to corresponding directory. Or you can start from using https://mvnrepository.com/artifact/org.apache.groovy/groovy/4.0.0 groovy-jar without extra modules.. and add additional jars if needed. Anyway, all the groovy-all related jars listed in groovy-all pom.xml. – Max Daroshchanka Feb 05 '22 at 18:02
  • Thanx a lot for your answer! – Jost Schwider Feb 05 '22 at 22:53
  • On the Groovy download page (https://groovy.apache.org/download.html) a groovy-all is mentioned several times - but not offered on the site. Because I cannot use Maven: Is there no other way to get/create an groovy-all.jar? Maybe an online service? – Jost Schwider Feb 05 '22 at 23:02
  • Because of groovy project design, its distributed as a group of `.jars`. Most of them are mentioned in groovy-all pom file which just groups them to be easily added as maven dependency. If you not able to use maven, you have to refer all the jars, all of them are present in groovy sdk package wich available on dowloads page. Creating a single jar from all groovy jars sounds like a task which nobody do on practice, since working with multiple jars even without maven it's a common case. If it doesn't work for you, you can ask a new question about combining multiple jars to a single. – Max Daroshchanka Feb 06 '22 at 07:12
  • Or maybe someone more experienced in groovy project internal structure will help, because I'm not a groovy contributor. – Max Daroshchanka Feb 06 '22 at 07:14
  • https://stackoverflow.com/questions/14350150/how-to-combine-multiple-jars-into-one – Max Daroshchanka Feb 06 '22 at 07:32
  • 1
    Thanx a lot for your helpful comments! – Jost Schwider Feb 08 '22 at 11:08

2 Answers2

1

Go to Maven Central's search page:

https://search.maven.org/

Type groovy-all. Select the latest version. Click on "Browse" on the top-right.

You'll get to this page:

https://repo1.maven.org/maven2/org/apache/groovy/groovy-all/4.0.0/

From here, you can copy the links to all jars and download that by clicking on it or using wget, curl or what have you.

EDIT: the groovy-all module on Maven Central is now a POM module. This means it's just grouping all the Groovy jars (most of them, actually). As announced on the Groovy 2.5 release notes, the groovy-all jar is no longer published. That is, you're expected to use a tool like Maven, Gradle or Ivy to download the jars from the groovy-all Maven artifact (as the transitive dependencies must be downloaded as well).

I suggest you use mvn dependency:get to download all the dependencies (unfortunately, it will only install the artifacts in the local maven repository instead of on a single directory like you probably want), or use Gradle like this:

repositories {
  mavenCentral()
}
configurations {
  groovy
}
dependencies {
  groovy 'org.apache.groovy:groovy-all:4.0.0'
}
task downloadGroovy(type: Copy) {
  from configurations.groovy
  into file('groovy-jars')
}

Put this into a build.gradle file, then from the same directory, run gradle downloadGroovy. It will download all the jars into the groovy-jars directory.

Notice, however, that this is almost certainly not what you want. You most likely should pick and choose which groovy jars you actually need and only download those.

Here's the list of Jars I get when I use Gradle to download the jars:

ant-1.10.12.jar                     groovy-datetime-4.0.0.jar           groovy-templates-4.0.0.jar          jline-2.14.6.jar
ant-antlr-1.10.12.jar               groovy-docgenerator-4.0.0.jar       groovy-test-4.0.0.jar               junit-4.13.2.jar
ant-junit-1.10.12.jar               groovy-groovydoc-4.0.0.jar          groovy-test-junit5-4.0.0.jar        junit-jupiter-api-5.8.2.jar
ant-launcher-1.10.12.jar            groovy-groovysh-4.0.0.jar           groovy-xml-4.0.0.jar                junit-jupiter-engine-5.8.2.jar
asm-9.2.jar                         groovy-jmx-4.0.0.jar                groovy-yaml-4.0.0.jar               junit-platform-commons-1.8.2.jar
asm-analysis-9.2.jar                groovy-json-4.0.0.jar               hamcrest-core-1.3.jar               junit-platform-engine-1.8.2.jar
asm-tree-9.2.jar                    groovy-jsr223-4.0.0.jar             ivy-2.5.0.jar                       junit-platform-launcher-1.8.2.jar
asm-util-9.2.jar                    groovy-macro-4.0.0.jar              jackson-annotations-2.13.1.jar      opentest4j-1.2.0.jar
groovy-4.0.0.jar                    groovy-nio-4.0.0.jar                jackson-core-2.13.1.jar             org.abego.treelayout.core-1.0.3.jar
groovy-ant-4.0.0.jar                groovy-servlet-4.0.0.jar            jackson-databind-2.13.1.jar         picocli-4.6.2.jar
groovy-cli-picocli-4.0.0.jar        groovy-sql-4.0.0.jar                jackson-dataformat-yaml-2.13.1.jar  qdox-1.12.1.jar
groovy-console-4.0.0.jar            groovy-swing-4.0.0.jar              javaparser-core-3.24.0.jar          snakeyaml-1.28.jar

This includes everything Groovy needs to run as a CLI, REPL, grab dependencies with Ivy, compile code at runtime etc. Do you need all that? If you do, then go ahead and use groovy-all, otherwise, it's advisable to look for the jars you actually are going to use.

Renato
  • 12,940
  • 3
  • 54
  • 85
  • Thanx a lot for this great answer! I will see, how I can manage all this to collect/build the fatjar. I really had hoped that someone has already done all this - someone with knowledge in Maven or Gradle. BTW: The goal is to put it in some Tomcat libs, so Groovlets are working, independently of the dependencies... Our administrator don't like to put a bunch of jars there... – Jost Schwider Feb 08 '22 at 11:01
-2

The official website, link below, has the 4.0. https://groovy.apache.org/download.html

it comes with the improved JPMS support, Switch expressions and more.

UgoIvy
  • 12
  • 3