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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:39:08+00:00 2026-05-23T10:39:08+00:00

I have a web-app configured with a pom.xml. This web-app relies on another maven

  • 0

I have a web-app configured with a pom.xml.
This web-app relies on another maven module that produce a jar file. When i check the produced jar file size it is 8Ko. When i check this same jar file in my /lib web application, it is 5Ko.

A bunch of classes are simply ignored when the jar file reaches my /lib directory,
causing ClassNotFoundException when runing the web application.

Why is my jar trimmed ?

Web-app pom.xml

<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>
<parent>
    <artifactId>record</artifactId>
    <groupId>com.company.record</groupId>
    <version>1.0.0</version>
</parent>
<groupId>com.company.record</groupId>
<artifactId>record-webapp</artifactId>
<packaging>war</packaging>
<name>record-webapp</name>
<version>1.0.0</version>

<dependencies>
    <!-- JSF 2.0 -->
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-api</artifactId>
        <version>2.0.3-b02</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.sun.faces</groupId>
        <artifactId>jsf-impl</artifactId>
        <version>2.0.3-b02</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <!-- Primefaces -->
    <dependency>
        <groupId>org.primefaces</groupId>
        <artifactId>primefaces</artifactId>
        <version>2.2</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.primefaces.themes</groupId>
        <artifactId>redmond</artifactId>
        <version>1.0.0</version>
    </dependency>

    <!-- Internal dependencies -->
    <dependency>
        <groupId>com.company.record</groupId>
        <artifactId>record-dao</artifactId>
        <version>1.0.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
</dependencies>

<build>
    <finalName>record</finalName>
    <plugins>
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>jboss-maven-plugin</artifactId>
            <version>1.5.0</version>
            <configuration>
                <serverName>web</serverName>
            </configuration>
        </plugin>
    </plugins>
</build>

<repositories>
    <repository>
        <id>prime-repo</id>
        <name>Prime Technology Maven Repository</name>
        <url>http://repository.prime.com.tr</url>
        <layout>default</layout>
    </repository>
</repositories>

record-dao pom.xml

<project
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<parent>
    <artifactId>record</artifactId>
    <groupId>com.company.record</groupId>
    <version>1.0.0</version>
</parent>

<groupId>com.company.record</groupId>
<artifactId>record-dao</artifactId>
<version>1.0.0</version>
<packaging>jar</packaging>
<name>record-dao</name>

<dependencies>
    <!-- Hibernate -->
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>3.6.4.Final</version>
        <exclusions>
            <exclusion>
                <artifactId>cglib</artifactId>
                <groupId>cglib</groupId>
            </exclusion>
            <exclusion>
                <artifactId>antlr</artifactId>
                <groupId>antlr</groupId>
            </exclusion>
            <exclusion>
                <artifactId>jta</artifactId>
                <groupId>javax.transaction</groupId>
            </exclusion>
            <exclusion>
                <artifactId>commons-collections</artifactId>
                <groupId>commons-collections</groupId>
            </exclusion>
            <exclusion>
                <artifactId>hibernate-commons-annotations</artifactId>
                <groupId>org.hibernate</groupId>
            </exclusion>
        </exclusions>
    </dependency>

    <!-- Postgresql -->
    <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>8.3-606.jdbc4</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>

    <!-- Internal dependencies -->
    <dependency>
        <groupId>com.company.record</groupId>
        <artifactId>record-commun</artifactId>
        <version>1.0.0</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
</dependencies>

  • 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-23T10:39:08+00:00Added an answer on May 23, 2026 at 10:39 am

    I finally find a solution. In the web-app/web-inf/lib directory, there was a jar file who was sharing the same name with the dependent jar file.

    For a reason I don’t understand, maven-war-plugin used to take this old jar file rather than the freshly one I installed in my local repository.

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

Sidebar

Related Questions

In the web.xml of my web app I have configured the server as following:
I have a web app in production that is used for typical data entry,retrieval,
We have an web app that is talking to Netsuite via Netsuite's web services.
I have a web app that I've recently applied a jQuery ThemeRoller theme to.
I have a web app that lets a client define a daily rate for
We have a web-app, that we're deploying to a remote Ubuntu server. The app
I have a large web app in vb.net 4.0. Its default namespace is configured
I have manually configured my org.eclipse.wst.common.component to deploy my web-app via Eclipse WTP from
I have recently inherited a J2EE Struts web app that was written back in
I'm integrating Gigya with a web app running Acegi. I have it working that

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.