testng: Missing directory entries in testng jar
TestNG Version
6.13.1
Description:
- Run
jar -tf testng-6.13.1.jar - All entries for directories are not packaged in the jar. This causes a problem while trying to get resources from classpath.
- In particular this causes problem in Arquillian integration with testng. See issue#comment
Expected behavior
META-INF/
META-INF/MANIFEST.MF
com/
com/beust/
com/beust/testng/
com/beust/testng/TestNG.class
org/
Actual behavior
com/beust/testng/TestNG.class
META-INF/services/org.testng.xml.ISuiteParser
org/testng/annotations/AfterClass.class
Test case sample
About this issue
- Original URL
- State: open
- Created 6 years ago
- Reactions: 1
- Comments: 40 (27 by maintainers)
@SomberOfShadow - The code snippet I shared will automatically ensure that the version of TestNG that is being resolved to is what will be used to obtain the path.
It is the entries for the directories that are missing for the JAR file, as listed in the “Expected behaviour”.
E.g.,
unzip -l testng-6.14.2.jargives:but it should give something like this instead:
I confirm that this causes a problem with Arquillian. If you merely unzip the testng-6.14.2.jar file to extract its contents, then use zip to create a new JAR file with the same contents, that JAR file does contain the directory entries, and it does then work with Arquillian.