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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:26:46+00:00 2026-05-26T08:26:46+00:00

i have a problem with maven built .war file. i have a dependency on

  • 0

i have a problem with maven built .war file.

i have a dependency on project’s POM which has the provided scope.

when for first time i try to run “package” goal on my project, maven does not
insert dependent jar file into final .war file.

and as i expected, when i remove the provided scope form the POM, maven includes dependent
jar file on final .war file (it is correct until this point).

but when i set provided scope for dependency again, maven still includes the dependent jar file in war package.!!!

i have tried clean:clean goal and also update snapshot switch
but it still goes wrong.

is it a bug? or i must do some configuration to avoid this.

i am using maven 3.0.3

this is POM:

<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>testmaven</groupId>
  <artifactId>testmaven</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <packaging>war</packaging>
  <name/>
  <description/>
  <dependencies>
    <dependency>
            <groupId>com.pardis.communicationcenter</groupId>
            <artifactId>communicationCenterCommon</artifactId>
            <version>1.0</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.pardis.communicationcenter</groupId>
            <artifactId>communicationCenterWSCommon</artifactId>
            <version>1.0</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.pardis.parameterengine</groupId>
            <artifactId>parameterenginecommon</artifactId>
            <version>1.0</version>
            <type>jar</type>
        </dependency>
            <dependency>
            <groupId>com.bea.weblogic</groupId>
            <artifactId>weblogic</artifactId>
            <version>1.0</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
            <version>1.3.1</version>
        </dependency>

        <dependency>
            <groupId>javaee</groupId>
            <artifactId>javaee-api</artifactId>
            <scope>provided</scope>
            <version>5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.5</version>
        </dependency>
        <dependency>
            <groupId>com.pardis.common</groupId>
            <artifactId>fanavaCommon</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.pardis.retail.common</groupId>
            <artifactId>rtlmgrCommon</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>com.pardis.retail.common</groupId>
            <artifactId>rtlmgrFast</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.pardis.job</groupId>
            <artifactId>jobschedulingclient</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>com.pardis.security</groupId>
            <artifactId>pincoding</artifactId>
            <version>1.0</version>
        </dependency>

        <dependency>
            <groupId>com.pardis.workflowengine</groupId>
            <artifactId>workflowenginegclient</artifactId>
            <version>1.0</version>
            <type>jar</type>
        </dependency>

        <dependency>
            <groupId>com.pardis.genericmanagedbean</groupId>
            <artifactId>genericManagedBeanCommon</artifactId>
            <version>1.0</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.myfaces.tomahawk</groupId>
            <artifactId>tomahawk</artifactId>
            <version>1.1.9</version>
        </dependency>
        <dependency>
            <groupId>com.pardis.common</groupId>
            <artifactId>SAD</artifactId>
            <version>1.6</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.pardis.common</groupId>
            <artifactId>accountDataProviderCommon</artifactId>
            <version>1.0</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.pardis.common</groupId>
            <artifactId>personDataProviderCommon</artifactId>
            <version>1.0</version>
            <type>jar</type>
        </dependency>
        <dependency>
            <groupId>com.pardis.bank</groupId>
            <artifactId>BankBusiness</artifactId>
            <version>1.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.myfaces.core</groupId>
            <artifactId>myfaces-impl</artifactId>
            <version>1.2.7</version>
        </dependency>

        <dependency>
            <groupId>com.pardis.batch</groupId>
            <artifactId>batchwebserviceclient</artifactId>
            <version>1.0</version>
        </dependency>

<dependency>
    <groupId>com.pardis.security</groupId>
    <artifactId>usermanagerclient</artifactId>
    <version>1.0</version>
    <type>jar</type>
</dependency>

<dependency>
    <groupId>com.pardis.cardmanager</groupId>
    <artifactId>crdmgrCommon</artifactId>
    <version>1.0</version>
</dependency>
  </dependencies>
  <build>
    <sourceDirectory>${basedir}/src</sourceDirectory>
    <outputDirectory>${basedir}/WebRoot/WEB-INF/classes</outputDirectory>
    <resources>
      <resource>
        <directory>${basedir}/src</directory>
        <excludes>
          <exclude>**/*.java</exclude>
        </excludes>
      </resource>
    </resources>
    <plugins>
      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <webappDirectory>${basedir}/WebRoot</webappDirectory>
          <warSourceDirectory>${basedir}/WebRoot</warSourceDirectory>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.6</source>
          <target>1.6</target>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

problem is about:

        <dependency>
            <groupId>com.bea.weblogic</groupId>
            <artifactId>weblogic</artifactId>
            <version>1.0</version>
            <type>jar</type>
            <scope>provided</scope>
        </dependency>

thanks in advance

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

    Which war are you looking at? Running mvn clean package will build a new war in your target directory, and that war won’t have any dependency in it whose scope is provided.

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

Sidebar

Related Questions

I have a war packaging Maven project, in which I have a Java properties
I have this .bat script which I use to maven package my application. Problem
I have a Spring framework based Java web application, which has been built in
I have a Maven project that was built a few years back, and now
I currently have a Java testing library which is built with Maven, and distributed
I've got a project which is built using Maven and Continuum. We've got several
So our new webapp project is based on maven. I'm really liking the dependency
Problem with Maven Dependency. Hello All, This is in reference to my earlier post
I have a big problem with my jenkins server: I Cant build a maven
With maven is it possible to have a top-level project who's packaging type is

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.