Maven: JAR will be empty - no content was marked for inclusion | Selenium Forum
J
Jai Jagadeesha Posted on 11/06/2021

Hi Ashish,

I have a problem with maven. When I run the command mvn package I get the following warning:

[WARNING] JAR will be empty - no content was marked for inclusion!

The build is successful but the produced jar-file is empty as the warning says.

Why is this and what am I doing wrong?

Here is my 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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>MavenDemoTest</groupId>
<artifactId>MavenDemoTest</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>

<name>MavenDemoTest</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>

</dependencies>
</project>

 

 

Thanks

Jai


J
Jai Jagadeesha Replied on 12/06/2021

Hi 

Any reponse for it

Thanks


A
Ashish Thakur Replied on 15/06/2021

Please use maven from eclipse once and try to run project