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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:05:13+00:00 2026-05-12T10:05:13+00:00

I am having a project A being built with mvn assembly:assembly which gives me

  • 0

I am having a project A being built with mvn assembly:assembly which gives me a jar file with dependencies. This project basically gets a file path and converts it to XML.

Now I need to create a new project B which will wrap A by walking a directory and calling several times to A. NOTE: They must be different applications. I am not able to modify A changing it’s parameters.

I would like that when B builds, it will first build A and gets it’s jar file.

Which is the best way to configure this in a pom file? Should I have two poms?
Same pom but two jars being build?

Thanks for reading!

  • 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-05-12T10:05:13+00:00Added an answer on May 12, 2026 at 10:05 am

    I would handle this by adding an aggregator POM with A and B as modules. Then you simply build the aggregator each time to have A built before B. This gives you the flexibility to build A and B individually as well as both together.


    If you are determined to invoke A’s build from within B, it could be done by using the maven-exec-plugin to invoke another Maven instance.

    For example:

    <plugin>
      <groupId>org.codehaus.mojo</groupId>
      <artifactId>exec-maven-plugin</artifactId>
      <version>1.1</version>
      <executions>
        <execution>
          <goals>
            <goal>exec</goal>
          </goals>
        </execution>
      </executions>
      <configuration>
        <executable>mvn</executable>
        <!--specified as a property below-->
        <workingDirectory>${projectA.path}</workingDirectory>
        <arguments>
          <argument>clean</argument>
          <argument>install</argument>
        </arguments>
      </configuration>
    </plugin>
    
    ...
    
    <properties>
      <projectA.path>/path/to/project/a</projectA.path>
    </properties>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm having an excessively strange issue. I'm working on a project and it's being
Having a project with multiple submodules, how do I specify which module is the
I am having a project which will have country dropdown at the top to
Despite this project having worked for me for a while, I'm now getting an
I've got a project setup with Maven, being built in Hudson and artifacts deployed
I have this setup currently: Project A outputs a war file - has a
I'm having a build problem with a specific file that I'm not being able
Having a project with following requirements in mind. data reading intensive application. 100 max
I have a Delphi XE2 project having components like Label1 , BitBtn1 and Image1
I have web application Project having RPC call. one RPC async is working fine.

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.