khalilou88/jnxplus

[IDEA] Make project.json mandatory

khalilou88 opened this issue · 12 comments

The project.json file is not mandatory, the plugins add projects without project.json to the graph. But for more configuration, we need to create this file.

I am thinking about making this file mandatory, and raising an error if the file is messing.
For maven, we can check if project name and artifactId are the same.

We can create a project.json for the root project in wrapper folder so users can update namedInputs. And like this the maven/gradle root project is different from nx root project.

Create a generator to generate missing project.json files

Why is it required to have a root Pom.xml? Is this a limitation of the nxgraph api?

For me, maven multi modules works like this :https://spring.io/guides/gs/multi-module/

How about make root pom.xm minimal and move everything to another pom.xm?

With this solution there is no chance to modify it. I can show you this in a GitHub repo.

Also I am making the wrapper optional and you will have less files in the root folder

Making the wrapper optional is great.

In general, maven doesn’t require sub modules to be physically below the root Pom.

Im ok with an aggregator pom at the root. I assume it will not be added to the nx graoh. This pom also would never be published.

A few things would need to be added to this root Pom like repositories and the preprocessing plugins like the flatten plugin

But this is only needed by the provider and is not needed by the consumer

Any ETA on this. Should I review something?

If you speak about optional wrapper, this week. If you speak about mandatory project.json it's in draft mode because maybe it will just make the plugin complex

Wrapper is not urgent. Was just curious

@jbadeau your idea about moving the pom.xml is not bad. It's good to isolate maven projects.
I think the best idea is to have a variable : mavenRootDirectory and generate there all maven projects and wrapper if it's not optional. The problem here is you will not merge maven projects with other projects

How’s it going? Do u need any help. We have some large maven repos using your plugins maybe it helps with the design if u see how we work?

@jbadeau for project.json, maybe i will make it mandatory but not as described in this issue. project.json and pom.xml should be in the same folder.

generating maven projects in a subfolder, it's not hard, just i need to choose where to save mavenRootDirectory, first option inside nx.json or if i cant, i will try to put it in a env.file in root folder

will close this issue and create a new one. Please comment on the new one