Thank you, I will let you know.
From:
transformer-dev <transformer-dev-bounces@xxxxxxxxxxx> on behalf of BJ Hargrave <hargrave@xxxxxxxxxx>
Date: Saturday, 15 April 2023 at 12:31 am
To: transformer developer discussions <transformer-dev@xxxxxxxxxxx>
Subject: [EXT MSG] Re: [transformer-dev] Best way to transform groovy script file
EXTERNAL source. Be CAREFUL with links / attachments
|
I would try this patch:
diff --git a/org.eclipse.transformer/src/main/java/org/eclipse/transformer/action/ActionType.java b/org.eclipse.transformer/src/main/java/org/eclipse/transformer/action/ActionType.java
index 7f14c90..04c57b3 100644
--- a/org.eclipse.transformer/src/main/java/org/eclipse/transformer/action/ActionType.java
+++ b/org.eclipse.transformer/src/main/java/org/eclipse/transformer/action/ActionType.java
@@ -24,7 +24,7 @@ public enum ActionType {
PROPERTIES("Properties Action", ".properties"), // Sub of TEXT
TEXT("Text Action"),
- JAVA("Java Action", ".java"), // Sub of TEXT
+ JAVA("Java Action", ".java", ".groovy"), // Sub of TEXT
JSP("JSP Action", ".jsp"), // Sub of TEXT
XML("XML Action", ".xml"), // Sub of TEXT
This will treat .groovy files identically to .java files.
After you test this out, we can make a PR to add this change to the repo.
BJ Hargrave
Senior Technical Staff Member, IBM // office: +1 386 848 1781
Open Source Development // mobile: +1 386 848 3788
hargrave@xxxxxxxxxx
From:
transformer-dev <transformer-dev-bounces@xxxxxxxxxxx> on behalf of Tim Alkhatib via transformer-dev <transformer-dev@xxxxxxxxxxx>
Date: Thursday, April 13, 2023 at 23:00
To: transformer-dev@xxxxxxxxxxx <transformer-dev@xxxxxxxxxxx>
Cc: Tim Alkhatib <talkhatib@xxxxxxxxxxx>
Subject: [EXTERNAL] [transformer-dev] Best way to transform groovy script file
Hi, I would like to ask about the best approach to transfer groovy files. Out product contains several groovy script files and in order for our customers
to upgrade to use the latest release of the product, they need to transfer their existing
This Message Is From an External Sender
|
This message came from outside your organization.
|
|
|
Hi,
I would like to ask about the best approach to transfer groovy files. Out product contains several groovy script files and in order for our customers to upgrade to use the latest release of the
product, they need to transfer their existing groovy files.
I run the transformer on several groovy files inside a folder using 2 custom properties files ( below ) . I test a few files and as far as I can see the packages inside the files are transformed
correct name ex. Javax.servlet - > Jakarta.servlet. This under the hood uses TextActionImpl.
However, when I compared how TextActionImpl with JavaActionImpl work, I found JavaActionImpl offered more replacements (textUpdate, packagesUpdate, binaryPackagesUpdate, ..) while TextActionImpl
offers one replacement (textUpdate). To my understanding groovy script file should be treated like .java files. Is there way to run the transformer on groovy files to guarantee a behaviour like .java files ?
Files
------------------------------------------------------------
jakarta-selection.properties
*.groovy=UTF-8
jakarta-text-master.properties
*.groovy=jakarta-direct.properties,jakarta-renames.properties
Command
------------------------------------------------------------
java -jar org.eclipse.transformer.cli-0.5.0.jar -o /sdk-project-template /sdk-project-template-output
Thanks,
Tim
The information in this e-mail and any attachments is confidential and may be legally privileged. It is intended solely for the addressee or addressees. Any use or disclosure of the contents of this e-mail/attachments by a not intended recipient is unauthorized
and may be unlawful. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of TEMENOS. We recommend that you
check this e-mail and any attachments against viruses. TEMENOS accepts no liability for any damage caused by any malicious code or virus transmitted by this e-mail.