-1
得到錯誤類未發現異常運行Java代碼 包名的Java方法主要是com.personal.cucumber.Maven_Try 類名是Try_Class不能運行使用maven
連接下面POM,並注意JDK設置在Java編譯器
http://maven.apache.org/xsd/maven-4.0.0.xsd「> 4.0.0
<groupId>com.personal.cucumber</groupId>
<artifactId>Maven_Try</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Maven_Try</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>2.53.1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
<addClasspath>true</addClasspath>
<mainClass>com.personal.cucumber.Maven_Try.Try_Class</mainClass>
</manifest>
<manifestEntries>
<Class-Path>../conf/</Class-Path>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
你真的開始了什麼命令?你的源碼樹怎麼樣?如果你打開jar包含類? – eckes