'Maven dependency commanted jars are generated in war file

I'm trying to generate the war file , war generated successfully but when i decompress and check the jars inside lib , the commented Maven dependencies also appears on it.

How to resolve this issue

Ex:

<!--  
<dependency> <groupId>org.hibernate</groupId> <artifactId>hibernatecore </artifactId> <version>5.6.8.Final</version> </dependency>
-->

This commented hibernate jar appears in war.

I tried mvn clean , clean install, -X clean install , package also run maven upadte with force no results found Can any one help me please



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source