{"record":{"id":"019f8437f506958c","repo":"apache/beam","slug":"cannot-pull-dev-versions-of-jars-please-run-gradlew-v-to","errorCode":null,"errorMessage":"cannot pull dev versions of JARs, please run \"gradlew %v\" to start your expansion service","messagePattern":"cannot pull dev versions of JARs, please run \"gradlew (.+?)\" to start your expansion service","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/xlangx/expansionx/download.go","lineNumber":358,"sourceCode":"}\n\nfunc (j *jarGetter) getJar(gradleTarget, version string) (string, error) {\n\tstrippedTarget := dropEndOfGradleTarget(gradleTarget)\n\tfullURL, jarName := j.getURLForBeamJar(strippedTarget, version)\n\n\terr := os.MkdirAll(j.jarCache, 0700)\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\n\tjarPath := filepath.Join(j.jarCache, jarName)\n\n\tif jarExists(jarPath) {\n\t\treturn jarPath, nil\n\t}\n\n\tif strings.Contains(version, \".dev\") {\n\t\treturn \"\", fmt.Errorf(\"cannot pull dev versions of JARs, please run \\\"gradlew %v\\\" to start your expansion service\",\n\t\t\tgradleTarget)\n\t}\n\n\t// Issue warning when downloading from public repositories\n\tfullURLStr := string(fullURL)\n\tif strings.Contains(fullURLStr, \"repo.maven.apache.org\") ||\n\t\tstrings.Contains(fullURLStr, \"repo1.maven.org\") ||\n\t\tstrings.Contains(fullURLStr, \"maven.google.com\") ||\n\t\tstrings.Contains(fullURLStr, \"maven-central.storage-download.googleapis.com\") {\n\t\tlog.Printf(\"WARNING: Downloading JAR file from public repository: %s. \"+\n\t\t\t\"This may pose security risks or cause instability due to repository availability. Consider pre-staging dependencies or using private mirrors.\", fullURLStr)\n\t}\n\n\tresp, err := http.Get(string(fullURL))\n\tif err != nil {\n\t\treturn \"\", err\n\t}\n\tdefer resp.Body.Close()","sourceCodeStart":340,"sourceCodeEnd":376,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/xlangx/expansionx/download.go#L340-L376","documentation":"getJar refuses to download JARs whose version string contains \".dev\" (dev/snapshot-style versions), telling the user to build and start the expansion service locally with gradlew <target> instead. Dev-version artifacts are not published to the public repositories the downloader queries.","triggerScenarios":"Using a Beam Go binary built from a dev/snapshot source (version like 2.XX.0.dev) and relying on automatic Java expansion service download (startAutomatedJavaExpansionService / xlang transforms) where the JAR is not already cached.","commonSituations":"Running a Beam Go pipeline built from source without first building the Java expansion service; CI using a nightly/dev Beam build; mispinned version in a custom repository that lacks dev artifacts.","solutions":["Run the suggested Gradle task locally: ./gradlew :sdks:java:extensions:<target-module>:runExpansionService (or the gradleTarget named in the error) so the JAR is cached.","Use a released Beam version (no \".dev\") so the JAR can be downloaded from Maven.","Pre-place the built JAR in the expected cache location so jarExists finds it.","Set up a local repository/mirror containing the dev artifact if you must use dev versions."],"exampleFix":"// before: dev Go binary expecting auto-download\nversion := \"2.62.0.dev\" // no public artifact exists\n// after: build the service once locally\n$ ./gradlew :sdks:java:container:expansion-service:shadowJar\n// or use a released version\nversion := \"2.62.0\"","handlingStrategy":"fallback","validationCode":"if strings.Contains(beamVersion, \".dev\") {\n    jarPath := filepath.Join(cacheDir, expectedJarName(gradleTarget, beamVersion))\n    if _, err := os.Stat(jarPath); err != nil {\n        // build it locally first: ./gradlew <gradleTarget>\n    }\n}","typeGuard":null,"tryCatchPattern":"jar, err := expansionx.GetBeamJar(gradleTarget, repo, version)\nif err != nil && strings.Contains(err.Error(), \"dev versions\") {\n    return startLocalGradleExpansionService(gradleTarget) // fallback path\n}","preventionTips":["Use released Beam versions in production pipelines.","Pre-build dev-version expansion service JARs via gradlew before running Go pipelines from source.","Pre-place the JAR in the expected cache path so download is skipped."],"tags":["go","versioning","gradle","dev-build","expansion-service"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}