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

  • Home
  • SEARCH
  • 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 7555339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:34:52+00:00 2026-05-30T11:34:52+00:00

We have this in our pom <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>2.3.2</version> <executions> <execution> <id>assembly</id> <phase>package</phase>

  • 0

We have this in our pom

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <version>2.3.2</version>
            <executions>
                <execution>
                    <id>assembly</id>
                    <phase>package</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                    <configuration>
                        <excludes>
                            <exclude>app/**</exclude>
                            <exclude>WEB-INF/**</exclude>
                        </excludes>
                    </configuration>
                </execution>
                <execution>
                    <id>assembly-web</id>
                    <phase>package</phase>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                    <configuration>
                        <classifier>web</classifier>
                        <includes>
                            <include>app/**</include>
                            <include>WEB-INF/**</include>
                        </includes>
                    </configuration>
                </execution>
            </executions>
        </plugin>

When I open the xxx-web.jar it looks as expected, but when I look at xxx.jar it includes everything/didn’t exclude anything. If I were to add a classified to the 1st plugin (the one with the excludes) then it works properly???

I want this to work in such a way that the xxx.jar has all the class and property files and the xxx-web only has the jsp/css files.

  • 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-30T11:34:53+00:00Added an answer on May 30, 2026 at 11:34 am

    Take a look at 7.1.6 in this maven document. Basically you need to bind to the default goal of “default-jar”.

    HTH

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

Sidebar

Related Questions

I have this lines under our pom.xml file <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <jdkLevel>1.6</jdkLevel>
I'm trying to reduce copy/pasting in our maven pom files. We have one master
We have this constant discussion in our project as to the granularity of our
We have this anonymous function in our code, which is part of the jQuery's
In our data access layer at work we have this standard implementation where the
Our VSS setup is like this: We have a set of unique folders with
In our code we used to have something like this: *(controller->bigstruct) = ( struct
In many places in our application we have code like this: using(RAPI rapi =
In our code we have quite a few cases of this pattern: class outerClass
So we have our J2EE application using Log4j like this public class CustomerController {

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.