Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8173881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:18:41+00:00 2026-06-06T22:18:41+00:00

I’m a .NET developer who needs to use the Java platform for a new

  • 0

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T22:18:42+00:00Added an answer on June 6, 2026 at 10:18 pm

    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 layout

    +- pom.xml
    +- scala
    | +- pom.xml
    | +- src
    |   +- main
    |     +- scala
    +- console
    | +- pom.xml
    | +- src
    |   +- main
    |     +- java
    +- web
      +- pom.xml
      +- src
        +- main
         +- java
         +- resources
         +- webapp
           +- WEB-INF
             -- web.xml
    

    pom.xml

    <project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <groupId>com.stackoverflow</groupId>
        <artifactId>Q11226363</artifactId>
        <version>1.0-SNAPSHOT</version>
        <packaging>pom</packaging>
    
        <name>${project.artifactId}-${project.version}</name>
    
        <properties>
            <scala.version>2.9.2</scala.version>
        </properties>
    
        <modules>
            <module>scala</module>
            <module>web</module>
            <module>console</module>
        </modules>
    
        <dependencyManagement>
            <dependencies>
                <!-- Inter-Module dependencies -->
                <dependency>
                    <groupId>com.stackoverflow</groupId>
                    <artifactId>Q11226363-scala</artifactId>
                    <version>${project.version}</version>
                </dependency>
                <dependency>
                    <groupId>org.scala-lang</groupId>
                    <artifactId>scala-library</artifactId>
                    <version>${scala.version}</version>
                </dependency>
            </dependencies>
        </dependencyManagement>
    
        <repositories>
            <repository>
                <id>scala-tools.org</id>
                <name>Scala Tools Maven2 Repository</name>
                <url>http://scala-tools.org/repo-releases</url>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>scala-tools.org</id>
                <name>Scala Tools Maven2 Repository</name>
                <url>http://scala-tools.org/repo-releases</url>
            </pluginRepository>
        </pluginRepositories>
    
    </project>
    

    scala/pom.xml

    <project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <parent>
            <groupId>com.stackoverflow</groupId>
            <artifactId>Q11226363</artifactId>
            <version>1.0-SNAPSHOT</version>
        </parent>
    
        <artifactId>Q11226363-scala</artifactId>
    
        <name>${project.artifactId}-${project.version}</name>
    
        <dependencies>
            <dependency>
                <groupId>org.scala-lang</groupId>
                <artifactId>scala-library</artifactId>
            </dependency>
        </dependencies>
    
        <build>
            <sourceDirectory>src/main/scala</sourceDirectory>
    
            <plugins>
                <plugin>
                    <groupId>org.scala-tools</groupId>
                    <artifactId>maven-scala-plugin</artifactId>
                    <executions>
                        <execution>
                            <id>compile</id>
                            <goals>
                                <goal>compile</goal>
                            </goals>
                            <phase>compile</phase>
                        </execution>
                        <execution>
                            <id>test-compile</id>
                            <goals>
                                <goal>testCompile</goal>
                            </goals>
                            <phase>test-compile</phase>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </build>
    </project>
    

    console/pom.xml

    <project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <parent>
            <groupId>com.stackoverflow</groupId>
            <artifactId>Q11226363</artifactId>
            <version>1.0-SNAPSHOT</version>
        </parent>
    
        <artifactId>Q11226363-console</artifactId>
    
        <name>${project.artifactId}-${project.version}</name>
    
        <dependencies>
            <dependency>
                <groupId>com.stackoverflow</groupId>
                <artifactId>Q11226363-scala</artifactId>
            </dependency>
        </dependencies>
    
    </project>
    

    web/pom.xml

    <project xmlns="http://maven.apache.org/POM/4.0.0"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
        <modelVersion>4.0.0</modelVersion>
    
        <parent>
            <groupId>com.stackoverflow</groupId>
            <artifactId>Q11226363</artifactId>
            <version>1.0-SNAPSHOT</version>
        </parent>
    
        <artifactId>Q11226363-web</artifactId>
        <packaging>war</packaging>
    
        <name>${project.artifactId}-${project.version}</name>
    
        <dependencies>
            <dependency>
                <groupId>com.stackoverflow</groupId>
                <artifactId>Q11226363-scala</artifactId>
            </dependency>
        </dependencies>
    
        <build>
            <finalName>webapp</finalName>
    
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-war-plugin</artifactId>
                    <version>2.2</version>
                </plugin>
            </plugins>
        </build>
    
    </project>
    

    scala/src/main/scala/com/stackoverflow/Q11226363/ScalaApp.scala

    /**
     * @author maba, 2012-06-28
     */
    package com.stackoverflow.Q11226363
    
    class ScalaApp {
      def helloScala():String = "Hello from Scala!"
    }
    

    console/src/main/java/com/stackoverflow/Q11226363/JavaApp.java

    package com.stackoverflow.Q11226363;
    
    /**
     * @author maba, 2012-06-28
     */
    public class JavaApp {
        public static void main(String[] args) {
            ScalaApp scalaApp = new ScalaApp();
            System.out.println("Scala says: " + scalaApp.helloScala());
        }
    }
    

    That 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/target you will find your webapp.war which 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.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I have thousands of HTML files to process using Groovy/Java and I need to
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I have a jquery bug and I've been looking for hours now, I can't
That's pretty much it. I'm using Nokogiri to scrape a web page what has

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.