java - [TestNG][Jar] Set Classpath in Manifest (Class-Path) -- classpath is ignored? -
i'm trying run simple testng test case residing within jar file, contains test , manifest:
ex.) test.jar contains: { meta-inf\ meta-inf\manifest.mf tests\ tests\test01.class }
i trying run using command: java org.testng.testng - testjar test.jar testng.xml
where folder contains (all in same directory): test.jar testng.xml testng-6.1.1.jar
and manifest contains (w/ line-break @ end): manifest-version: 1.0 created-by: willie owens class-path: testng-6.1.1.jar test.jar .
and noclassdeffounderror: org/testng/testng. not find main class.
if specify classpath using -cp after "java" (ex. java -cp testng-6.1.1.jar;test.jar org.testng.testng -testjar test.jar testng.xml) works, want information in manifest. doing wrong here?
also, i've tried every variation think of when typing in class-path, such as: ./testng-6.1.1.jar .\testng-6.1.1.jar ...etc..
help
executing test-jar not complex testng please refer [1] more detail.
lease let me know if find pitfalls .
[1] http://dharshanaw.blogspot.com/2012/10/how-to-execute-testng-tests-in-side.html
Comments
Post a Comment