What do i need to do in IntelliJ so that my dependencies specified in the pom.xml are automatically added to the ..WEB-INF/lib folder?

79 views Asked by At

The project already uses maven framework. All dependencies specified in the pom.xml are injected in the External libraries folder. The problem is, because they are not present in the WEB-INF/lib folder, during deployment, errors are thrown that the classes in these jars do not exists. How can i configure intellij/what do i need to do so that this dependencies do not only exist in the External libraries folder, but also in the WEB-INF/lib folder? enter image description here

Here is the pom.xml:

<?xml version="1.0" encoding="UTF-8"?>

4.0.0

<groupId>com.xxx.abc</groupId>
<artifactId>Manager</artifactId>
<version>1.0-SNAPSHOT</version>

<packaging>war</packaging> <!--  maven-war-plugin -->


<properties>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
</properties>

<dependencies>
    <dependency>
        <groupId>commons-beanutils</groupId>
        <artifactId>commons-beanutils</artifactId>
        <version>1.9.4</version>
    </dependency>
    <dependency>
        <groupId>commons-collections</groupId>
        <artifactId>commons-collections</artifactId>
        <version>2.1</version>
    </dependency>
    <dependency>
        <groupId>commons-digester</groupId>
        <artifactId>commons-digester</artifactId>
        <version>2.1</version>
    </dependency>
    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.3.3</version>
    </dependency>
    <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>2.2</version>
    </dependency>
    <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>1.2</version>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
        <version>2.8.6</version>
    </dependency>
    <!--
    <dependency>
        <groupId>com.lowagie.com.lowagie</groupId>
        <artifactId>itext</artifactId>
        <version>2.1.7.js5</version>
    </dependency> -->
    <!-- Cannot find above version -->
    <dependency>
        <groupId>com.lowagie</groupId>
        <artifactId>itext</artifactId>
        <version>2.1.7</version>
    </dependency>
    <dependency>
        <groupId>jakarta.servlet</groupId>
        <artifactId>jakarta.servlet-api</artifactId>
        <version>4.0.3</version>
    </dependency>
    <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>5.0.4</version>
    </dependency>
    <dependency>
        <groupId>jfree</groupId>
        <artifactId>jcommon</artifactId>
        <version>1.0.15</version>
    </dependency>
    <dependency>
        <groupId>jfree</groupId>
        <artifactId>jfreechart</artifactId>
        <version>1.0.12</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>4.13.2</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-api</artifactId>
        <version>2.13.1</version>
    </dependency>
    <dependency>
        <groupId>org.apache.logging.log4j</groupId>
        <artifactId>log4j-core</artifactId>
        <version>2.13.1</version>
    </dependency>

    <!-- Below are javax dependencies -->
    <!-- https://mvnrepository.com/artifact/org.glassfish/javax.annotation -->
    <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.annotation</artifactId>
        <version>3.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.glassfish/javax.ejb -->
    <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.ejb</artifactId>
        <version>3.1</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.glassfish.main.javaee-api/javax.jms -->
    <dependency>
        <groupId>org.glassfish.main.javaee-api</groupId>
        <artifactId>javax.jms</artifactId>
        <version>3.1.2.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/javax.persistence/javax.persistence-api -->
    <dependency>
        <groupId>javax.persistence</groupId>
        <artifactId>javax.persistence-api</artifactId>
        <version>2.2</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/javax.resource/javax.resource-api -->
    <dependency>
        <groupId>javax.resource</groupId>
        <artifactId>javax.resource-api</artifactId>
        <version>1.7</version>
    </dependency>

    <!-- https://mvnrepository.com/artifact/org.glassfish/javax.servlet -->
    <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.servlet</artifactId>
        <version>3.1</version>
    </dependency>
    <!-- https://mvnrepository.com/artifact/javax.servlet.jsp/jsp-api -->
    <dependency>
        <groupId>javax.servlet.jsp</groupId>
        <artifactId>jsp-api</artifactId>
        <version>2.1</version>
        <!--<scope>provided</scope>-->
    </dependency>

    <!-- https://mvnrepository.com/artifact/javax.servlet.jsp.jstl/jstl-api -->
    <dependency>
        <groupId>javax.servlet.jsp.jstl</groupId>
        <artifactId>jstl-api</artifactId>
        <version>1.2</version>
    </dependency>

    <dependency>
        <groupId>javax.transaction</groupId>
        <artifactId>javax.transaction-api</artifactId>
        <version>1.2-b01</version>
    </dependency>

</dependencies>
0

There are 0 answers