railpack

Configure and troubleshoot Railpack builds, with emphasis on RAILPACK_* environment variables, railpack.json overlays, build-plan inspection, local CLI installation and usage, and local BuildKit containers. Use for Railpack provider configuration, custom install/build/start commands, Mise or Apt packages, build or runtime variables and secrets, generated-plan debugging, BUILDKIT_HOST errors, or running Railpack from a release or source checkout.

Install
npx skills add 'https://github.com/railwayapp/railpack/tree/main/.'
Incomplete bundle · no download
main · 21a254fScanned 2026-09-17

Contributors

GitHub-linked commit authors for this SKILL.md at the saved revision. Co-authors and history before file renames are not included.

File history ↗

core/providers/java/maven.go

core/providers/java/maven.goBrowse 1970 files
View on GitHub
← Back to SKILL.md
package java import (	"strings" 	"github.com/railwayapp/railpack/core/generate") const MAVEN_CACHE_KEY = "maven" func (p *JavaProvider) getMavenExe(ctx *generate.GenerateContext) string {	if ctx.App.HasFile("mvnw") && ctx.App.HasFile(".mvn/wrapper/maven-wrapper.properties") {		return "./mvnw"	} 	return "mvn"} func (p *JavaProvider) mavenCache(ctx *generate.GenerateContext) string {	return ctx.Caches.AddCache(MAVEN_CACHE_KEY, ".m2/repository")} func getMavenPortConfig(ctx *generate.GenerateContext) string {	pomFile, err := ctx.App.ReadFile("pom.xml") 	if err != nil {		return ""	} 	if strings.Contains(pomFile, "<groupId>org.wildfly.swarm") {		// If using the Swarm web server, set the port accordingly for any passed-in $PORT variable		return "-Dswarm.http.port=$PORT"	} else if strings.Contains(pomFile, "<groupId>org.springframework.boot") &&		strings.Contains(pomFile, "<artifactId>spring-boot") {		// If using Spring Boot, set the port accordingly for any passed-in $PORT variable		return "-Dserver.port=$PORT"	}	return ""}