tinesoft / nxrocks

Set of Nx plugins to enhance your Nx workspace (even more!)
MIT License
307 stars 34 forks source link

Linking is failing with nx-spring-boot link command [Bug] #188

Closed mauricio-toledo closed 11 months ago

mauricio-toledo commented 1 year ago

Plugin Name

@nxrocks/nx-spring-boot

Nx Report

I've two existing spring boot applications that I want to link to my Nx workspace using the following command:

nx g @nxrocks/nx-spring-boot:link --sourceProjectName <your-boot-app> --targetProjectName <your-other-app>

But I got an error of Cannot find configuration for '../my-spring-boot-app'. What am I missing here?

Expected Behaviour

It should create a new application inside my workspace

Actual Behaviour

Error prompt that there is no configuration for the project.

Steps to reproduce the behaviour

  1. yarn create nx-workspace
  2. yarn add @nxrocks/nx-spring-boot --dev
  3. nx g @nxrocks/nx-spring-boot:link --sourceProjectName workspace-monorepo --targetProjectName my-spring-boot-app
tinesoft commented 12 months ago

Hi @mauricio-toledo

Thanks for using the plugin!

I'm not sure I understand the scenario you described...

The link generator is meant to create an implicit link between a Spring boot project (the source) and a target project , that can be any Angular, React, ...or other , mostly frontend project that depends on the Spring boot app.

A typical example is to implicitly connect a boot app ( serving an API for example), to the frontend app that uses that API.

For regular spring-boot projects, maybe you want to make one a spring-boot library project, that you can just import (as a dependency), in the other spring-boot application ?