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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:34:33+00:00 2026-06-12T21:34:33+00:00

I’m trying to bundle up a java archive (JAR) with all dependencies self contained.

  • 0

I’m trying to bundle up a java archive (JAR) with all dependencies self contained. First I tried using the maven assembly plugin though this was missing some classes. The jar-with-dependencies documentation suggests using the maven-shade-plugin, which ends up missing different classes. I think what’s happening is that multiple dependencies using the same package names seem to get skipped, so things like slf4j get skipped.

What I’d really prefer is for the packaged jar to contain the libraries self-contained instead of repacking them.

I nearly gave up and figured I’d just use the bin descriptor for the assembly plugin which only zipped up the jar itself and no dependencies.

NOTE: I know that others have asked similar questions, which have resulted in suggestions for using shade/assembly plugins, though none have illustrated the specific problem I am having.

UPDATE: Requested by khmarbaise the following shows one POM where ALL classes get skipped. Note that there is another JAR which uses the same package structure but is the localised bundle, localised bundles are included but all classes are omitted.

<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
                             http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.ddtek</groupId>
  <artifactId>openedge</artifactId>
  <packaging>jar</packaging>
  <version>10.1C04</version>
  <name>openedge</name>
  <url>http://progress.com</url>
  <dependencies>
    <dependency>
      <groupId>com.ddtek</groupId>
      <artifactId>base</artifactId>
      <version>10.1C04</version>
    </dependency>
    <dependency>
      <groupId>com.ddtek</groupId>
      <artifactId>util</artifactId>
      <version>10.1C04</version>
    </dependency>
  </dependencies>
</project>

Note that the above POM is a third-party library that does not publish to maven and only exists in our local nexus repo.

  • 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-12T21:34:35+00:00Added an answer on June 12, 2026 at 9:34 pm

    If no predefined descriptor suites your needs, you can write your own assembly.

    To include dependencies, you specify something like

    <dependencySets>
        <dependencySet>
          <outputDirectory>/lib</outputDirectory>
          <useProjectArtifact>false</useProjectArtifact>
          <useTransitiveDependencies>true</useTransitiveDependencies>
          <unpack>false</unpack>
           <scope>runtime</scope>
        </dependencySet>
      </dependencySets>
    

    and in your pom something like:

    <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-assembly-plugin</artifactId>
            <version>2.3</version>
            <configuration>
              <descriptors>
                <descriptor>assembly.xml</descriptor>
              </descriptors>
            </configuration>
            <executions>
              <execution>
                <id>make-assembly</id> <!-- this is used for inheritance merges -->
                <phase>package</phase> <!-- bind to the packaging phase -->
                <goals>
                  <goal>single</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
    

    and then customize, following your requirements.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I have thousands of HTML files to process using Groovy/Java and I need to
I'm making a simple page using Google Maps API 3. My first. One marker
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

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.