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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T08:49:44+00:00 2026-05-13T08:49:44+00:00

first of all: my Maven knowledge is limited so please bear with me. ;-)

  • 0

first of all: my Maven knowledge is limited so please bear with me. 😉 I have a simple Maven Project currently consisting of three modules. The module containing the core of the application is called core (Creative name, huh? :-)) and the other modules are basically plugins for this core module. There is one restriction: Only one plugin can be added to the core module.

The core module has its own Spring IoC configuration minus the plugin configuration. This is quite simple: The core code will read a bean named “plugin” which is not defined in the core configuration. The plugin modules will ship their own configuration files which will supply a bean named “plugin” which is then used by the core code. This fits perfectly in my use-case.

I want to provide the Admin, which will deploy the system, a simple way to build a distribution containing the core, a selected plugin and a reasonable default configuration. Maybe a tar.gz or something like that. I don’t want him to dig though my Spring IoC files, copy them together, etc. etc. The actual configuration like TCP/IP ports are done in property files.

To clarify what i mean I’ve build an example structure. Note that the filenames are for explanation purposes only.

/bin/core.jar [Build from core module]  
/bin/plugin.jar [Build from a plugin module]

/lib-bin/library-required-by-plugin.jar [Dependency resolved by maven + copy]
/lib-bin/library-required-by-core.jar [Dependency resolved by maven + copy]
/lib-bin/another-library-required-by-core.jar [Dependency resolved by maven + copy]

/etc/spring/core-beans.xml [Copied from core module /etc/]
/etc/spring/plugin.xml [Copied from plugin module /etc/]
/etc/default-core-config.properties [Copied from core module /etc/]
/etc/default-plugin-config.properties [Copied from plugin module /etc/]

I currently mess around with the assembly plugin but i seem to go round in circles and nothing works. Pretty frustrating. If you need any more information or do not get my point feel free to ask. 🙂

Addition to clarify my question: How to do that? (Well, its just that simple :-)) As I stated before, my knowledge of Maven is limited and currently i’m getting nowhere, even if I know that the assembly plugin might be the way to go. Especially how to get the dependencies from each module, where to configure the plugin (In the parent project?) and even a bit of an assembly descriptor would help a lot.

Thank you for all your input!

  • 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-13T08:49:44+00:00Added an answer on May 13, 2026 at 8:49 am

    I used the assembly plugin to package a distribution of a command line application as follows:

    • Define assembly plugin in pom,
      this includes binding the plugin to the package phase of the build life-cycle
    <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.2-beta-3</version>
        <configuration>
            <descriptors>
                <descriptor>src/main/assembly/bin.xml</descriptor>
            </descriptors>
        </configuration>
        <executions>
            <execution>
                <id>assembly</id>
                <phase>package</phase>
                <goals>
                    <goal>assembly</goal>
                </goals>
            </execution>
        </executions>
    </plugin>
    
    • Define the assembly descriptor, i.e. specify the contents and structure of your distributable archive, here’s mine below:
    <assembly>
      <id>bin</id>
      <includeBaseDirectory>false</includeBaseDirectory>
      <formats>
          <format>zip</format>
      </formats>
      <fileSets>
          <fileSet>
              <directory>target</directory>
              <includes>
                  <include>ctmemapi.properties</include>
                  <include>ctmxml/*</include>
                  <include>scampa</include>
                  <include>*.bat</include>
                  <include>*.sh</include>
              </includes>
              <outputDirectory>${project.artifactId}-${project.version}</outputDirectory>
              <fileMode>755</fileMode>
          </fileSet>
          <fileSet>
              <directory>target</directory>
              <includes>
                  <include>scampa*.jar</include>
              </includes>
              <outputDirectory>${project.artifactId}-${project.version}/lib</outputDirectory>
              <fileMode>644</fileMode>
          </fileSet>
          <fileSet>
              <directory>src/test/data</directory>
              <outputDirectory>${project.artifactId}-${project.version}/test-data</outputDirectory>
              <fileMode>644</fileMode>
          </fileSet>
      </fileSets>
      <dependencySets>
          <dependencySet>
              <outputDirectory>${project.artifactId}-${project.version}/lib</outputDirectory>
              <fileMode>644</fileMode>
          </dependencySet>
      </dependencySets>
    </assembly>
    
    • Create the assembly with either of the following commands

      mvn assembly:assembly
      mvn package
      mvn install
      mvn deploy

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

Sidebar

Related Questions

I have a maven-managed project with some modules. One module contains some native codes
I have a project with several modules. When all tests pass, Maven test runs
I have a multi-module project using Maven. On one of the modules I have
I have a traditional maven setup with parent project and a number of modules
I currently have a project built with maven-archetype-webapp artifact. The default packaging for this
I have a multi-module maven project. In every module there are unit tests. When
I have a project that uses the normal Maven structure, e.g. module \ src
I have a really simple webapp project with maven and jetty that has been
I have two maven projects, the second project extends some classes of first project.
First of all, apologize because I have seen some posts about this, but I

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.