I’m a .NET developer who needs to use the Java platform for a new project.
“Solutions” are a useful Visual Studio concept. How do I break my Java solution into “projects” (I guess Java packages) which have build interdependencies in the same source control repository?
We’re planning to use Maven for third-party dependencies, and Scala for writing some of the libraries.
We also need to be IDE-independent.
Recommendations gratefully received!
Edit: Let us assume the solution will contain a web application, a console application, and a library written in Scala.
I have set up a similar model that you can study.
By using Maven it will be as IDE-agnostic as it can. You will not have to store any specific IDE settings in your VCS, just the source code and the pom files. Each developer will launch his IDE and point to the top pom and the project should load. Local settings will be created but should be ignored when committing to the VCS.
First of all a multi module Maven project will most definitely have a very similar layout as a C# solution with its projects. The top-folder with the parent-pom will be like the solution with the shared configurations and build order etc. Then the sub-folders with the sub-poms will match the project definitions with dependencies between other projects.
directory layoutpom.xmlscala/pom.xmlconsole/pom.xmlweb/pom.xmlscala/src/main/scala/com/stackoverflow/Q11226363/ScalaApp.scalaconsole/src/main/java/com/stackoverflow/Q11226363/JavaApp.javaThat has been tested by me. There can of course be some improvements to the pom files and dependencies but it is a good start.
If you look in the
web/targetyou will find yourwebapp.warwhich will include the dependencies needed.It is of course possible to split all these modules up and build them separately and still have dependencies between them but as I said it is a good starting point.