Coder Social home page Coder Social logo

Comments (1)

tinesoft avatar tinesoft commented on June 16, 2024 1

Hry @Edison-Hsu

Thanks for using the plugin!

Regarding your question, first of all, there is no @nxrocks/nx-spring-boot:gradle executor. What the plugin does out-of-the-box, is to define a set of executors for default tasks that are available in a SpringBoot project managed by Gradle.

Now, if you define custom gradle tasks in your project, you still can add them as target in your project.json.

And as you guess, you will have to use the generic nx:run-commands executor to run the underlying task.

Here is an example:

    "my-custom-target": {
      "executor": "nx:run-commands",
      "options": {
        "command": "./gradlew my-custom-task --argument-1",
        "cwd": "apps/path/to/my/project/root",
      }
    }

Note:

  • nx:run-commands is the new and shorter name of the @nrwl/workspace:run-commands executor, you can use one or the other , based on your version of Nx
  • you have to set the "cwd" (current working directory) option of nx:run-commands executor, so that the ./gradlew command (inside the project) is found
  • using ./gradlew and nx:run-commands you shouldn't have to worry about cross-platform compatibility issues,

Here is a real-life example of. project that uses nxrocks/nx-spring-boot with custom gradle targets.

Hope it helps

from nxrocks.

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.