transformer icon indicating copy to clipboard operation
transformer copied to clipboard

no main manifest attribute

Open coffeebeantraining opened this issue 2 years ago • 5 comments

pulled the source and compiled with mvn package create a .bat file and ran with results indicating no main manifest? what am i doing wrong?

D:\workspace\ICAM>go.bat @echo off setlocal enabledelayedexpansion

REM Set the path to the Eclipse Transformer tool set TRANSFORMER_PATH=D:\workspace\ICAM\transformer\org.eclipse.transformer.cli\target\org.eclipse.transformer.cli-0.6.0-SNAPSHOT-distribution.jar

REM Set the directory containing the source JAR files set SOURCE_DIR=D:\workspace\ICAM\apache-fediz-1.6.1\plugins\tomcat\lib

REM Set the target directory for the transformed JAR files set TARGET_DIR=D:\workspace\ICAM\apache-fediz-1.6.1\plugins\tomcat\lib\transformed

REM Ensure the target directory exists if not exist "%TARGET_DIR%" mkdir "%TARGET_DIR%"

for %%F in ("%SOURCE_DIR%*.jar") do ( set "JAR_NAME=%%~nxF" java -jar "%TRANSFORMER_PATH%" "%%F" "%TARGET_DIR%!JAR_NAME!" )

endlocal

Results:

no main manifest attribute, in D:\workspace\ICAM\transformer\org.eclipse.transformer.cli\target\org.eclipse.transformer.cli-0.6.0-SNAPSHOT-distribution.jar no main manifest attribute, in D:\workspace\ICAM\transformer\org.eclipse.transformer.cli\target\org.eclipse.transformer.cli-0.6.0-SNAPSHOT-distribution.jar no main manifest attribute, in D:\workspace\ICAM\transformer\org.eclipse.transformer.cli\target\org.eclipse.transformer.cli-0.6.0-SNAPSHOT-distribution.jar no main manifest attribute, in D:\workspace\ICAM\transformer\org.eclipse.transformer.cli\target\org.eclipse.transformer.cli-0.6.0-SNAPSHOT-distribution.jar

coffeebeantraining avatar Mar 01 '24 07:03 coffeebeantraining

The distribution jar is not an executable jar. You need to unzip it into a folder and then java -jar the cli jar from the folder.

bjhargrave avatar Mar 01 '24 15:03 bjhargrave

The distribution jar is not an executable jar. You need to unzip it into a folder and then java -jar the cli jar from the folder.

@bjhargrave Thank you for the clarification. Do you happen to know if there are any more detailed instructions stashed away somewhere that dives into all of the use case scenarios? For example, converting javax jars to jakara, java src folders to jakarta, etc. Really appreciated your help. Mark

coffeebeantraining avatar Mar 01 '24 16:03 coffeebeantraining

Any information would be in this repo. Docs are lacking, so any PRs for the would be useful! Look to the tests for usage examples.

bjhargrave avatar Mar 01 '24 16:03 bjhargrave

Any information would be in this repo. Docs are lacking, so any PRs for the would be useful! Look to the tests for usage examples.

Thank you, will do. Just one more question - does the transformer work on war files? What if i have an existing java web app packaged as a war file, but do not have access to the source code. Will the transformer handle those situations?
Thanks,

coffeebeantraining avatar Mar 01 '24 17:03 coffeebeantraining

Yes, it does handle war files. I believe there is a test which confirms that.

bjhargrave avatar Mar 01 '24 17:03 bjhargrave