lgrignon/jsweet-maven-plugin

Multiple Maven Modules

Closed this issue · 2 comments

Hello,

i would like to create a Java project with multiple Maven modules, which looks something like this:
-- project
---- pom.xml <-- root pom
---- modules
------ pom.xml <-- modules pom
------ module1
-------- pom.xml <-- module1 pom
-------- src
------ module2
-------- pom.xml <-- module2 pom
-------- src

Module1 is a dependency of module2. I had to put the step of jsweet into the modules pom.xml (module1 and module2). When i run mvn clean generate-sources, module1 transpiles, but in module2 i get an error from jsweet, that module1 is unknown.
Am i doing something wrong? How can i tell jsweet that module1 is a local dependency and is already transpiled?

When i put all the src files in one Maven project it transpiles just fine.
When i put the step into modules pom or root pom it doesn't work anymore.

And my second question would be: If i have multiple maven modules, is it in any way possible to tell maven just to compile and transpile module x, y and z and not all modules? The reason is, this project is a SDK with a lot of business logic and not every product needs all the modules. That's why i would like to only bundle the modules needed. For example mvn clean generate-sources -dModules=module-x,module-y,module-z

Thank you in advance,
Daniel

Hello,
Parent / child projects should be supported, please see this discussion
#37

And this simple example project
https://github.com/lgrignon/jsweet-parent-project-example/

I didn't try to use multiple dependent child projects but it should be possible, in a way :)
I guess that the simplest solution would be to try to make module1 a candy

Could you please try to do so and tell me if ok?

As an additional help, you can find many candies project examples here:
https://github.com/jsweet-candies