Reputation: 95
The console message from IDE is:
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] --- maven-jar-plugin:2.3.2:jar (default-jar) @ maven ---
[INFO] Building jar: C:\Documents and Settings\ grandcanyonlab \Desktop \workspace \selenium_mvn_googlesearch \target\maven-0.0.1-SNAPSHOT.jar
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install (default-install) @ maven ---
[INFO] Installing C:\Documents and Settings \grandcanyonlab \Desktop \workspace \selenium_mvn_googlesearch\target\maven-0.0.1-SNAPSHOT.jar to C:\Documents and Settings \grandcanyonlab\.m2\repository\org\apache\maven\maven\0.0.1-SNAPSHOT\maven-0.0.1-SNAPSHOT.jar
[INFO] Installing C:\Documents and Settings \grandcanyonlab \Desktop \workspace \selenium_mvn_googlesearch\pom.xml to C:\Documents and Settings\grandcanyonlab\.m2\repository\org\apache\maven\maven\0.0.1-SNAPSHOT\maven-0.0.1- SNAPSHOT.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.360s
[INFO] Finished at: Tue Oct 07 17:25:31 PDT 2014
[INFO] Final Memory: 6M/15M
[INFO] ------------------------------------------------------------------------
My POM.XML File is:
<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>org.apache.maven</groupId>
<artifactId>maven</artifactId>
<version>0.0.1-SNAPSHOT</version>
</project>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.43.0</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
It shows Build success but doesn't have the Test Run set to 1. It says 0. and I am not able to find the .jar file in the target folder. It shows the mycompany.app.Apptest . Am I doing anything wrong while compiling the code?
Upvotes: 3
Views: 2481
Reputation: 8859
It seems that you try to build the main maven project: org.apache.maven.maven:<version>
.
Note that this project is by default only a pom, not a JAR. Meaning, <packaging>pom</packaging>
.
Why do you try to rebuild maven? Is it on purpose? If not, change your groupId/ArtifactId... and make sure that <packaging>jar</packaging>
.
HTH
Upvotes: 2