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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:14:57+00:00 2026-05-27T10:14:57+00:00

Im trying to setup what I think is a simple assembly, taking the jars

  • 0

Im trying to setup what I think is a simple assembly, taking the jars from several modules and putting them in a specific folder inside a zip. The resulting assembly should look like so:
ir4job\
ir4job\app_lib\
ir4job\app_lib\ jar files go here

But maven is giving me an empty zip file when the assembly is generated

Assembly descriptor:

<assembly>
  <!-- ir4job folder contents -->
  <id>ir4job-app</id>
  <formats>
    <format>zip</format>
  </formats>
  <includeBaseDirectory>false</includeBaseDirectory>

  <moduleSets>
    <moduleSet>
      <binaries>
        <dependencySets>
          <dependencySet>
            <outputDirectory>ir4job/app_lib</outputDirectory>
          </dependencySet>
        </dependencySets>
      </binaries>
    </moduleSet>
  </moduleSets>
</assembly>

pom file:

<project>
  <modelVersion>4.0.0</modelVersion>

  <groupId>glb</groupId>
  <artifactId>Release</artifactId>
  <packaging>pom</packaging>
  <name>release</name>
  <version>1.0</version>

  <parent>
.... parent info ....
  </parent>

  <dependencies>
... various dependencies ...
  </dependencies>

  <build>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>

        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
          <descriptors>
            <descriptor>ir4job-app.xml</descriptor>
          </descriptors>
        </configuration>
        <executions>
          <execution>
            <id>do-release</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>
</project>

Im pretty sure I missed something simple here… what is it?

  • 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-27T10:14:58+00:00Added an answer on May 27, 2026 at 10:14 am

    At first glance, it seems you are missing the filesets to include. For example:

    <assembly>
        <id>ir4job-app</id>
        <formats>
            <format>zip</format>
        </formats>
        <includeBaseDirectory>false</includeBaseDirectory>
    
        <fileSets>
            <fileSet>
                <directory>path/to/folder/relative/to/project/root/ir4job/app_lib</directory>
                <outputDirectory>ir4job/app_lib</outputDirectory>
                <includes>
                    <include>*.jar</include>
                </includes>
            </fileSet>
        </fileSets>
    </assembly>
    

    You will need a fileset for each directory you want to include (unless they fall under the same parent directory). The syntax for that is something like:

    ...
    <includeBaseDirectory>true</includeBaseDirectory>
    ....
    <fileSet>
        <directory>path/to/folder/relative/to/project/root/ir4job</directory>
        <includes>
            <include>**/*.jar</include>
        </includes>
    </fileSet>
    ...
    

    edit #1:

    Working example of using the maven-dependency-plugin to copy dependencies to a folder:

             <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-dependencies-for-assembly</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/libs</outputDirectory>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
    

    Note: you can also limit the dependencies that get copied using configuration options such as

    ...
    <configuration>
        ...
        <includeGroupIds>com.mycompany,org.springframework,org.hibernate</includeGroupIds>
    </configuration>
    ...
    

    You can also limit by artifactId, classifier, etc.


    edit #2:

    Solution

    The better answer is probably just to pull your dependencySet tag up a couple levels as in:

    <assembly>
        <!-- ir4job folder contents -->
        <id>ir4job-app</id>
        <formats>
            <format>zip</format>
        </formats>
        <includeBaseDirectory>false</includeBaseDirectory>
    
        <dependencySets>
            <dependencySet>
                <outputDirectory>ir4job/app_lib</outputDirectory>
            </dependencySet>
        </dependencySets>
     </assembly>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to get setup with Ruby on Rails today, but I think
I am trying to setup a simple demo of activemq and mina. I edited
dHi, I'm trying to setup my IIS server (6.0) to serve files from a
I am trying to implement a simple plist example from Beginning iPhone 3 Development
I'm trying to install a simple python library I created and think I may
I am trying to setup a simple function which will make it a lot
trying to run this program. I think that to setup all of the web
I'm trying to implement a simple TPH example from http://msdn.microsoft.com/en-us/library/dd793152.aspx . I have two
I'm trying setup a subset of boost and get it properly compiled using bjam,
Trying to setup an SSH server on Windows Server 2003. What are some good

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.