Answer the question
In order to leave comments, you need to log in
Maven, war and scope = provided not working?
In general, there is a web project.
Assembled by maven.
In war.
I use a couple of libraries, but I need to use them with scope = provided, that is, do not include the library classes in the final war.
The problem is this: maven-war-plugin didn't care what I want there.
Still includes libraries in war.
If you switch the project to jar, everything is correct, you get a small jar.
Who knows how to convince this stubborn donkey?
I'm wildly sorry, I did mvn clean, everything is ok.
Damn, he couldn't have done it himself, could he?
Answer the question
In order to leave comments, you need to log in
You have an error somewhere. I just tried:
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
<scope>provided</scope>
</dependency>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.1.1</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question