logpresso / CVE-2021-44228-Scanner

Vulnerability scanner and mitigation patch for Log4j2 CVE-2021-44228
Apache License 2.0
852 stars 173 forks source link

Build native image on linux - Error: No main manifest attribute #252

Closed danilansible closed 2 years ago

danilansible commented 2 years ago

Hi ,

I'm new to this, following the wiki for building native image on linux. glibc,graalvm and path steps are done getting this error, are there any other prerequisites and is there a recommendation from which source directory to run this?

# native-image --static -jar /usr/local/CVE-2021-44228-Scanner/src/test/resources/log4j2-ok/log4j-core-2.17.1.jar log4j2-scan -H:-CheckToolchain -H:+AllowIncompleteClasspath -H:ReflectionConfigurationFiles=/usr/local/CVE-2021-44228-Scanner/src/main/resources/META-INF/native-image/com.logpresso/log4j2-scanner/reflection-config.json

Error: No main manifest attribute, in /usr/local/CVE-2021-44228-Scanner/src/test/resources/log4j2-ok/log4j-core-2.17.1.jar

thank you

xeraph commented 2 years ago

@danilansible Install maven and use mvn install -Pnative on /usr/local/CVE-2021-44228-Scanner. log4j-core-2.17.1.jar is test resource file. That is log4j2 file.

danilansible commented 2 years ago

@xeraph Thanks for the guidance, I overlooked the maven part, the build went fine!

xeraph commented 2 years ago

@danilansible Glad to hear that! :D