}
}
zipFile = new ZipFile(rarFile);
boolean exsitNativeFile = false;
Connector connector = null;
ArrayList<String> names = new ArrayList<String>();
ArrayList<String> xmls = new ArrayList<String>();
Enumeration<? extends ZipEntry> zipEntries = zipFile.entries();
while (zipEntries.hasMoreElements())
{
ZipEntry ze = (ZipEntry) zipEntries.nextElement();
String name = ze.getName();
names.add(name);
if (name.endsWith(".xml") && name.startsWith("META-INF") && !name.endsWith("pom.xml"))
xmls.add(name);
if (name.endsWith(".so") || name.endsWith(".a") || name.endsWith(".dll"))
exsitNativeFile = true;
if (name.equals(RAXML_FILE))
{
InputStream raIn = zipFile.getInputStream(ze);
RaParser parser = new RaParser();
connector = parser.parse(raIn);
raIn.close();
}
}
root = getRoot(rarFile);
cl = loadClass(cps);
// Annotation scanning
if (scanArchive(connector))
{
Annotations annotator = new Annotations();
AnnotationScanner scanner = AnnotationScannerFactory.getAnnotationScanner();
AnnotationRepository repository = scanner.scan(cl.getURLs(), cl);
connector = annotator.merge(connector, repository, cl);
}
if (connector == null)
{
System.out.println("can't parse ra.xml");
System.exit(OTHER);
}
if (stdout)
{
out = System.out;
}
else if (!reportFile.isEmpty())
{
out = new PrintStream(reportFile);
}
else
{
out = new PrintStream(rarFile.substring(0, rarFile.length() - 4) + REPORT_FILE);
}
String archiveFile;
int sep = rarFile.lastIndexOf(File.separator);
if (sep > 0)
archiveFile = rarFile.substring(sep + 1);
else
archiveFile = rarFile;
out.println("Archive:\t" + archiveFile);
String version;
String type = "";
ResourceAdapter ra = connector.getResourceadapter();
boolean reauth = false;
if (connector.getVersion() == Version.V_10)
{
version = "1.0";
type = "OutBound";
reauth = ra.getOutboundResourceadapter().getReauthenticationSupport();
}
else
{
if (connector.getVersion() == Version.V_15)
version = "1.5";
else if (connector.getVersion() == Version.V_16)
version = "1.6";
else
version = "1.7";
if (ra.getOutboundResourceadapter() != null)
{