Git Product home page Git Product logo

Comments (6)

markelliot avatar markelliot commented on June 21, 2024

gradlew doesn't run in the target environment, it's part of the gradlew distribution.

from sls-packaging.

ash211 avatar ash211 commented on June 21, 2024

Then the bug must be elsewhere. Repro steps:

  1. Set JAVA_OPTS to -Dhello=hi|touch my-file-here
  2. Restart the service
  3. Observe that my-file-here is created in the Java service's working directory

I have a service named alchemist-foundry that has a shell script located at service/bin/alchemist-foundry that looks rather similar to the gradlew script here, though with a different header:

##############################################################################
##
##  alchemist-foundry start up script for UN*X
##
##############################################################################

At the bottom that script contains these lines which seem to be where the bug is:

# Split up the JVM_OPTS And ALCHEMIST_FOUNDRY_OPTS values into an array, following the shell quoting and substitution rules
function splitJvmOpts() {
    JVM_OPTS=("$@")
}
eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $ALCHEMIST_FOUNDRY_OPTS

This must be used as part of the Gradle default start script task defined at https://github.com/palantir/gradle-java-distribution#packaging

from sls-packaging.

markelliot avatar markelliot commented on June 21, 2024

Ok, so it’s a bug in Gradle’s generated shell script. We could look at moving away from Gradle’s generated shell script, we probably want to do some things differently than it does anyway.

from sls-packaging.

ash211 avatar ash211 commented on June 21, 2024

Specifically https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt added in commit gradle/gradle@a7a8fec

from sls-packaging.

markelliot avatar markelliot commented on June 21, 2024

@uschi2000 is tracking this one

from sls-packaging.

markelliot avatar markelliot commented on June 21, 2024

Resolved in #85. We have another couple of updates to make before releasing, but this has now been addressed.

from sls-packaging.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.