Is it possible to have in the same solution a project in Java, another in Python and another in Scala? Or all the projects must be either in Java either in Scala?
-
2What is a Maven "solution"?Thilo– Thilo2019-07-23 08:06:49 +00:00Commented Jul 23, 2019 at 8:06
-
A Maven solution is the one that is described using a pom.xml file. In such solution we might have sub-projects as modules. These modules are run together using an aggregator (a parent project). So can modules be of different languages? ThanksFarah– Farah2019-07-23 08:18:50 +00:00Commented Jul 23, 2019 at 8:18
-
1@Farah That's called a project (POM is Project Object Model).Alexey Romanov– Alexey Romanov2019-07-23 10:26:13 +00:00Commented Jul 23, 2019 at 10:26
-
Yes @AlexyRomanov I only used the term solution to indicate having multiple components aggregated by a pom parent and not a single project.Farah– Farah2019-07-23 13:30:37 +00:00Commented Jul 23, 2019 at 13:30
1 Answer
You can mix Java and Scala in a single Maven project. Read the following tutorial for more information:
Python and Maven: well python doesn't need to be compiled like Java or Scala code does. Instead, python project building is about resolving dependencies, running unit tests, creating installables and so on. Unfortunately, python has its own way of doing these things that different from Maven. To the extent that it probably doesn't make much sense for Maven to manage python code.
Having said that, you can "lightly integrate" python into a Maven build system by having Maven run a setup.py script as an external command. Here is an article that describes this approach: