This is an automated email from the ASF dual-hosted git repository. cziegeler pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-slingfeature-maven-plugin.git
The following commit(s) were added to refs/heads/master by this push: new a91761e SLING-9889 : Slingfeature-Maven-Plugin: Fix failing ITs a91761e is described below commit a91761e3e10df9d76ae8001b8d98ab1e63732e59 Author: Carsten Ziegeler <cziege...@apache.org> AuthorDate: Tue Nov 10 13:40:03 2020 +0100 SLING-9889 : Slingfeature-Maven-Plugin: Fix failing ITs --- .../verify.groovy | 21 ++++----------------- src/it/apis-jar-wrapper-bundle/pom.xml | 2 ++ src/it/apis-jar-wrapper-bundle/verify.groovy | 2 +- 3 files changed, 7 insertions(+), 18 deletions(-) diff --git a/src/it/apis-jar-wrapped-flattened-classes/verify.groovy b/src/it/apis-jar-wrapped-flattened-classes/verify.groovy index 96a4705..e038641 100644 --- a/src/it/apis-jar-wrapped-flattened-classes/verify.groovy +++ b/src/it/apis-jar-wrapped-flattened-classes/verify.groovy @@ -40,31 +40,18 @@ import org.codehaus.plexus.util.*; Manifest manifest= jarFile.getManifest(); String exportPackageHeader = manifest.getMainAttributes().getValue("Export-Package"); - if (exportPackageHeader.indexOf("org.apache.lucene.analysis.standard") < 0) { + if (exportPackageHeader.indexOf("org.apache.jackrabbit.oak.plugins.index.lucene") < 0) { System.out.println("FAILED!"); - System.out.println("Export-Package header '" + exportPackageHeader + "' does not contain 'org.apache.lucene.analysis.standard' in bundle " + baseApiJar); + System.out.println("Export-Package header '" + exportPackageHeader + "' does not contain 'org.apache.jackrabbit.oak.plugins.index.lucene' in bundle " + baseApiJar); return false; } - JarEntry jarEntry = jarFile.getJarEntry("org/apache/lucene/analysis/standard/StandardAnalyzer.class"); + JarEntry jarEntry = jarFile.getJarEntry("org/apache/jackrabbit/oak/plugins/index/lucene/OakAnalyzer.class"); if (jarEntry == null) { System.out.println("FAILED!"); - System.out.println("Entry 'org/apache/lucene/analysis/standard/StandardAnalyzer.class' does not exist in bundle " + file); + System.out.println("Entry 'org/apache/jackrabbit/oak/plugins/index/lucene/OakAnalyzer.class' does not exist in bundle " + file); } - bytecodeStream = jarFile.getInputStream(jarEntry); - ByteArrayOutputStream baos = new ByteArrayOutputStream(); - byte[] buf = new byte[1024]; - int len = 0; - while ((len = bytecodeStream.read(buf)) >= 0) { - baos.write(buf, 0, len); - } - - if (!baos.toString().contains("#(Lorg/apache/lucene/util/Version;)V")) { - System.out.println("FAILED!"); - System.out.println("Expected org.apache.lucene.analysis.standard.StandardAnalyzer class containing a constructor with 'org.apache.lucene.util.Version' argument"); - return false; - } } finally { if (jarFile != null) { jarFile.close(); diff --git a/src/it/apis-jar-wrapper-bundle/pom.xml b/src/it/apis-jar-wrapper-bundle/pom.xml index 1ecf87e..441c7ef 100644 --- a/src/it/apis-jar-wrapper-bundle/pom.xml +++ b/src/it/apis-jar-wrapper-bundle/pom.xml @@ -38,6 +38,8 @@ </execution> </executions> <configuration> + <generateSourceJar>false</generateSourceJar> + <generateJavadocJar>false</generateJavadocJar> <selection> <filesInclude>**/*.json</filesInclude> </selection> diff --git a/src/it/apis-jar-wrapper-bundle/verify.groovy b/src/it/apis-jar-wrapper-bundle/verify.groovy index 8a37926..5e3af58 100644 --- a/src/it/apis-jar-wrapper-bundle/verify.groovy +++ b/src/it/apis-jar-wrapper-bundle/verify.groovy @@ -39,7 +39,7 @@ import org.codehaus.plexus.util.*; Manifest manifest= jarFile.getManifest(); String exportPackageHeader = manifest.getMainAttributes().getValue("Export-Package"); - if (exportPackageHeader.indexOf("com.google.gson.stream;version=\"2.8.4\"") < 0) { + if (exportPackageHeader.indexOf("com.google.gson.stream;version=2.8.4") < 0) { System.out.println("FAILED!"); System.out.println("Export-Package header '" + exportPackageHeader + "' does not contain 'com.google.gson.stream;version=\"2.8.4\"' in bundle " + baseApiJar); return false;