aboutsummaryrefslogtreecommitdiffstats
path: root/subprojects/sonar-update-center/sonar-packaging-maven-plugin/src/it/doNotPackageDepsProvidedBySonar/verify.bsh
blob: f451481ac5ff93895d4d43da5d01d0735b00b726 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import java.io.*;
import java.util.zip.*;

File file = new File( basedir, "target/test-1.0.jar" );
if (!file.isFile()) {
  throw new FileNotFoundException( "Could not find generated JAR: " + file );
}

ZipFile zipFile = new ZipFile(file);
try {
  if (zipFile.getEntry("META-INF/lib/commons-lang-2.5.jar")!=null) {
    throw new FileNotFoundException("The dependency commons-lang must not be copied in the plugin");
  }
} finally {
  zipFile.close();
}