Init
This commit is contained in:
38
_wiki/check-jar.ps1
Normal file
38
_wiki/check-jar.ps1
Normal file
@@ -0,0 +1,38 @@
|
||||
param([string]$JarPath = "target/scrape-ui-1.0-SNAPSHOT.jar")
|
||||
|
||||
Add-Type -AssemblyName System.IO.Compression.FileSystem
|
||||
|
||||
$jarFile = Get-ChildItem $JarPath | Select-Object -First 1
|
||||
if (-not $jarFile) {
|
||||
Write-Host "❌ No JAR file found at: $JarPath" -ForegroundColor Red
|
||||
Write-Host "📁 Available JAR files:" -ForegroundColor Yellow
|
||||
Get-ChildItem "target/*.jar" | ForEach-Object { Write-Host " - $($_.Name)" }
|
||||
exit 1
|
||||
}
|
||||
|
||||
Write-Host "🔍 Examining JAR: $($jarFile.Name)" -ForegroundColor Cyan
|
||||
Write-Host "Size: $([math]::Round($jarFile.Length/1MB, 2)) MB`n"
|
||||
|
||||
$zip = [System.IO.Compression.ZipFile]::OpenRead($jarFile.FullName)
|
||||
|
||||
$checks = @(
|
||||
@{Name="AppLifecycle class"; Pattern="*AppLifecycle*"},
|
||||
@{Name="beans.xml"; Pattern="*beans.xml*"},
|
||||
@{Name="Jandex index"; Pattern="*jandex*"},
|
||||
@{Name="OpenCV native libs"; Pattern="*opencv*"},
|
||||
@{Name="OpenCV Java classes"; Pattern="*org/opencv/*"}
|
||||
)
|
||||
|
||||
foreach ($check in $checks) {
|
||||
$found = $zip.Entries | Where-Object { $_.FullName -like $check.Pattern } | Select-Object -First 1
|
||||
if ($found) {
|
||||
Write-Host "✅ $($check.Name): FOUND ($($found.FullName))" -ForegroundColor Green
|
||||
} else {
|
||||
Write-Host "❌ $($check.Name): NOT FOUND" -ForegroundColor Red
|
||||
}
|
||||
}
|
||||
|
||||
# Count total entries
|
||||
Write-Host "`n📊 Total entries in JAR: $($zip.Entries.Count)"
|
||||
|
||||
$zip.Dispose()
|
||||
Reference in New Issue
Block a user