Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no main manifest attribute #540

Open
coffeebeantraining opened this issue Mar 1, 2024 · 5 comments
Open

no main manifest attribute #540

coffeebeantraining opened this issue Mar 1, 2024 · 5 comments

Comments

@coffeebeantraining
Copy link

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

@bjhargrave
Copy link
Member

bjhargrave commented Mar 1, 2024

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.

@coffeebeantraining
Copy link
Author

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

@bjhargrave
Copy link
Member

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.

@coffeebeantraining
Copy link
Author

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,

@bjhargrave
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants