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 9312435
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T01:37:47+00:00 2026-06-19T01:37:47+00:00

I have an existing web project which currently uses Ant. I have tasks that:

  • 0

I have an existing web project which currently uses Ant. I have tasks that:

  • create the jar based on only certain packages for other applications which use this project as a dependency
  • create the war file for the app

and a lot of others.

Separately I have a webservice project which uses the jar built by the previous application. This project uses Maven.

Now what I want to achieve is to move the first project to Maven, break it into core and web, and then move the webservice project into the first one.
So the result will be a multi-module project:

  • core
  • ui
  • webservice

Is it possible to move the sources that deal with the web delivery mechanism into the ui module (which will be a war in Maven), or I need to keep the sources in the core?

What would the best approach to do this be?

Should I look into Maven profiles?

I am a novice with Maven, so I am unsure on how to approach this.

  • 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-19T01:37:48+00:00Added an answer on June 19, 2026 at 1:37 am

    Yes you can achieve what you want with Maven. I would break the modules like this:

    Core:

    <groupId>com.myapp</groupId>
    <artifactId>core</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>jar</packaging>
    

    UI:

    <groupId>com.myapp</groupId>
    <artifactId>ui</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    
    <!-- Dependends on core -->
    <dependency>
        <groupId>com.myapp</groupId>
        <artifactId>core</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
    

    Web service:

    <groupId>com.myapp</groupId>
    <artifactId>ws</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>
    
    <!-- Also Dependends on core -->
    <dependency>
        <groupId>com.myapp</groupId>
        <artifactId>core</artifactId>
        <version>1.0-SNAPSHOT</version>
    </dependency>
    

    Main Project:

    <groupId>com.myapp</groupId>
    <artifactId>myapp</artifactId>
    <packaging>pom</packaging>
    <version>1.0-SNAPSHOT</version>
    
    <modules>
        <module>core</module>
        <module>ui</module>
        <module>ws</module>
    </modules>
    

    Then, in Core / UI and Web service you declare myapp as the parent:

    <parent>
        <groupId>com.myapp</groupId>
        <artifactId>myapp</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    

    For further info refer to:

    • Introduction to the POM: Particularly: Inheritance and Project Aggregation
    • Maven by Example: Chapter 6. A Multi-module Project: For a sample project
    • Multi-modules projects: For the folder structure
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a custom HttpModule rewrite engine in an existing web application project that
I have an existing project that consumes web services. One was added as a
We already have an existing MSI Installer (web deployment project - .vdproj) that we
I have a simple task. I have an existing project with a web service
I have an existing web app that has a data layer and a bll
I have an existing application that imports data from a web site api into
I have a silverlight application that I am embedding in an existing ASP.NET web
I have existing code that uses CMNewProfileSearch to find then iterate over the color
I have a really tricky task to do: there is an existing web project
I'm currently working a project which based on spring MVC, it's just a standard

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.