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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T22:37:47+00:00 2026-05-11T22:37:47+00:00

My assembly descriptor applies the includes and excludes correctly when the dependencies are included

  • 0

My assembly descriptor applies the includes and excludes correctly when the dependencies are included in the pom file directly.

However when I put the dependencies in the parent pom file the assembly:directory goal reports that the includes and excludes haven’t been triggered.

Do you know why maven-assembly-plugin ignores parent dependencies? How can I fix it?

Here are the maven and assembly descriptors:

Assembly descriptor:

<assembly>
  <id>distribution</id>
  <formats>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>
      <includes>
        <include>readme.txt</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>target</directory>
      <outputDirectory>/lib</outputDirectory>
      <includes>
        <include>*.jar</include>
      </includes>
    </fileSet>
  </fileSets>
  <dependencySets>
    <dependencySet>
      <outputDirectory>/lib</outputDirectory>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <excludes>
        <exclude>org.tanukisoftware:wrapper:exe:3.3.5</exclude>
      </excludes>
    </dependencySet>
    <dependencySet>
      <outputDirectory>/bin</outputDirectory>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <includes>
        <include>org.tanukisoftware:wrapper:exe:3.3.5</include>
      </includes>
    </dependencySet>
  </dependencySets>
</assembly>

Child POM assembly plugin definition:

    <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
            <ignoreDirFormatExtensions>true</ignoreDirFormatExtensions>
            <descriptors>
                <descriptor>assembly.xml</descriptor>
            </descriptors>
        </configuration>
        <executions>
            <execution>
                <id>make-assembly</id>
                <phase>package</phase>      
                <goals>
                    <goal>directory</goal>
                </goals>
            </execution>
        </executions>
    </plugin>

Parent POM dependencies:

<dependencies>
    <dependency>
        <groupId>org.tanukisoftware</groupId>
        <artifactId>wrapper</artifactId>
        <version>3.3.5</version>
        <type>dll</type>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.tanukisoftware</groupId>
        <artifactId>wrapper</artifactId>
        <version>3.3.5</version>
        <type>exe</type>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.tanukisoftware</groupId>
        <artifactId>wrapper</artifactId>
        <version>3.3.5</version>
        <scope>runtime</scope>
    </dependency>
</dependencies>

Warnings in the build report:

[assembly:directory {execution: make-assembly}]
Reading assembly descriptor: assembly.xml
Processing DependencySet (output=/lib)
[WARNING] The following patterns were never triggered in this artifact exclusion filter:
o  'org.tanukisoftware:wrapper:exe:3.3.5'

Processing DependencySet (output=/bin)
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o  'org.tanukisoftware:wrapper:exe:3.3.5'
  • 1 1 Answer
  • 3 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-11T22:37:48+00:00Added an answer on May 11, 2026 at 10:37 pm

    I don’t know if this will help, but what I always do is in the parent’s pom put the dependencies in a dependencyManagement block;

        <dependencyManagement>
        <!-- dependencies with exclusions -->
        <dependencies>
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring-aop</artifactId>
    
                <version>${version.springframework}</version>
    
                <exclusions>
                    <exclusion>
                        <groupId>commons-logging</groupId>
                        <artifactId>commons-logging</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
    

    Then, in the child pom, list the dependencies again, but without the version and exclusions

      <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
        </dependency>
    

    But to be honest, for my first and only assembly, I couldn’t get it to work in a child module and put it in the parent’s pom. Here’s my assembly file, for making a zip file for a standalone java program, run by cron:

    <?xml version="1.0" encoding="UTF-8"?>
    
    <assembly>
      <id>${project.layer}-both</id>
    
      <formats>
          <format>zip</format>
      </formats>
    
      <includeBaseDirectory>false</includeBaseDirectory>
    
      <baseDirectory>/</baseDirectory>
    
      <moduleSets>
          <moduleSet>
              <includes>
                  <include>edu.berkeley.ist.cars:cars_upload</include>
              </includes>
    
              <binaries>
                  <unpack>false</unpack>
                  <useStrictFiltering>true</useStrictFiltering>
                  <includeDependencies>true</includeDependencies>
                  <outputDirectory>upload</outputDirectory>
              </binaries>
          </moduleSet>
    
          <moduleSet>
              <includes>
                  <include>edu.berkeley.ist.cars:cars_download</include>
              </includes>
    
              <binaries>
                  <unpack>false</unpack>
                  <useStrictFiltering>true</useStrictFiltering>
                  <includeDependencies>true</includeDependencies>
                  <outputDirectory>download</outputDirectory>
              </binaries>
          </moduleSet>
      </moduleSets>
    
      <!--
          crontab.txt is put in twice, in both upload and download, just in case.
          -->
      <files>
          <!-- upload files -->
          <file>
              <source>src/stuff/scripts/cars_upload.sh</source>
              <lineEnding>unix</lineEnding>
              <filtered>true</filtered>
              <outputDirectory>upload</outputDirectory>
          </file>
    
          <file>
              <source>src/stuff/notes/crontab-${project.layer}.txt</source>
              <destName>crontab.txt</destName>
              <lineEnding>unix</lineEnding>
              <filtered>true</filtered>
              <outputDirectory>upload</outputDirectory>
          </file>
    
          <!-- download files -->
          <file>
              <source>src/stuff/scripts/cars_download.sh</source>
              <lineEnding>unix</lineEnding>
              <filtered>true</filtered>
              <outputDirectory>download</outputDirectory>
          </file>
    
          <file>
              <source>src/stuff/notes/crontab-${project.layer}.txt</source>
              <destName>crontab.txt</destName>
              <lineEnding>unix</lineEnding>
              <filtered>true</filtered>
              <outputDirectory>download</outputDirectory>
          </file>
      </files>
    </assembly>
    

    There are two top level directories in the zip file, upload and download.

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

Sidebar

Related Questions

I put together an assembly descriptor <assembly> <id>all</id> <formats> <format>zip</format> </formats> <includeBaseDirectory>false</includeBaseDirectory> <moduleSets> <moduleSet>
Maven assembly plugin has a predefined descriptor for jar-with-dependencies but not a jar-without-dependencies. I
Hi I need to assembly jars from multimodule project in master directory. Let us
I have configured my assembly descriptor to have an assembly of type jar by
I am trying to build an executable jar with maven-assembly-plugin with all the dependencies.
I have the multi module project this is the parent pom. <?xml version=1.0 encoding=UTF-8?>
When using the maven assembly plugin, can I specify a descriptor in the configuration
I'm using the Maven 2 assembly plug-in to build a jar-with-dependencies and make an
I'm using the maven-assembly-plugin to produce a zip file for some database scripts. I
I'm trying to build a single .jar file from a Maven project which includes

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.