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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:38:22+00:00 2026-06-08T19:38:22+00:00

I have a multi-module maven 2 project which uses assemblies (via maven-assembly-plugin at the

  • 0

I have a multi-module maven 2 project which uses assemblies (via maven-assembly-plugin at the package phase) to package each module in a certain way. I am then trying to use another module to combine these assemblies into a distributable “installer” package. For the installer module I can see the default jar from my other projects but nothing I do seems to give me access to the extra assemblies. It seems from the documentation that this should be possible so I assume I’m either doing something wrong or it’s a bug in Maven? I’ve been stuck with this for several days now so any help would be appreciated!

Following on from a comment I have created a test project on github to demonstrate the this, the proj1 module creates 2 jar files. I would expect the assembly generated in the “package” module to include them both but it doesn’t it just includes the main project jar.

https://github.com/unluckypixie/maven-packaging-test

Please note: I know the content of the jars for proj1 one are the same in this example – but they are not in my real life situation, I don’t think what is in the proj1 files is relevant to the problem.

if you run:

mvn clean package

And do ls proj1/target/*.jar you should see:

proj1/target/proj1-1.0-SNAPSHOT.jar
proj1/target/proj1-1.0-SNAPSHOT-proj1-assembly.jar

If you look in the package jar :

jar -tvf package/target/package-1.0-SNAPSHOT-package-assembly.jar

You will see something like:

     0 Mon Jul 30 16:27:00 BST 2012 META-INF/
   106 Mon Jul 30 16:26:58 BST 2012 META-INF/MANIFEST.MF
     0 Mon Jul 30 16:21:46 BST 2012 package/
  2358 Mon Jul 30 16:21:44 BST 2012 package/proj1-1.0-SNAPSHOT.jar
  2363 Mon Jul 30 16:21:46 BST 2012 package/package-1.0-SNAPSHOT.jar

I want to know how why the proj1/target/proj1-1.0-SNAPSHOT-proj1-assembly.jar is not in there too.

The packaging assembly looks like this:

<assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">

    <id>package-assembly</id>

    <formats>
        <format>jar</format>
    </formats>

    <includeBaseDirectory>false</includeBaseDirectory>

    <moduleSets>
        <moduleSet>
            <useAllReactorProjects>true</useAllReactorProjects>

            <includes>
                <include>org.test.parent:*</include>
            </includes>

            <binaries>
                <outputDirectory>/package/</outputDirectory>
                <unpack>false</unpack>
            </binaries>
        </moduleSet>
    </moduleSets>
</assembly>
  • 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-08T19:38:24+00:00Added an answer on June 8, 2026 at 7:38 pm

    I have managed to get this working by using the attachmentClassifier in my assembly file, e.g:

        <moduleSet>
            <useAllReactorProjects>true</useAllReactorProjects>
    
            <includes>
                <include>org.me:*</include>
            </includes>
    
            <binaries>
                <outputDirectory>/output/dir</outputDirectory>
                <unpack>false</unpack>
                <includeDependencies>false</includeDependencies>
                <attachmentClassifier>my-assembly</attachmentClassifier>
            </binaries>
        </moduleSet>
    

    Thanks to khmarbaise for your help, I might not have used your solution but it helped me get there!

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

Sidebar

Related Questions

We have a multi-module maven project that uses a profile that defines a buildnumber-maven-plugin
I have a project in which the maven-enforcer rule fails with a multi-module build
I am using soapUI maven plugin to create a multi-module maven-soapUi project. I have
I have a big multi-module Maven project with thousands of tests. Each test loads
I have a huge multi-module project , which is being built using maven. Most
I have a multi module maven project which looks something like: main component_one subcomponent_bob
I have a multi-module maven project, and I'm trying to create an assembly for
I have created a multi module maven project. Now I have shared the project
I have a Maven multi-module project and I need two different parent POMs in
I have a multi module maven project and I would like to use versions

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.